[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-68.6.0esr-9.0-1] Bug 1620818 - Release nsDocShell::mContentViewer properly. r=nika, peterv a=dveditz



commit 7e258d9875480b8c42e3af16ec9f927eee3f06ab
Author: Olli Pettay <Olli.Pettay@xxxxxxxxxxx>
Date:   Thu Apr 2 14:43:50 2020 +0000

    Bug 1620818 - Release nsDocShell::mContentViewer properly. r=nika,peterv a=dveditz
    
    Differential Revision: https://phabricator.services.mozilla.com/D69383
    
    --HG--
    branch : FIREFOX_ESR_68_6_X_RELBRANCH
    extra : source : 8755eccf58cd6bd4fc1f00e6bcf45681d41da314
    extra : intermediate-source : 2f3e381a0fedaf4d16a6bc1fd1a35751f6af99ba
---
 docshell/base/nsDocShell.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 3cf2086206a4..4abdd088d4ff 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -433,6 +433,12 @@ nsDocShell::~nsDocShell() {
     mSessionHistory->LegacySHistory()->ClearRootDocShell();
   }
 
+  if (mContentViewer) {
+    mContentViewer->Close(nullptr);
+    mContentViewer->Destroy();
+    mContentViewer = nullptr;
+  }
+
   if (--gDocShellCount == 0) {
     NS_IF_RELEASE(sURIFixup);
   }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits