Closed Bug 1361754 Opened 7 years ago Closed 7 years ago

Navigator propagation on document.open() seems suspect and may not be needed any more

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

Attachments

(1 file, 1 obsolete file)

In nsGlobalWindow::SetNewDocument() we move an existing Navigator object from the old inner window to the new inner window when document.open() is called:

http://searchfox.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#3150

This was added in bug 707749.

This seems problematic to me because while the Navigator's mWindow is updated, any cached DOM objects on the Navigator will still reference the old inner window.

I tried removing this code and we still pass the test added in bug 707749.  It seems maybe we don't need this any more.
Hey look, this makes us pass this WPT test:

/html/dom/dynamic-markup-insertion/opening-the-input-stream/009.html
Blake, it appears we don't need the Navigator propagation any more.  Do you mind reviewing this?  Boris suggested in IRC this is because we have moved to the new webidl bindings.

This also lets us pass a WPT test we were previously failing.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=61451322d284c932c42da4db0117d27cc3cfa17b
Attachment #8864276 - Flags: review?(mrbkap)
Attachment #8864224 - Attachment is obsolete: true
Attachment #8864276 - Flags: review?(mrbkap) → review+
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1937a6c019b4
Don't propagate Navigator object on document.open() any more. r=mrbkap
https://hg.mozilla.org/mozilla-central/rev/1937a6c019b4
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: