зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1304566 - Unregister from the obsever service in order to prevent re-entrancy; r=janv
This commit is contained in:
Родитель
5e75957ba6
Коммит
3c7ded9416
|
@ -2813,6 +2813,18 @@ ShutdownObserver::Observe(nsISupports* aSubject,
|
|||
MOZ_ASSERT(!strcmp(aTopic, PROFILE_BEFORE_CHANGE_QM_OBSERVER_ID));
|
||||
MOZ_ASSERT(gInstance);
|
||||
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService();
|
||||
if (NS_WARN_IF(!observerService)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// Unregister ourselves from the observer service first to make sure the
|
||||
// nested event loop below will not cause re-entrancy issues.
|
||||
Unused <<
|
||||
observerService->RemoveObserver(this,
|
||||
PROFILE_BEFORE_CHANGE_QM_OBSERVER_ID);
|
||||
|
||||
QuotaManagerService* qms = QuotaManagerService::Get();
|
||||
MOZ_ASSERT(qms);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче