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

This commit is contained in:
wolfbeast 2020-04-07 10:55:20 +02:00 committed by Roy Tam
commit c8b7ac3f86

View file

@ -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);
}