Issue #1643 - Follow-up: Ensure we properly clear our pointers when the

Presentation of a document is destroyed.
This commit is contained in:
Moonchild
2020-10-16 10:19:19 +00:00
committed by roytam1
parent 208ef44f9f
commit 317b96a1be
3 changed files with 24 additions and 9 deletions
+6
View File
@@ -3644,6 +3644,12 @@ nsDocument::DeleteShell()
// objects for @font-face rules that came from the style set.
RebuildUserFontSet();
if (mResizeObserverController) {
// If the shell is going away, we need to remove any links to this document
// from the observer.
mResizeObserverController->DetachFromDocument();
}
nsIPresShell* oldShell = mPresShell;
mPresShell = nullptr;
UpdateFrameRequestCallbackSchedulingState(oldShell);