Closed Bug 1197974 Opened 4 years ago Closed 4 years ago

Don't exit Gecko on Android even if there's no window

Categories

(Core :: Widget: Android, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(2 files)

No description provided.
Gecko on Android follows the Android app model where it never stops
until it is killed by the system or told explicitly to quit. Therefore,
we should exit Gecko when there is no window or the last window is closed.
Attachment #8652489 - Flags: review?(snorp)
Attachment #8652489 - Flags: review?(snorp) → review+
Comment on attachment 8652489 [details] [diff] [review]
Don't exit Gecko on Android even if there's no window (v1)

Review of attachment 8652489 [details] [diff] [review]:
-----------------------------------------------------------------

As we discussed, you'll need to fix the Browser:Quit implementation in browser.js, but that can be in another patch.
Currently we "quit" by closing the last window, but this bug makes us
not quit Gecko automatically when the last window closes. Therefore we
should force Gecko to quit. This patch also makes our quit code
consistent with the addon restart code at [1], i.e. using
nsIAppShell::Quit to quit and sending the "quit-application-requested"
notification. The previous notification,
"browser-lastwindow-close-requested", appears to only be used on
desktop.

[1] mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js?rev=f61c3cc0eb8b#6287
Attachment #8652980 - Flags: review?(mark.finkle)
Comment on attachment 8652980 [details] [diff] [review]
Force Gecko to exit when explicitly quitting (v1)

I wonder if we should add telemetry for some of our "quit" code paths. It might be nice to know if any of them are ever used. We have a STARTUP enum telemetry probe in Java.
Attachment #8652980 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/007b7970b6c8
https://hg.mozilla.org/mozilla-central/rev/e13fd468953b
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Depends on: 1211919
You need to log in before you can comment on or make changes to this bug.