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:
Andrea Marchesini 2019-03-06 08:55:35 +00:00
Родитель 61816bf453
Коммит 6a41d87326
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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;