mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 06:52:25 +00:00
Bug 935846, nsJSEnvironment should get a shutdown notification also in child processes, r=romaxa
--HG-- extra : rebase_source : 782bc88e47ecb750b4220fe01e3f74ebcfa05493
This commit is contained in:
parent
d791610ba4
commit
63a24cde86
@ -282,7 +282,8 @@ nsJSEnvironmentObserver::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
nsJSContext::NonIncrementalGC,
|
||||
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;
|
||||
KillTimers();
|
||||
}
|
||||
@ -2848,6 +2849,7 @@ nsJSContext::EnsureStatics()
|
||||
nsIObserver* observer = new nsJSEnvironmentObserver();
|
||||
obs->AddObserver(observer, "memory-pressure", 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
|
||||
// service in order to force its constructor to run, which registers a
|
||||
|
Loading…
x
Reference in New Issue
Block a user