Closed Bug 1196159 Opened 7 years ago Closed 7 years ago
.closed returns false after calling Window .close()
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.
It seems we call preventDefault() in DOMWindowClose so that we do not have mIsClosed set immediately. :billm, any thoughts about this bug?
I guess this is actually a webcompat bug. Need to re-triage.
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+
You need to log in before you can comment on or make changes to this bug.