From d9b204c062c0ee07bc2ee3ad4191f5b26c7c564b Mon Sep 17 00:00:00 2001 From: Ben Kelly Date: Wed, 3 May 2017 13:25:05 -0700 Subject: [PATCH] Bug 1361754 Don't propagate Navigator object on document.open() any more. r=mrbkap --- dom/base/nsGlobalWindow.cpp | 9 --------- .../opening-the-input-stream/009.html.ini | 3 --- 2 files changed, 12 deletions(-) diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 6295b136c076..d9fc5f615495 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -3147,15 +3147,6 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument, if (currentInner && currentInner->GetWrapperPreserveColor()) { if (oldDoc == aDocument) { - // Move the navigator from the old inner window to the new one since - // this is a document.write. This is safe from a same-origin point of - // view because document.write can only be used by the same origin. - newInnerWindow->mNavigator = currentInner->mNavigator; - currentInner->mNavigator = nullptr; - if (newInnerWindow->mNavigator) { - newInnerWindow->mNavigator->SetWindow(newInnerWindow->AsInner()); - } - // Make a copy of the old window's performance object on document.open. // Note that we have to force eager creation of it here, because we need // to grab the current document channel and whatnot before that changes. diff --git a/testing/web-platform/meta/html/dom/dynamic-markup-insertion/opening-the-input-stream/009.html.ini b/testing/web-platform/meta/html/dom/dynamic-markup-insertion/opening-the-input-stream/009.html.ini index 23759ad03b67..3d78b55efd7b 100644 --- a/testing/web-platform/meta/html/dom/dynamic-markup-insertion/opening-the-input-stream/009.html.ini +++ b/testing/web-platform/meta/html/dom/dynamic-markup-insertion/opening-the-input-stream/009.html.ini @@ -1,8 +1,5 @@ [009.html] type: testharness - [document.open replacing singleton navigator] - expected: FAIL - [document.open replacing singleton sessionStorage] expected: FAIL