summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-07 10:55:20 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 13:25:13 +0200
commit65ba3cac582ca078ff5864310b3425e7c83a028e (patch)
treea8087175b2731aa9e5e9a201efab652c07a85e5a
parent1b8788aecbfd130a71757c7a99fc432b88f94026 (diff)
downloadUXP-65ba3cac582ca078ff5864310b3425e7c83a028e.tar
UXP-65ba3cac582ca078ff5864310b3425e7c83a028e.tar.gz
UXP-65ba3cac582ca078ff5864310b3425e7c83a028e.tar.lz
UXP-65ba3cac582ca078ff5864310b3425e7c83a028e.tar.xz
UXP-65ba3cac582ca078ff5864310b3425e7c83a028e.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);
}