mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 19:47:32 +09:00
Issue #1253 - Reset performance object on navigation
This also addresses clearing of document dependent JS slots which might get out of sync with innerWindow navigation; relevant comments added. This resolves #1253
This commit is contained in:
parent
c87432ab7e
commit
d21dc0f76a
1 changed files with 13 additions and 1 deletions
|
|
@ -3224,6 +3224,12 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
||||||
newInnerWindow->mLocalStorage = nullptr;
|
newInnerWindow->mLocalStorage = nullptr;
|
||||||
newInnerWindow->mSessionStorage = 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);
|
newInnerWindow->ClearDocumentDependentSlots(cx);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3364,10 +3370,16 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument)
|
||||||
}
|
}
|
||||||
|
|
||||||
mDoc = aDocument;
|
mDoc = aDocument;
|
||||||
ClearDocumentDependentSlots(aCx);
|
|
||||||
mFocusedNode = nullptr;
|
mFocusedNode = nullptr;
|
||||||
mLocalStorage = nullptr;
|
mLocalStorage = nullptr;
|
||||||
mSessionStorage = 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
|
#ifdef DEBUG
|
||||||
mLastOpenedURI = aDocument->GetDocumentURI();
|
mLastOpenedURI = aDocument->GetDocumentURI();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue