summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-07 10:55:20 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-08 08:53:25 +0200
commit0507f298e9a5124634fb16c91b404d08356639b3 (patch)
tree33790414e7aab4c28a072cc459260a77eca16fe5
parentd9c31941e79b33b0f50345abed13925cb37f0399 (diff)
downloaduxp-0507f298e9a5124634fb16c91b404d08356639b3.tar.gz
[Docshell] Ensure nsDocShell::mContentViewer is released properly.
-rw-r--r--docshell/base/nsDocShell.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 6104ebfa71..97051ab76e 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);
}