mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1434618 - Worker shutdown should start at xpcom-will-shutdown notification, r=smaug
This commit is contained in:
parent
ccf4104a50
commit
e923a91555
@ -1751,7 +1751,7 @@ RuntimeService::Init()
|
||||
rv = obs->AddObserver(this, NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = obs->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
|
||||
rv = obs->AddObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mObserved = true;
|
||||
@ -2133,7 +2133,7 @@ RuntimeService::Cleanup()
|
||||
NS_WARNING("Failed to unregister for offline notification event!");
|
||||
}
|
||||
obs->RemoveObserver(this, NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID);
|
||||
obs->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
|
||||
obs->RemoveObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID);
|
||||
mObserved = false;
|
||||
}
|
||||
}
|
||||
@ -2610,7 +2610,7 @@ RuntimeService::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||
if (!strcmp(aTopic, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID)) {
|
||||
Shutdown();
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user