Bug 826029 - Assertion in mozPoisonWriteMac due to Mac camera code trying to write a defaults file on exit | Assertion failure: ok, at ../../../xpcom/build/mozPoisonWriteMac.cpp:90. r=ehsan.

--HG--
extra : rebase_source : 511835e6d24a0b58b5c9eb684b258456b7a7019e
This commit is contained in:
Rafael Ávila de Espíndola 2013-01-02 21:04:10 -05:00
Родитель 44229257d1
Коммит 4ca30d5e47
3 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -107,6 +107,7 @@ XRE_SetupDllBlocklistType XRE_SetupDllBlocklist;
XRE_TelemetryAccumulateType XRE_TelemetryAccumulate;
XRE_StartupTimelineRecordType XRE_StartupTimelineRecord;
XRE_mainType XRE_main;
XRE_DisableWritePoisoningType XRE_DisableWritePoisoning;
static const nsDynamicFunctionLoad kXULFuncs[] = {
{ "XRE_GetFileFromPath", (NSFuncPtr*) &XRE_GetFileFromPath },
@ -118,6 +119,7 @@ static const nsDynamicFunctionLoad kXULFuncs[] = {
{ "XRE_TelemetryAccumulate", (NSFuncPtr*) &XRE_TelemetryAccumulate },
{ "XRE_StartupTimelineRecord", (NSFuncPtr*) &XRE_StartupTimelineRecord },
{ "XRE_main", (NSFuncPtr*) &XRE_main },
{ "XRE_DisableWritePoisoning", (NSFuncPtr*) &XRE_DisableWritePoisoning },
{ nullptr, nullptr }
};
@ -280,5 +282,13 @@ int main(int argc, char* argv[])
}
XPCOMGlueShutdown();
// Allow writes again. While we would like to catch writes from static
// destructors to allow early exits to use _exit, we know that there is
// at least one such write that we don't control (see bug 826029). For
// now we enables write again and early exits will have to use exit instead
// of _exit.
XRE_DisableWritePoisoning();
return result;
}

Просмотреть файл

@ -4080,6 +4080,11 @@ XRE_mainMetro(int argc, char* argv[], const nsXREAppData* aAppData)
void SetWindowsEnvironment(WindowsEnvironmentType aEnvID);
#endif // MOZ_METRO || !defined(XP_WIN)
void
XRE_DisableWritePoisoning(void) {
mozilla::DisableWritePoisoning();
}
int
XRE_main(int argc, char* argv[], const nsXREAppData* aAppData, uint32_t aFlags)
{

Просмотреть файл

@ -452,6 +452,8 @@ XRE_API(void,
XRE_API(void,
XRE_InitOmnijar, (nsIFile* greOmni,
nsIFile* appOmni))
XRE_API(void,
XRE_DisableWritePoisoning, (void))
#ifdef XP_WIN
/**