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