From 33b22f6157410db00249d1161810476dca485c4f Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 7 Apr 2020 10:55:20 +0200 Subject: [Docshell] Ensure nsDocShell::mContentViewer is released properly. --- docshell/base/nsDocShell.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index f53d89e819..d8d0614d57 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -860,6 +860,12 @@ nsDocShell::~nsDocShell() shPrivate->SetRootDocShell(nullptr); } + if (mContentViewer) { + mContentViewer->Close(nullptr); + mContentViewer->Destroy(); + mContentViewer = nullptr; + } + if (--gDocShellCount == 0) { NS_IF_RELEASE(sURIFixup); } -- cgit v1.2.3