diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 90bc3e594e9..9b9889b9d14 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -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);