mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Bug 1043106 - part 2 - StorageEvent should have the storageArea of the correct window, r=smaug
This commit is contained in:
parent
c9a4a4a116
commit
f77e8cafae
@ -2677,14 +2677,14 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
||||
if (!aState) {
|
||||
if (reUseInnerWindow) {
|
||||
|
||||
// The storage objects contain the URL of the window. We have to recreate
|
||||
// them when the innerWindow is reused.
|
||||
newInnerWindow->mLocalStorage = nullptr;
|
||||
newInnerWindow->mSessionStorage = nullptr;
|
||||
|
||||
if (newInnerWindow->mDoc != aDocument) {
|
||||
newInnerWindow->mDoc = aDocument;
|
||||
|
||||
// The storage objects contain the URL of the window. We have to
|
||||
// recreate them when the innerWindow is reused.
|
||||
newInnerWindow->mLocalStorage = nullptr;
|
||||
newInnerWindow->mSessionStorage = nullptr;
|
||||
|
||||
if (newInnerWindow->IsDOMBinding()) {
|
||||
WindowBinding::ClearCachedDocumentValue(cx, newInnerWindow);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user