Closed Bug 1685807 Opened 2 months ago Closed 2 months ago resetting drops name when loading about:blank to a window which had non-about:blank loaded to it


(Core :: DOM: Core & HTML, defect, P3)




86 Branch
Tracking Status
firefox86 --- fixed


(Reporter: smaug, Assigned: timhuang)


(Depends on 1 open bug)



(2 files)

(This is currently Nightly only, since is enabled only there.)
When about:blank is same origin, I don't think loading it explicitly should reset

Test is in

  1. Click 'Open a noopener window'. A new window opens.
  2. Click 'open another window which has opener pointing to this one'. A new window opens.
  3. Check what is logged at the top of the page, especially see opener's name
  4. Click 'Load about:blank to opener'.
  5. Check what is logged at the top of the page and compare what was there before.
Severity: -- → S3
Priority: -- → P3

We should also test a variant where you set document.domain before step 4 I suppose, in which case you would expect name to be reset.

We might also want to test blob URLs, though as suggested in we might want to force noopener for them so I'm not sure how much I care if we reset name there.

Assignee: nobody → tihuang

This patch changes the checking condition about the cases that we don't
need to reset the It makes the to not be reset
if we load an about:blank page to a window which had loaded a
non-about:blank page.

Also, we take the domain into account when checking the principals of
the ola and new documents. This would make the to be
reset if the document.domain was changed to a cross-origin.

Attachment #9196387 - Attachment description: Bug 1685807 - Part 2: Add a test. r?smaug → Bug 1685807 - Part 2: Add tests including a mochitest and a web platform test. r?smaug
Pushed by
Part 1: Not to reset the if it's navigating to an about:blank page from a non-about:blank page. r=smaug
Part 2: Add tests including a mochitest and a web platform test. r=smaug
Created web-platform-tests PR for changes under testing/web-platform/tests
Depends on: 1687029
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Upstream PR merged by moz-wptsync-bot

Is there a follow-up bug on the Android failures?

I haven't opened it yet. I want to first figure out the root cause of it and then open the bug.

You need to log in before you can comment on or make changes to this bug.