Commit 946ab9c1 authored by Olli Pettay's avatar Olli Pettay Committed by Matthew Finkel
Browse files

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
parent 2aea292d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);
  }