зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1462883 - Performance object must be reset when the inner window changes document, r=bz
This commit is contained in:
Родитель
26b46f82a4
Коммит
4c36f8e23c
|
@ -1691,10 +1691,16 @@ nsGlobalWindowInner::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument)
|
|||
}
|
||||
|
||||
mDoc = aDocument;
|
||||
ClearDocumentDependentSlots(aCx);
|
||||
mFocusedElement = nullptr;
|
||||
mLocalStorage = nullptr;
|
||||
mSessionStorage = nullptr;
|
||||
mPerformance = nullptr;
|
||||
|
||||
// This must be called after nullifying the internal objects because here we
|
||||
// could recreate them, calling the getter methods, and store them into the JS
|
||||
// slots. If we nullify them after, the slot values and the objects will be
|
||||
// out of sync.
|
||||
ClearDocumentDependentSlots(aCx);
|
||||
|
||||
#ifdef DEBUG
|
||||
mLastOpenedURI = aDocument->GetDocumentURI();
|
||||
|
|
|
@ -1920,7 +1920,12 @@ nsGlobalWindowOuter::SetNewDocument(nsIDocument* aDocument,
|
|||
// recreate them when the innerWindow is reused.
|
||||
newInnerWindow->mLocalStorage = nullptr;
|
||||
newInnerWindow->mSessionStorage = nullptr;
|
||||
newInnerWindow->mPerformance = nullptr;
|
||||
|
||||
// This must be called after nullifying the internal objects because
|
||||
// here we could recreate them, calling the getter methods, and store
|
||||
// them into the JS slots. If we nullify them after, the slot values and
|
||||
// the objects will be out of sync.
|
||||
newInnerWindow->ClearDocumentDependentSlots(cx);
|
||||
|
||||
// When replacing an initial about:blank document we call
|
||||
|
|
Загрузка…
Ссылка в новой задаче