From 65ba3cac582ca078ff5864310b3425e7c83a028e 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(+) (limited to 'docshell/base') diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index f53d89e81..d8d0614d5 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