diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index bfb36d80309..3ec202324d1 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -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 mainThread = do_GetMainThread(); - mozilla::SyncRunnable::DispatchToThread(mainThread, new ProxyToMainThread()); - return; - } - if (OOPInitialized()) return; diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 36e7aea2bc5..d3695f5548d 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -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();