Bug 788959 - Clear the listener associated with cancelled bullet frame image requests. r=bz
authorJosh Matthews <josh@joshmatthews.net>
Wed, 28 Nov 2012 10:30:05 -0500
changeset 114363 667a3f65df083da5fe1ad70b0df8d8279296c8b4
parent 114362 a8c28e8d114a097e63939c7c9497a84af66a38fc
child 114364 bcc9219555af62fd89cb1fefe73b2805738deba9
push id18719
push userjosh@joshmatthews.net
push dateWed, 28 Nov 2012 15:30:14 +0000
treeherdermozilla-inbound@667a3f65df08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs788959
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 788959 - Clear the listener associated with cancelled bullet frame image requests. r=bz
layout/generic/nsBulletFrame.cpp
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -114,17 +114,17 @@ nsBulletFrame::DidSetStyleContext(nsStyl
       if (oldURI && newURI) {
         bool same;
         newURI->Equals(oldURI, &same);
         if (same) {
           needNewRequest = false;
         } else {
           nsLayoutUtils::DeregisterImageRequest(PresContext(), mImageRequest,
                                                 &mRequestRegistered);
-          mImageRequest->Cancel(NS_ERROR_FAILURE);
+          mImageRequest->CancelAndForgetObserver(NS_ERROR_FAILURE);
           mImageRequest = nullptr;
         }
       }
     }
 
     if (needNewRequest) {
       newRequest->Clone(mListener, getter_AddRefs(mImageRequest));
       if (mImageRequest) {
@@ -134,17 +134,17 @@ nsBulletFrame::DidSetStyleContext(nsStyl
       }
     }
   } else {
     // No image request on the new style context
     if (mImageRequest) {
       nsLayoutUtils::DeregisterImageRequest(PresContext(), mImageRequest,
                                             &mRequestRegistered);
 
-      mImageRequest->Cancel(NS_ERROR_FAILURE);
+      mImageRequest->CancelAndForgetObserver(NS_ERROR_FAILURE);
       mImageRequest = nullptr;
     }
   }
 
 #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) {