mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 820716 - Call OOPInit during startup. r=khuey
This commit is contained in:
parent
d390bf0067
commit
31cccf8fc4
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user