зеркало из https://github.com/mozilla/gecko-dev.git
Defensive programming for UnregisterObserver after Shutdown. r=dbaron
This commit is contained in:
Родитель
bd8d457314
Коммит
4157de5421
|
@ -159,7 +159,9 @@ nsMemoryImpl::RegisterObserver(nsIMemoryPressureObserver* obs)
|
|||
NS_IMETHODIMP
|
||||
nsMemoryImpl::UnregisterObserver(nsIMemoryPressureObserver* obs)
|
||||
{
|
||||
NS_ASSERTION(mObservers, "never called RegisterObserver");
|
||||
NS_ASSERTION(mObservers, "never called nsIMemory::RegisterObserver or called after nsIMemory::Shutdown");
|
||||
if (!mObservers)
|
||||
return NS_OK;
|
||||
return mObservers->RemoveElement(obs);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче