mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 485834 ObserverService shouldn't recurse infinitely for stupid consumers
r=dougt
This commit is contained in:
parent
b7026b73e3
commit
e614edadb8
@ -147,6 +147,9 @@ nsObserverService::RemoveObserver(nsIObserver* anObserver, const char* aTopic)
|
||||
if (!observerList)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
/* This death grip is to protect against stupid consumers who call
|
||||
RemoveObserver from their Destructor, see bug 485834/bug 325392. */
|
||||
nsCOMPtr<nsIObserver> kungFuDeathGrip(anObserver);
|
||||
return observerList->RemoveObserver(anObserver);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user