[Docshell] Ensure nsDocShell::mContentViewer is released properly.
This commit is contained in:
parent
e65de81e03
commit
64db46075a
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue