Bug 847002 - Add a crash if layer manager is null so we don't run off into garbage code. r=mattwoodrow

This commit is contained in:
Kartikaya Gupta 2013-03-04 23:15:53 +00:00
parent d8cce58386
commit 7aad84f060

View File

@ -5512,6 +5512,12 @@ PresShell::Paint(nsView* aViewToPaint,
aViewToPaint->GetWidget()->GetLayerManager(&isRetainingManager);
NS_ASSERTION(layerManager, "Must be in paint event");
if (!layerManager) {
// Crash so we get a good stack on how this code is getting triggered.
// See bug 847002 for details.
MOZ_CRASH();
}
// Whether or not we should set first paint when painting is
// suppressed is debatable. For now we'll do it because
// B2G relies on first paint to configure the viewport and