Closed Bug 832987 Opened 11 years ago Closed 11 years ago

With "don't keep activities", possible to put the browser in a bad state where no pages load


(Firefox for Android Graveyard :: General, defect)

Not set


(firefox18 affected, firefox19 affected, firefox20 affected, firefox21 fixed)

Firefox 21
Tracking Status
firefox18 --- affected
firefox19 --- affected
firefox20 --- affected
firefox21 --- fixed


(Reporter: kats, Assigned: kats)




(1 file)

On a Galaxy Nexus, enable the developer options and turn on the "don't keep activities" option. Then start FF and immediately tap on the awesomebar to enter a URL. Enter some URL (e.g. and hit ok/go to load it.

Expected results:
Page loads

Actual results:
Nothing loads, and the browser stays on about:home. Furthermore, any other attempts to load pages after this don't work either.

It seems like having the GeckoApp activity get killed in the middle of Gecko startup puts us into a bad state from which we can't recover.
Summary: With "don't keep activities", entering urls in awesome screen doesn't work sometimes → With "don't keep activities", possible to put the browser in a bad state where no pages load
It looks like this is happening because GeckoApp is destroyed when the awesomebar is entered, and so it never receives and processes the Gecko:Ready event. The sLaunchState remains in Launching and so events that are sent to gecko just keep getting tacked onto the pending events list. Yay for updating persistent state from a non-persistent listener/object!
Attached patch PatchSplinter Review
This moves the launch state stuff into GeckoThread, so that the two critical lines in the Gecko:Ready handler can run even if the GeckoApp instance has been destroyed at the time the Gecko:Ready message arrives.
Assignee: nobody → bugmail.mozilla
Attachment #705024 - Flags: review?(cpeterson)
Comment on attachment 705024 [details] [diff] [review]

Review of attachment 705024 [details] [diff] [review]:

Attachment #705024 - Flags: review?(cpeterson) → review+
Try build showed that I forgot to fix BaseTest.blockForGeckoReady's reflection code. Fixed that up and re-pushed to try at - it looks green enough, so landed on m-i:
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.