Closed
Bug 1459298
Opened 6 years ago
Closed 6 years ago
Stop spinning event loop when window closes
Categories
(GeckoView :: General, enhancement, P2)
Tracking
(firefox62 fixed)
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: jchen, Assigned: jchen)
References
Details
Attachments
(1 file)
There are a few places where we can spin the event loop for longer than the window lifetime. We should exit the loop if the window closes so the window can clean up sooner.
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8973684 [details] Bug 1459298 - Stop spinning event loop when window closes; https://reviewboard.mozilla.org/r/242050/#review247900 ::: mobile/android/modules/geckoview/GeckoViewUtils.jsm:307 (Diff revision 1) > - iter.getNext().QueryInterface(Ci.nsIDOMWindow)); > + dispatcher = this.getDispatcherForWindow(win); > if (dispatcher) { > - return dispatcher; > + return [dispatcher, win]; > } > } > - return null; > + return [null, null]; Is there an advantage of returning an array vs. object in this case? ::: mobile/android/modules/geckoview/LoadURIDelegate.jsm:20 (Diff revision 1) > var LoadURIDelegate = { > // Delegate URI loading to the app. > // Return whether the loading has been handled. > - load: function(aEventDispatcher, aUri, aWhere, aFlags, aTriggeringPrincipal) { > + load: function(aWindow, aEventDispatcher, aUri, aWhere, aFlags) { > + if (!aWindow) { > + return false; This shouldn't happen, maybe throw?
Attachment #8973684 -
Flags: review?(esawin) → review+
Assignee | ||
Comment 3•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8973684 [details] Bug 1459298 - Stop spinning event loop when window closes; https://reviewboard.mozilla.org/r/242050/#review247900 > Is there an advantage of returning an array vs. object in this case? I thought array was more convenient, but there's no real advantage afaik. > This shouldn't happen, maybe throw? I think it can (rarely) be null for frame scripts (i.e. `content` can be null in rare cases).
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bd8a65154726 Stop spinning event loop when window closes; r=esawin
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bd8a65154726
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Updated•5 years ago
|
Product: Firefox for Android → GeckoView
Updated•5 years ago
|
Target Milestone: Firefox 62 → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•