зеркало из https://github.com/mozilla/pjs.git
Fix leak when a window holding an image document is closed before the image
finishes loading. Bug 237153, r+sr=jst, a=race between dbaron and brendan.
This commit is contained in:
Родитель
6fcd42e796
Коммит
67671e4852
|
@ -268,7 +268,12 @@ nsImageDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObjec
|
|||
PR_FALSE);
|
||||
}
|
||||
|
||||
// drop the ref to mImageElement, in case it has a ref to us
|
||||
// Break reference cycle with mImageElement, if we have one
|
||||
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mImageElement);
|
||||
if (imageLoader) {
|
||||
imageLoader->RemoveObserver(this);
|
||||
}
|
||||
|
||||
mImageElement = nsnull;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче