Bug 974905 - Warn and ignore SchedulePaint calls in a detached pres context. r=roc

This commit is contained in:
Mats Palmgren 2014-02-21 08:40:45 +00:00
parent ebc34061f5
commit 789fe92cf5

View File

@ -4889,8 +4889,11 @@ nsIFrame::SchedulePaint(PaintType aType)
if (!pres || (pres->Document() && pres->Document()->IsResourceDoc())) {
return;
}
MOZ_ASSERT(pres->GetContainerWeak(), "SchedulePaint in a detached pres context");
if (!pres->GetContainerWeak()) {
NS_WARNING("Shouldn't call SchedulePaint in a detached pres context");
return;
}
pres->PresShell()->ScheduleViewManagerFlush(aType == PAINT_DELAYED_COMPRESS ?
nsIPresShell::PAINT_DELAYED_COMPRESS :
nsIPresShell::PAINT_DEFAULT);