Bug 1237227 - Check the return of context->GetDisplayRootPresContext() for validity. r=roc

This commit is contained in:
Bogdan Postelnicu 2016-01-06 04:32:00 -05:00
parent ce1ce5cb79
commit ca41bc900a

View File

@ -1087,7 +1087,9 @@ nsView::DidCompositeWindow(const TimeStamp& aCompositeStart,
nsAutoScriptBlocker scriptBlocker;
nsPresContext* context = presShell->GetPresContext();
context->GetDisplayRootPresContext()->GetRootPresContext()->NotifyDidPaintForSubtree(nsIPresShell::PAINT_COMPOSITE);
nsRootPresContext* rootContext = context->GetDisplayRootPresContext();
MOZ_ASSERT(rootContext, "rootContext must be valid.");
rootContext->GetRootPresContext()->NotifyDidPaintForSubtree(nsIPresShell::PAINT_COMPOSITE);
// If the two timestamps are identical, this was likely a fake composite
// event which wouldn't be terribly useful to display.