diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-10-30 18:42:38 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-10-30 18:42:38 +0100 |
commit | d0da27ef572152d1fdd82a9ac15bd5c23ad68160 (patch) | |
tree | a617d33237e64a1f95a09e40c06a962b586583a1 /dom/base | |
parent | 0f7f961e8894c8408b7fa21bbeba7ac503d372eb (diff) | |
parent | 50ef259a2df60d020ccb02d76dc5aa4835ee319e (diff) | |
download | UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.gz UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.lz UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.xz UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.zip |
Merge branch 'release' into Basilisk-releasev2019.10.31
Diffstat (limited to 'dom/base')
-rw-r--r-- | dom/base/nsGlobalWindow.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index afaa24f09..ec546f068 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -3224,6 +3224,12 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument, newInnerWindow->mLocalStorage = nullptr; newInnerWindow->mSessionStorage = nullptr; + newInnerWindow->mPerformance = nullptr; + + // This must be called after nulling the internal objects because + // we might recreate them here by calling the getter methods, and + // store them into the JS slots. If we null them after, the slot + // values and the objects will be out of sync. newInnerWindow->ClearDocumentDependentSlots(cx); } } else { @@ -3364,10 +3370,16 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument) } mDoc = aDocument; - ClearDocumentDependentSlots(aCx); mFocusedNode = nullptr; mLocalStorage = nullptr; mSessionStorage = nullptr; + mPerformance = nullptr; + + // This must be called after nulling the internal objects because we might + // recreate them here by calling the getter methods, and store them into the JS + // slots. If we null them after, the slot values and the objects will be + // out of sync. + ClearDocumentDependentSlots(aCx); #ifdef DEBUG mLastOpenedURI = aDocument->GetDocumentURI(); |