Created attachment 793536 [details] window.closed.htm See testcase, after tapping/clicking the first button, the result should be true, but on the b2g browser (and while running mochitests with the emulator), it returns false. This is why: http://mxr.mozilla.org/mozilla-central/source/layout/forms/test/test_bug478219.xhtml is failing on b2g.
This is also not working in Fennec, btw. Should I file a separate bug for that?
Created attachment 8691098 [details] [diff] [review] Possible patch In bug 1196159 I made nsGlobalWindow::FinalClose return early if we're in a child process. For e10s, that means that we don't have to call preventDefault and allows us to set mIsClosed correctly. I thought that I could use the same logic for b2g and fix this bug as well, but sicking mentioned that there might be b2g builds out there that don't use e10s. In that case, this patch won't be sufficient and instead we'll need another mechanism to communicate to nsGlobalWindow that it isn't responsible for closing the window itself. Kan-ru, I figured I'd bring this to your attention in case you have ideas about what to do here.
Attachment #8691098 - Flags: feedback?(kchen)
I don't really have time to finish this, so unassigning myself.
Assignee: mrbkap → nobody
Comment on attachment 8691098 [details] [diff] [review] Possible patch Review of attachment 8691098 [details] [diff] [review]: ----------------------------------------------------------------- Yeah, this doesn't work if the mozbrowser iframe lives in the chrome process. How about adding a chrome only method to mark the window as closed? By the way, the e10s solution has a problem, I think. It marks the window as closed before it is actually closed by the parent side. I'm not sure if this will introduce any inconsistent issue.
Attachment #8691098 - Flags: feedback?(kchen) → feedback+
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
You need to log in before you can comment on or make changes to this bug.