Bug 508057. Make sure to drop the ref to the observer when clearing our cached tree images. r=joedrew
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 03 Aug 2009 23:06:34 -0400
changeset 31103 a7e5345ecbea5ae3d85cd8562a7833ca6b6d33d6
parent 31102 cdf768b8b45ac3b7f26aafc13e0d6e865865ec12
child 31104 d6c10d88e4f6705bd1640cbc4b529be9daf17701
push idunknown
push userunknown
push dateunknown
reviewersjoedrew
bugs508057
milestone1.9.2a1pre
Bug 508057. Make sure to drop the ref to the observer when clearing our cached tree images. r=joedrew
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
@@ -114,17 +114,17 @@
 
 static NS_DEFINE_CID(kWidgetCID, NS_CHILD_CID);
 
 // Enumeration function that cancels all the image requests in our cache
 static PLDHashOperator
 CancelImageRequest(const nsAString& aKey,
                    nsTreeImageCacheEntry aEntry, void* aData)
 {
-  aEntry.request->Cancel(NS_BINDING_ABORTED);
+  aEntry.request->CancelAndForgetObserver(NS_BINDING_ABORTED);
   return PL_DHASH_NEXT;
 }
 
 //
 // NS_NewTreeFrame
 //
 // Creates a new tree frame
 //