Closed Bug 1434126 Opened 6 years ago Closed 6 years ago

Web Apps keep running after they are killed

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect)

defect
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: jovan.gerodetti, Assigned: droeh)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180125163041

Steps to reproduce:

1. add web.telegram.org to your home screen
2. start the application from your home screen
3. check the console to verify it logs this line "[SW] on message [object Object]"
4. remove the activity from the android activity manger


Actual results:

1. check the console again
2. it continues to log "[SW] on message [object Object]"


Expected results:

Killing the activity should kill the entire instance of the app. No java script should be executed anymore.
Flags: needinfo?(snorp)
Dylan, can you take a look at this? IIRC we sometimes have a long delay for GeckoView.onDetachedFromWindow() to be called, which is the normal way things get cleaned up. We could just call GeckoSession.closeWindow() directly from WebAppActivity.onStop() to help things along, I think.
Flags: needinfo?(snorp) → needinfo?(droeh)
It should be onDestroy rather than onStop, I'm pretty sure. Aside from that I changed closeWindow to log a warning if we try to double-close rather than throwing an exception so that we hopefully don't end up with any crashes if closeWindow somehow gets called on the same GeckoSession somewhere down the line.
Assignee: nobody → droeh
Flags: needinfo?(droeh)
Comment on attachment 8949017 [details] [diff] [review]
Call GeckoSession.closeWindow from onDestroy()

Forgot to flag for review.
Attachment #8949017 - Flags: review?(snorp)
Attachment #8949017 - Flags: review?(snorp) → review+
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa7b76f98931
Call GeckoSession.closeWindow() from onDestroy() in CustomTabsActivity and WebAppActivity. r=snorp
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ced7e4ed2a45
Call GeckoSession.closeWindow() from onDestroy() in CustomTabsActivity and WebAppActivity. r=snorp
https://hg.mozilla.org/mozilla-central/rev/ced7e4ed2a45
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Flags: needinfo?(droeh)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: