mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-02-19 13:31:00 +00:00
#402: M1356558
This commit is contained in:
parent
b384d72987
commit
2adbafdb5b
@ -2095,19 +2095,24 @@ nsDocumentViewer::Hide(void)
|
|||||||
mPresShell->CaptureHistoryState(getter_AddRefs(layoutState));
|
mPresShell->CaptureHistoryState(getter_AddRefs(layoutState));
|
||||||
}
|
}
|
||||||
|
|
||||||
DestroyPresShell();
|
{
|
||||||
|
// Do not run ScriptRunners queued by DestroyPresShell() in the intermediate
|
||||||
|
// state before we're done destroying PresShell, PresContext, ViewManager, etc.
|
||||||
|
nsAutoScriptBlocker scriptBlocker;
|
||||||
|
DestroyPresShell();
|
||||||
|
|
||||||
DestroyPresContext();
|
DestroyPresContext();
|
||||||
|
|
||||||
mViewManager = nullptr;
|
mViewManager = nullptr;
|
||||||
mWindow = nullptr;
|
mWindow = nullptr;
|
||||||
mDeviceContext = nullptr;
|
mDeviceContext = nullptr;
|
||||||
mParentWidget = nullptr;
|
mParentWidget = nullptr;
|
||||||
|
|
||||||
nsCOMPtr<nsIBaseWindow> base_win(mContainer);
|
nsCOMPtr<nsIBaseWindow> base_win(mContainer);
|
||||||
|
|
||||||
if (base_win && !mAttachedToParent) {
|
if (base_win && !mAttachedToParent) {
|
||||||
base_win->SetParentWidget(nullptr);
|
base_win->SetParentWidget(nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user