Make imgRequestProxy hold a weak ref to its listener, to prevent reference

cycles.  Bug 196797, r=pavlov, sr=jst
This commit is contained in:
bzbarsky@mit.edu
2003-03-17 16:09:02 +00:00
parent 6983791836
commit ad7defd22e
11 changed files with 120 additions and 22 deletions

View File

@@ -115,6 +115,9 @@ nsImageLoader::Load(nsIURI *aURI)
if (eq) {
return NS_OK;
}
// Now cancel the old request so it won't hold a stale ref to us.
mRequest->Cancel(NS_ERROR_FAILURE);
}
nsCOMPtr<imgILoader> il(do_GetService("@mozilla.org/image/loader;1", &rv));