Closed Bug 806454 Opened 12 years ago Closed 12 years ago

Remove sessionCache code from SessionStore component

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 19

People

(Reporter: bnicholson, Assigned: capella)

Details

Attachments

(1 file)

The sessionCache code in SessionStore.js was used only in XUL Fennec. We don't use it now, so we can remove it.
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
Attached patch Patch (v1)Splinter Review
Seems straightforward ... built and quick tested on my G3 ... still not sure what best tests apply to mobile bugs ... (haven't done any robotests even if they apply) ... nor pushed to try yet ...
Attachment #677028 - Flags: review?(bnicholson)
Comment on attachment 677028 [details] [diff] [review]
Patch (v1)

Looks good. Unfortunately, we don't have any session restore tests right now since (I believe) it's difficult to close and reopen the browser during tests. The best way to test this is open some tabs, force quit Fennec, then reopen Fennec to make sure your tabs restore. Some different things you can try looking at are:

1) If you load a page, force close Fennec, and reopen Fennec within 30 seconds, the session should restore (unless there have been successive crashes; see #3)
2) If you load a page, force close Fennec, and reopen Fennec within 30 seconds, you should go to about:home and see the tabs from last time
3) Fennec keeps track of crashes to prevent an infinite crash situation. The crash counter is reset to 0 when you hit Android the home button. So if you load a page, kill Fennec, reopen Fennec to have your session restored, then kill Fennec again, your session won't restore *if* you don't push home before killing Fennec (i.e., you'd need to do a kill from adb or something similar).
4) We handle restores after OOM kills differently since they should happen as seamlessly as possible. If you want to test OOM kills, you can download https://hg.mozilla.org/users/blassey_mozilla.com/oom-fennec/, push it to your phone, and run it via adb while Fennec is in the background. When you reopen Fennec, your session should always restore, and you should immediately see the page title/tab count/white background when Fennec starts up.
Attachment #677028 - Flags: review?(bnicholson) → review+
(In reply to Brian Nicholson (:bnicholson) from comment #2)
> 2) If you load a page, force close Fennec, and reopen Fennec within 30
> seconds, you should go to about:home and see the tabs from last time

Oops, that should have been:

2) If you load a page, force close Fennec, and reopen Fennec *after* 30 seconds, you should go to about:home and see the tabs from last time
Steps 1-3 behave as expected, so good so far!

Can you provide a few more details re: step # 4? Like, how to build and run a pure .c program under Android? I've looking into this briefly before... is it something Eclipse or intelliJ can handle? I didn't think GCC could do this ... (?)
(In reply to Mark Capella [:capella] from comment #4)
> Steps 1-3 behave as expected, so good so far!
> 
> Can you provide a few more details re: step # 4? Like, how to build and run
> a pure .c program under Android? I've looking into this briefly before... is
> it something Eclipse or intelliJ can handle? I didn't think GCC could do
> this ... (?)

You can just use the oom-fennec binary that's already built:
adb push oom-fennec /data/local/oom-fennec
adb shell /data/local/oom-fennec
(In reply to Mark Capella [:capella] from comment #4)
> Like, how to build and run
> a pure .c program under Android? I've looking into this briefly before... is
> it something Eclipse or intelliJ can handle? I didn't think GCC could do
> this ... (?)

In this case you don't need it, but for future reference you can build pure .c programs using the cross-compiler that comes with the android NDK. For instance I have an eatmem.c program similar to blassey's oom killer at [1] and I build it like so:

~/android/ndk/toolchains/arm-linux-androideabi-4.6.3/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc -o eatmem eatmem.c

The resulting eatmem is an ARM binary that you can push to the device and run using the same steps brian posted above. (Also you may need to run "adb shell chmod 755 /data/local/oom-fennec" in between those two steps to mark it executable).
Thanks for all this!

After 11 months of working with Bugzilla, I finally learned how to hit the "raw" button to download a file ... :P

Also, I did indeed receive a "permission denied" message requiring the chmod ...

Thanks for the tip on use of the NDK compiler ... I remember hearing there was a way to do that but never got that far ... I'd gotten off on a tangent regarding some compiler software called "Sourcery" and never came back ... then I wandered off into building native apps using intelliJ ...

Relevantly, the memtest recovery process also worked just fine ... so I'm moving ahead, pushing to try, and out to inbound over the next day ...

Thanks again - this was fun!
https://hg.mozilla.org/mozilla-central/rev/cc053eb807ce
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
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: