summaryrefslogtreecommitdiffstats
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
parentd9f17c9f8b973c4fd4799f2370e620cadae82910 (diff)
downloadUXP-33b22f6157410db00249d1161810476dca485c4f.tar
UXP-33b22f6157410db00249d1161810476dca485c4f.tar.gz
UXP-33b22f6157410db00249d1161810476dca485c4f.tar.lz
UXP-33b22f6157410db00249d1161810476dca485c4f.tar.xz
UXP-33b22f6157410db00249d1161810476dca485c4f.zip
[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 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);
}