bug 820716 - Call OOPInit during startup. r=khuey

This commit is contained in:
Ted Mielczarek 2014-07-25 07:29:39 -04:00
parent d390bf0067
commit 31cccf8fc4
2 changed files with 6 additions and 15 deletions

View File

@ -2547,21 +2547,6 @@ static bool ChildFilter(void *context) {
void
OOPInit()
{
class ProxyToMainThread : public nsRunnable
{
public:
NS_IMETHOD Run() {
OOPInit();
return NS_OK;
}
};
if (!NS_IsMainThread()) {
// This logic needs to run on the main thread
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
mozilla::SyncRunnable::DispatchToThread(mainThread, new ProxyToMainThread());
return;
}
if (OOPInitialized())
return;

View File

@ -4080,6 +4080,12 @@ XREMain::XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
rv = mScopedXPCom->Initialize();
NS_ENSURE_SUCCESS(rv, 1);
#ifdef MOZ_CRASHREPORTER
if (CrashReporter::GetEnabled()) {
CrashReporter::OOPInit();
}
#endif
// run!
rv = XRE_mainRun();