summaryrefslogtreecommitdiff
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
commiteeb473a3f507dbc2c04326e542ed1250492155b9 (patch)
tree0eed93065d3286604cbc49cb2cf4dfdf2f5e39b2
parent555910ccf75092ca89f3d5c5f33199d38ed46ff1 (diff)
downloaduxp-eeb473a3f507dbc2c04326e542ed1250492155b9.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 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);
}