Closed Bug 1196159 Opened 4 years ago Closed 4 years ago

[e10s] Window.closed returns false after calling Window.close()

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
e10s m8+ ---
firefox43 --- affected
firefox45 --- fixed

People

(Reporter: xidorn, Assigned: mrbkap)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file testcase
Steps to reproduce:
1. open the testcase in the attachment;
2. click the button "Open Window and Close";
3. wait for 2 seconds

Expected result:
the popup window is closed, and a dialog shows "Is window closed? true"

Actual result:
the popup window is closed, but the dialog shows "Is window closed? false"
This blocks enabling Fullscreen API tests on e10s because the test fullscreen-api-race relies on this.
Blocks: 1191597
Blocks: e10s-tests
tracking-e10s: --- → +
It seems we call preventDefault() in DOMWindowClose so that we do not have mIsClosed set immediately.

:billm, any thoughts about this bug?
Blocks: 924260
Flags: needinfo?(wmccloskey)
Blocks: 1205938
No longer blocks: 1191597
I guess this is actually a webcompat bug. Need to re-triage.
Flags: needinfo?(wmccloskey)
Assignee: nobody → mrbkap
I'll wait for bug 967873 to land, since this will likely be related to that bug.
Depends on: 967873
Attached patch Proposed fixSplinter Review
Using preventDefault is using a very big hammer to avoid trying to close the actual window in the content process (especially because we send a message to the parent to do the actual closing). I thought about adding an API to tell the window that "yes, you're going to close" but that seems like overkill.

Of note here, once we send the DOMWindowClose message manager message, I don't think that the window *can't* close after that, so setting mIsClosed to true should be fine (thanks to bug 967873).
Attachment #8691043 - Flags: review?(wmccloskey)
Attachment #8691043 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/4d8cadcfe408
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.