Bug 788959 - Clear the listener associated with cancelled bullet frame image requests. r=bz a=akeybl
authorJosh Matthews <josh@joshmatthews.net>
Wed, 28 Nov 2012 15:56:07 -0500
changeset 82089 e2a6bfad78e624c202f19c24fa46925e25e36e5c
parent 82088 e438eb7197d6521154ef8e91b9189a2f418ac2b6
child 82090 99a7860de6c65c8e75a25784af5dd27b8014e28c
push id340
push userjosh@joshmatthews.net
push dateWed, 28 Nov 2012 21:10:32 +0000
reviewersbz, akeybl
bugs788959
milestone10.0.11esrpre
Bug 788959 - Clear the listener associated with cancelled bullet frame image requests. r=bz a=akeybl
layout/generic/nsBulletFrame.cpp
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -165,29 +165,29 @@ nsBulletFrame::DidSetStyleContext(nsStyl
       nsCOMPtr<nsIURI> newURI;
       newRequest->GetURI(getter_AddRefs(newURI));
       if (oldURI && newURI) {
         bool same;
         newURI->Equals(oldURI, &same);
         if (same) {
           needNewRequest = false;
         } else {
-          mImageRequest->Cancel(NS_ERROR_FAILURE);
+          mImageRequest->CancelAndForgetObserver(NS_ERROR_FAILURE);
           mImageRequest = nsnull;
         }
       }
     }
 
     if (needNewRequest) {
       newRequest->Clone(mListener, getter_AddRefs(mImageRequest));
     }
   } else {
     // No image request on the new style context
     if (mImageRequest) {
-      mImageRequest->Cancel(NS_ERROR_FAILURE);
+      mImageRequest->CancelAndForgetObserver(NS_ERROR_FAILURE);
       mImageRequest = nsnull;
     }
   }
 
 #ifdef ACCESSIBILITY
   // Update the list bullet accessible. If old style list isn't available then
   // no need to update the accessible tree because it's not created yet.
   if (aOldStyleContext) {