Bug 1042708 - Fix improper metro main thread identification. Regression from bug 1033358. r=me

This commit is contained in:
Jim Mathies 2014-07-23 10:13:18 -05:00
parent 486dad8c5e
commit 1dd937c97e
2 changed files with 8 additions and 2 deletions

View File

@ -565,7 +565,11 @@ InitXPCOMGlue(const char *argv0, nsIFile **xreDirectory)
return rv;
}
#ifndef MOZ_METRO
// This will set this thread as the main thread, which in metro land is
// wrong. We initialize this later from the right thread in nsAppRunner.
NS_LogInit();
#endif
// chop XPCOM_DLL off exePath
*lastSlash = '\0';

View File

@ -4258,6 +4258,10 @@ XRE_metroStartup(bool runXREMain)
{
nsresult rv;
// XXX This call, odly enough, will set this thread as
// the main thread. (see bug 1033358)
ScopedLogging log;
bool exit = false;
if (xreMainPtr->XRE_mainStartup(&exit) != 0 || exit)
return NS_ERROR_FAILURE;
@ -4346,8 +4350,6 @@ XRE_mainMetro(int argc, char* argv[], const nsXREAppData* aAppData)
// used throughout this file
gAppData = xreMainPtr->mAppData;
ScopedLogging log;
// init
bool exit = false;
if (xreMainPtr->XRE_mainInit(&exit) != 0 || exit)