Bug 978001. Null check presshell in nsViewManager::ProcessPendingUpdatesForView. r=mats

This commit is contained in:
Timothy Nikkel
2014-03-02 05:14:27 -06:00
parent a277ffea06
commit a342ef711c

View File

@@ -411,22 +411,24 @@ void nsViewManager::ProcessPendingUpdatesForView(nsView* aView,
} }
NS_ASSERTION(aView->HasWidget(), "FlushDelayedResize removed our widget!"); NS_ASSERTION(aView->HasWidget(), "FlushDelayedResize removed our widget!");
if (presShell) {
#ifdef MOZ_DUMP_PAINTING #ifdef MOZ_DUMP_PAINTING
if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) { if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) {
printf_stderr("---- PAINT START ----PresShell(%p), nsView(%p), nsIWidget(%p)\n", presShell, aView, widget); printf_stderr("---- PAINT START ----PresShell(%p), nsView(%p), nsIWidget(%p)\n", presShell, aView, widget);
} }
#endif #endif
nsAutoScriptBlocker scriptBlocker; nsAutoScriptBlocker scriptBlocker;
SetPainting(true); SetPainting(true);
presShell->Paint(aView, nsRegion(), nsIPresShell::PAINT_LAYERS); presShell->Paint(aView, nsRegion(), nsIPresShell::PAINT_LAYERS);
#ifdef MOZ_DUMP_PAINTING #ifdef MOZ_DUMP_PAINTING
if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) { if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) {
printf_stderr("---- PAINT END ----\n"); printf_stderr("---- PAINT END ----\n");
} }
#endif #endif
aView->SetForcedRepaint(false); aView->SetForcedRepaint(false);
SetPainting(false); SetPainting(false);
}
viewManager->FlushDirtyRegionToWidget(aView); viewManager->FlushDirtyRegionToWidget(aView);
} else { } else {
viewManager->FlushDirtyRegionToWidget(aView); viewManager->FlushDirtyRegionToWidget(aView);