Bug 935846, nsJSEnvironment should get a shutdown notification also in child processes, r=romaxa
This commit is contained in:
@@ -282,7 +282,8 @@ nsJSEnvironmentObserver::Observe(nsISupports* aSubject, const char* aTopic,
|
|||||||
nsJSContext::NonIncrementalGC,
|
nsJSContext::NonIncrementalGC,
|
||||||
nsJSContext::ShrinkingGC);
|
nsJSContext::ShrinkingGC);
|
||||||
}
|
}
|
||||||
} else if (!nsCRT::strcmp(aTopic, "quit-application")) {
|
} else if (!nsCRT::strcmp(aTopic, "quit-application") ||
|
||||||
|
!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||||
sShuttingDown = true;
|
sShuttingDown = true;
|
||||||
KillTimers();
|
KillTimers();
|
||||||
}
|
}
|
||||||
@@ -2848,6 +2849,7 @@ nsJSContext::EnsureStatics()
|
|||||||
nsIObserver* observer = new nsJSEnvironmentObserver();
|
nsIObserver* observer = new nsJSEnvironmentObserver();
|
||||||
obs->AddObserver(observer, "memory-pressure", false);
|
obs->AddObserver(observer, "memory-pressure", false);
|
||||||
obs->AddObserver(observer, "quit-application", false);
|
obs->AddObserver(observer, "quit-application", false);
|
||||||
|
obs->AddObserver(observer, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
|
||||||
|
|
||||||
// Bug 907848 - We need to explicitly get the nsIDOMScriptObjectFactory
|
// Bug 907848 - We need to explicitly get the nsIDOMScriptObjectFactory
|
||||||
// service in order to force its constructor to run, which registers a
|
// service in order to force its constructor to run, which registers a
|
||||||
|
|||||||
Reference in New Issue
Block a user