Closed Bug 1576407 Opened 4 months ago Closed 3 months ago

Support returning OOP opener windows from Window.opener

Categories

(Core :: DOM: Navigation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug, Regressed 2 open bugs)

Details

Attachments

(6 files)

This also implies removing nsGlobalWindowOuter::mOpener and getting the opener from the BrowsingContext instead.

This is currently only available on the outer window, but needs to move to
BrowsingContext in order from us to remove redundant opener tracking from the
former.

We currently handler this correctly for the opener stored on the outer window,
but not on the BrowsingContext.

Also adds a legacy GetSameProcessOpener() method for callers which can only
deal with in-process windows and may need to be updated for Fission.

This also sets the fission.rebuild_frameloaders_on_remoteness_change=true
preference for some mochitest directories which require it for cross-process
window.opener to work in top-level windows, and makes a minor change to the
hack in browser_temporary_permissions.js to keep it passing reliably in try
runs.

Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/be7cbc61f825
Part 1 - Add HadOriginalOpener flag to BrowsingContext. r=farre
https://hg.mozilla.org/integration/autoland/rev/08d4c25fc670
Part 2 - Don't set BrowsingContext opener when forcing noopener. r=farre
https://hg.mozilla.org/integration/autoland/rev/0ddbc451dcab
Part 3 - Return window opener as a WindowProxyHolder or BrowsingContext. r=farre
https://hg.mozilla.org/integration/autoland/rev/19bf40067233
Part 4 - Stop storing opener redundantly on nsGlobalWindowOuter. r=farre
https://hg.mozilla.org/integration/autoland/rev/38e4ea431445
Part 5 - Update test expectations to handler cross-process window.opener being available. r=farre
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3b0498064cbf
Follow-up: Ignore window.opener get/set when BrowsingContext is discarded.
Backout by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be74f006fdfd
Backed out 6 changesets for causing wpt and mochitest failures. CLOSED TREE
https://hg.mozilla.org/integration/mozilla-inbound/rev/e5b86d2879a750e68921d9ff8b516ec526a4d5c5
Bug 1576407: Part 1 - Add HadOriginalOpener flag to BrowsingContext. r=farre

https://hg.mozilla.org/integration/mozilla-inbound/rev/97e495f0b3148162bb1ef3bee30656e6104ef390
Bug 1576407: Part 2 - Don't set BrowsingContext opener when forcing noopener. r=farre

https://hg.mozilla.org/integration/mozilla-inbound/rev/b64def9593e40d44971104547356ee7b44a76a44
Bug 1576407: Part 3 - Return window opener as a WindowProxyHolder or BrowsingContext. r=farre

https://hg.mozilla.org/integration/mozilla-inbound/rev/7c55d3338a5b80e77b53ae3e3ed2f06f5331a438
Bug 1576407: Part 4 - Stop storing opener redundantly on nsGlobalWindowOuter. r=farre

https://hg.mozilla.org/integration/mozilla-inbound/rev/79e99efa822e3f6fc1fa483da4104f9211b62946
Bug 1576407: Part 5 - Update test expectations to handler cross-process window.opener being available. r=farre

https://hg.mozilla.org/integration/mozilla-inbound/rev/277b0a847f203afc93edd302f7ad1e9a4d14524c
Bug 1576407: Follow-up: Ignore window.opener get/set when BrowsingContext is discarded. r=nika
https://hg.mozilla.org/integration/mozilla-inbound/rev/e43b42cf9c65b318150af31c960faf91c35a816c
Bug 1576407: Follow-up: Move IsDiscarded check to BrowsingContext::GetOpener. r=nika
Regressions: 1578038
Regressions: 1578041
No longer regressions: 1578038
Regressions: 1578636
Regressions: 1579291
Flags: needinfo?(kmaglione+bmo)
Duplicate of this bug: 1509016
You need to log in before you can comment on or make changes to this bug.