summaryrefslogtreecommitdiff
path: root/docshell/base
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-07 10:55:20 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-07 10:55:20 +0200
commit33b22f6157410db00249d1161810476dca485c4f (patch)
tree0eed93065d3286604cbc49cb2cf4dfdf2f5e39b2 /docshell/base
parentd9f17c9f8b973c4fd4799f2370e620cadae82910 (diff)
downloaduxp-33b22f6157410db00249d1161810476dca485c4f.tar.gz
[Docshell] Ensure nsDocShell::mContentViewer is released properly.
Diffstat (limited to 'docshell/base')
-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 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);
}