Bug 805745. Paint notification can flush (via WillPaint), so re-check if the listener still exists after on puppet widget backend. r=cjones
authorTimothy Nikkel <tnikkel@gmail.com>
Wed, 12 Dec 2012 15:57:08 -0600
changeset 115851 956f6e2b4b707423bb5d3825a8a3b92dae26e766
parent 115850 65d0aedb6ac48909cd1fd09c91ab086db7d86c71
child 115852 991647fcdc275372d224b1b568aa2e8352e909bc
push id24028
push useremorley@mozilla.com
push dateThu, 13 Dec 2012 15:56:02 +0000
treeherderautoland@9db79b97abbb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs805745
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 805745. Paint notification can flush (via WillPaint), so re-check if the listener still exists after on puppet widget backend. r=cjones
widget/xpwidgets/PuppetWidget.cpp
--- a/widget/xpwidgets/PuppetWidget.cpp
+++ b/widget/xpwidgets/PuppetWidget.cpp
@@ -535,17 +535,19 @@ PuppetWidget::Paint()
       ctx->Clip();
       AutoLayerManagerSetup setupLayerManager(this, ctx,
                                               BUFFER_NONE);
       mAttachedWidgetListener->PaintWindow(this, region, nsIWidgetListener::WILL_SEND_DID_PAINT);
       mTabChild->NotifyPainted();
     }
   }
 
-  mAttachedWidgetListener->DidPaintWindow();
+  if (mAttachedWidgetListener) {
+    mAttachedWidgetListener->DidPaintWindow();
+  }
 
   return NS_OK;
 }
 
 void
 PuppetWidget::SetChild(PuppetWidget* aChild)
 {
   NS_ABORT_IF_FALSE(this != aChild, "can't parent a widget to itself");