Bug 978001. Null check presshell in nsViewManager::ProcessPendingUpdatesForView. r=mats a=abillings
authorTimothy Nikkel <tnikkel@gmail.com>
Sun, 02 Mar 2014 05:14:27 -0600
changeset 183248 ab90efe51b6ede2c56a96ce688d8f1ec2ff19338
parent 183247 3af224d9f24835a9ba40fb5307b790778f9bc411
child 183249 28d2834f0617b361be951a6b1dcfa5e77986ef37
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats, abillings
bugs978001
milestone29.0a2
Bug 978001. Null check presshell in nsViewManager::ProcessPendingUpdatesForView. r=mats a=abillings
view/src/nsViewManager.cpp
--- a/view/src/nsViewManager.cpp
+++ b/view/src/nsViewManager.cpp
@@ -405,32 +405,34 @@ void nsViewManager::ProcessPendingUpdate
         if (vm->mDelayedResize != nsSize(NSCOORD_NONE, NSCOORD_NONE) &&
             vm->mRootView->IsEffectivelyVisible() &&
             vm->mPresShell && vm->mPresShell->IsVisible()) {
           vm->FlushDelayedResize(true);
         }
       }
       NS_ASSERTION(aView->HasWidget(), "FlushDelayedResize removed our widget!");
 
+      if (presShell) {
 #ifdef MOZ_DUMP_PAINTING
-      if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) {
-        printf_stderr("---- PAINT START ----PresShell(%p), nsView(%p), nsIWidget(%p)\n", presShell, aView, widget);
-      }
+        if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) {
+          printf_stderr("---- PAINT START ----PresShell(%p), nsView(%p), nsIWidget(%p)\n", presShell, aView, widget);
+        }
 #endif
-      nsAutoScriptBlocker scriptBlocker;
-      SetPainting(true);
-      presShell->Paint(aView, nsRegion(), nsIPresShell::PAINT_LAYERS);
+        nsAutoScriptBlocker scriptBlocker;
+        SetPainting(true);
+        presShell->Paint(aView, nsRegion(), nsIPresShell::PAINT_LAYERS);
 #ifdef MOZ_DUMP_PAINTING
-      if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) {
-        printf_stderr("---- PAINT END ----\n");
-      }
+        if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) {
+          printf_stderr("---- PAINT END ----\n");
+        }
 #endif
 
-      aView->SetForcedRepaint(false);
-      SetPainting(false);
+        aView->SetForcedRepaint(false);
+        SetPainting(false);
+      }
       viewManager->FlushDirtyRegionToWidget(aView);
     } else {
       viewManager->FlushDirtyRegionToWidget(aView);
     }
   }
 }
 
 void nsViewManager::FlushDirtyRegionToWidget(nsView* aView)