Bug 819000: Bail out of PresShell::Paint if not active. r=roc
authorChris Jones <jones.chris.g@gmail.com>
Thu, 24 Jan 2013 10:39:18 -0800
changeset 118320 2f4d164bbef532834fd06f87e2254b38b3365c8f
parent 118319 940322437aafb9e140c4c561e08e67711400ccc4
child 118321 b17104b59d897fac40180e354749be4535300820
push id350
push usercjones@mozilla.com
push dateFri, 25 Jan 2013 00:40:17 +0000
reviewersroc
bugs819000
milestone18.0
Bug 819000: Bail out of PresShell::Paint if not active. r=roc
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -5241,16 +5241,20 @@ PresShell::Paint(nsIView*           aVie
                  const nsRegion&    aDirtyRegion,
                  PaintType          aType,
                  bool               aWillSendDidPaint)
 {
   SAMPLE_LABEL("Paint", "PresShell::Paint");
   NS_ASSERTION(!mIsDestroying, "painting a destroyed PresShell");
   NS_ASSERTION(aViewToPaint, "null view");
 
+  if (!mIsActive) {
+    return;
+  }
+
   nsAutoNotifyDidPaint notifyDidPaint(aWillSendDidPaint);
 
   nsPresContext* presContext = GetPresContext();
   AUTO_LAYOUT_PHASE_ENTRY_POINT(presContext, Paint);
 
   nsIFrame* frame = aViewToPaint->GetFrame();
 
   bool isRetainingManager;