Closed Bug 907795 Opened 11 years ago Closed 6 years ago

Window.closed property doesn't work in b2g

Categories

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

x86
macOS
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: martijn.martijn, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file 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?
Assignee: nobody → mrbkap
Depends on: 1196159
Attached patch Possible patchSplinter Review
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
Closed: 8 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Priority: -- → P3

b2g no longer supported

Status: REOPENED → RESOLVED
Closed: 8 years ago6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: