Closed
Bug 978610
Opened 10 years ago
Closed 10 years ago
[e10s] Make window.close() work
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: billm, Assigned: billm)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file, 5 obsolete files)
3.19 KB,
patch
|
Felipe
:
review+
|
Details | Diff | Splinter Review |
I mostly just copies what we do in non-e10s code. See the DOMWindowClose event.
Attachment #8384313 -
Flags: review?(bugs)
Comment 1•10 years ago
|
||
How does b2g deal with this stuff?
Comment 2•10 years ago
|
||
Comment on attachment 8384313 [details] [diff] [review] window-close We need to coordinate this kind of changes with b2g. And have some tests.
Attachment #8384313 -
Flags: review?(bugs) → review-
Comment 3•10 years ago
|
||
Comment on attachment 8384313 [details] [diff] [review] window-close And DOMTabClose is, well, tab specific. We will use remote stuff for other remote browsers too. So perhaps DOMRemoteBrowserClose. Also, isn't that this.tabs.length thing doing the wrong thing here. It prevent us to close the last tab/window. DOMWindowClose doesn't call event.preventDefault which means nsGlobalWindow doesn't try to close itself. I think it would be better to mimic the non-OOP behavior. TabChild could catch DOMWindowClose and forward it synchronously to parent and parent then deals it the same way as it does local DOMWindowClose.
Assignee | ||
Comment 4•10 years ago
|
||
Does this look right?
Attachment #8384313 -
Attachment is obsolete: true
Attachment #8385604 -
Flags: review?(bugs)
Comment 5•10 years ago
|
||
Comment on attachment 8385604 [details] [diff] [review] window-close v2 >+TabParent::RecvCloseWindow() >+{ >+ nsContentUtils::DispatchTrustedEvent(mFrameElement->OwnerDoc(), mFrameElement, >+ NS_LITERAL_STRING("DOMRemoteWindowClose"), >+ true, true); Null check mFrameElement. But this needs a toolkit/ review, since I'm not sure whether calling window.close() is the right thing. I believe BrowserTryToCloseWindow() or closeWindow(some params) should be used. Also, I don't know how b2g app closing works.
Attachment #8385604 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8385604 [details] [diff] [review] window-close v2 > But this needs a toolkit/ review, since I'm not sure whether calling > window.close() is the right thing. > I believe BrowserTryToCloseWindow() or closeWindow(some params) should be used. I don't see where non-e10s code would call those functions, so I don't think we should call them in e10s either. When there's only one tab, the non-e10s code just seems to handle everything in nsGlobalWindow, which I think is what window.close() does.
Attachment #8385604 -
Flags: review+ → review?(felipc)
Assignee | ||
Comment 7•10 years ago
|
||
It turns out this patch does break b2g, so I added a branch to avoid that.
Attachment #8385604 -
Attachment is obsolete: true
Attachment #8385604 -
Flags: review?(felipc)
Attachment #8388978 -
Flags: review?(felipc)
Attachment #8388978 -
Flags: review?(bugs)
Assignee | ||
Comment 8•10 years ago
|
||
Oops, wrong patch.
Attachment #8388978 -
Attachment is obsolete: true
Attachment #8388978 -
Flags: review?(felipc)
Attachment #8388978 -
Flags: review?(bugs)
Attachment #8389001 -
Flags: review?(felipc)
Attachment #8389001 -
Flags: review?(bugs)
Updated•10 years ago
|
Attachment #8389001 -
Flags: review?(felipc) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Getting this patch to work on b2g has really been painful. The IsBrowserOrApp checks didn't work and I don't know why. Anyway, this patch does everything in frontend code. Sorry for the churn, Felipe.
Attachment #8389001 -
Attachment is obsolete: true
Attachment #8389001 -
Flags: review?(bugs)
Attachment #8391381 -
Flags: review?(felipc)
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8391381 [details] [diff] [review] window-close v5 Never mind. This one doesn't work either.
Attachment #8391381 -
Flags: review?(felipc)
Assignee | ||
Comment 11•10 years ago
|
||
This one is really conservative. I don't think there's any way it should affect b2g.
Attachment #8391381 -
Attachment is obsolete: true
Attachment #8391466 -
Flags: review?(felipc)
Comment 12•10 years ago
|
||
Comment on attachment 8391466 [details] [diff] [review] window-close v6 Review of attachment 8391466 [details] [diff] [review]: ----------------------------------------------------------------- do you think bug 924260 needs to be addressed together?
Attachment #8391466 -
Flags: review?(felipc) → review+
Assignee | ||
Comment 13•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/18e9c7c020bd You mean fixing the assertion mentioned in bug 924260? That seems separate I think.
Comment 14•10 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #13) > https://hg.mozilla.org/integration/mozilla-inbound/rev/18e9c7c020bd > > You mean fixing the assertion mentioned in bug 924260? That seems separate I > think. Yeah, I'm just starting to look at sandboxing / e10s stuff, so I'm happy to pick up bug 924260 as a separate piece.
https://hg.mozilla.org/mozilla-central/rev/18e9c7c020bd
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 16•10 years ago
|
||
billm, can you describe how QA can test and verify this fix? Thanks!
Flags: needinfo?(wmccloskey)
Assignee | ||
Comment 17•10 years ago
|
||
We have tests to check this and they're running on tinderbox now, so there's no need to verify.
Flags: needinfo?(wmccloskey)
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•