[Docshell] Ensure nsDocShell::mContentViewer is released properly.

This commit is contained in:
Fedor 2020-04-12 13:02:51 +03:00
parent e65de81e03
commit 64db46075a
1 changed files with 6 additions and 0 deletions

View File

@ -859,6 +859,12 @@ nsDocShell::~nsDocShell()
shPrivate->SetRootDocShell(nullptr);
}
if (mContentViewer) {
mContentViewer->Close(nullptr);
mContentViewer->Destroy();
mContentViewer = nullptr;
}
if (--gDocShellCount == 0) {
NS_IF_RELEASE(sURIFixup);
}