From 446eaaa15cc768307bcf048d0ebe164df80f62e7 Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Thu, 16 May 2024 08:22:31 +0000 Subject: [PATCH] Bug 1897055. Assert SVGDocumentWrapper::DestroyViewer is called on main thread. r=layout-reviewers,emilio Differential Revision: https://phabricator.services.mozilla.com/D210603 --- image/SVGDocumentWrapper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/image/SVGDocumentWrapper.cpp b/image/SVGDocumentWrapper.cpp index 1684c602ecdc..08228c9c708c 100644 --- a/image/SVGDocumentWrapper.cpp +++ b/image/SVGDocumentWrapper.cpp @@ -54,6 +54,7 @@ SVGDocumentWrapper::~SVGDocumentWrapper() { } void SVGDocumentWrapper::DestroyViewer() { + MOZ_ASSERT(NS_IsMainThread()); if (mViewer) { mViewer->GetDocument()->OnPageHide(false, nullptr); mViewer->Close(nullptr);