Created attachment 8670279 [details] addon_log 1. Open https://addons.mozilla.org 2. Install an addon that requires to restart Firefox (e.g. Stylish, LastPass Password Manager) 3. Tap on restart button when the "restart" doorhanger is displayed Expected result: Firefox restarts and addon is installed Actual result: Nothing happens, user can not use Firefox, only after restarting Firefox from Task Manager Please see attached logs; same thing happens when trying to uninstall the addon
We're running into an error trying to quit the app here: http://hg.mozilla.org/mozilla-central/annotate/89732fcdb0ba/mobile/android/chrome/content/browser.js#l6050 The logic here hasn't changed in a long time, so I suspect something is going wrong in that `quit` implementation.
Jim, did you touch this recently? Could you have a look?
Yeah I can take this.
Created attachment 8671059 [details] [diff] [review] Force restart after installing addon (v1) Right now we pass the "attempt quit" flag when restarting due to installing an addon. However, after bug 1197974, merely attempting to quit is not enough and we have to pass the "force quit" flag.
Comment on attachment 8671059 [details] [diff] [review] Force restart after installing addon (v1) Actually snorp is on PTO
Comment on attachment 8671059 [details] [diff] [review] Force restart after installing addon (v1) Review of attachment 8671059 [details] [diff] [review]: ----------------------------------------------------------------- Sounds reasonable to me.
Does this mean we should also update this BlockListPrompt usage? http://mxr.mozilla.org/mozilla-central/source/mobile/android/components/BlocklistPrompt.js#35 I'm not even sure how to trigger that prompt. This was added in the days of XUL Fennec... mfinkle, do you know if this even works? Also, it would probably be worth documenting that eAttemptQuit just doesn't work on Android, if that's the case now.
Might be worth fixing eAttemptQuit if lots of code are using it. The easiest workaround would be making eAttemptQuit the same as eForceQuit for Android.
(In reply to Jim Chen [:jchen] [:darchons] from comment #8) > Might be worth fixing eAttemptQuit if lots of code are using it. The easiest > workaround would be making eAttemptQuit the same as eForceQuit for Android. A quick grep makes me realize that it's used in a bunch of toolkit code, at least some of which we probably use. So yeah, fixing the eAttemptQuit implementation for Android would probably make more sense.
Created attachment 8671949 [details] [diff] [review] Allow quitting when asked explicitly (v1) This patch fixes the eAttemptQuit flag, and makes the other patch unnecessary. Asking snorp to review since he's coming back next week. Right now we don't allow quitting Fennec when the last nsWindow closes (e.g. when the last GeckoView is destroyed) because we want to keep the Gecko thread running throughout the app process lifetime. However, when we are asked to quit explicitly through nsIAppStartup::Quit, we should release the hold on nsAppStartup and allow quitting to continue.
After trying to install and add-on that requires to restart Firefox, Firefox restarts and the add-on is installed, so: Verified as fixed using: Device: LG G4 (Android 5.1) Build: Firefox for Android 44.0a1 (2015-10-18)