From 74425c36d719300cb0eb93b190ce2a19e4114bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 19 Jan 2018 23:51:30 +0100 Subject: [PATCH] Bug 1431855: Flush notifications via the document in SVGDocumentWrapper. r=dholbert MozReview-Commit-ID: BMmhvqFE7O7 --HG-- extra : rebase_source : 516aaaae3b9b6de9e72d2fc724b08385ae09e4e7 --- image/SVGDocumentWrapper.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/image/SVGDocumentWrapper.cpp b/image/SVGDocumentWrapper.cpp index a0bab41a7090..054d0b2b55c5 100644 --- a/image/SVGDocumentWrapper.cpp +++ b/image/SVGDocumentWrapper.cpp @@ -419,10 +419,8 @@ SVGDocumentWrapper::UnregisterForXPCOMShutdown() void SVGDocumentWrapper::FlushLayout() { - nsCOMPtr presShell; - mViewer->GetPresShell(getter_AddRefs(presShell)); - if (presShell) { - presShell->FlushPendingNotifications(FlushType::Layout); + if (nsIDocument* doc = GetDocument()) { + doc->FlushPendingNotifications(FlushType::Layout); } }