diff options
author | Moonchild <moonchild@palemoon.org> | 2020-10-16 10:19:19 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-10-24 10:36:20 +0000 |
commit | eac19e335655e462c5a100b64d9016094cdbe34a (patch) | |
tree | 6c30e3207f5804f2a7c6358bce93f29dc070d33e /dom/base/nsDocument.cpp | |
parent | 1e8d07cac205a5db3d7d416d7f414a213fd892ff (diff) | |
download | UXP-eac19e335655e462c5a100b64d9016094cdbe34a.tar UXP-eac19e335655e462c5a100b64d9016094cdbe34a.tar.gz UXP-eac19e335655e462c5a100b64d9016094cdbe34a.tar.lz UXP-eac19e335655e462c5a100b64d9016094cdbe34a.tar.xz UXP-eac19e335655e462c5a100b64d9016094cdbe34a.zip |
Issue #1643 - Follow-up: Ensure we properly clear our pointers when the
Presentation of a document is destroyed.
Diffstat (limited to 'dom/base/nsDocument.cpp')
-rw-r--r-- | dom/base/nsDocument.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 0b07ef4ec..144f048eb 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -3689,6 +3689,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); |