зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1532636 - nsObserverService should allow RemoveObserver() to be called when shutting down, r=gsvelto
Depends on D22086 Differential Revision: https://phabricator.services.mozilla.com/D22087 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
61816bf453
Коммит
6a41d87326
|
@ -229,6 +229,11 @@ NS_IMETHODIMP
|
|||
nsObserverService::RemoveObserver(nsIObserver* aObserver, const char* aTopic) {
|
||||
LOG(("nsObserverService::RemoveObserver(%p: %s)", (void*)aObserver, aTopic));
|
||||
|
||||
if (mShuttingDown) {
|
||||
// The service is shutting down. Let's ignore this call.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_TRY(EnsureValidCall());
|
||||
if (NS_WARN_IF(!aObserver) || NS_WARN_IF(!aTopic)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
|
Загрузка…
Ссылка в новой задаче