Remove sessionCache code from SessionStore component

RESOLVED FIXED in Firefox 19

Status

()

Firefox for Android
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bnicholson, Assigned: capella)

Tracking

unspecified
Firefox 19
ARM
Android
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
The sessionCache code in SessionStore.js was used only in XUL Fennec. We don't use it now, so we can remove it.
(Assignee)

Updated

5 years ago
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
(Assignee)

Comment 1

5 years ago
Created attachment 677028 [details] [diff] [review]
Patch (v1)

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)
(Reporter)

Comment 2

5 years ago
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+
(Reporter)

Comment 3

5 years ago
(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
(Assignee)

Comment 4

5 years ago
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 ... (?)
(Reporter)

Comment 5

5 years ago
(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).
[1] https://github.com/staktrace/moz-scripts/blob/master/eatmem.c
(Assignee)

Comment 8

5 years ago
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!
(Assignee)

Comment 9

5 years ago
Push to TRY:

https://tbpl.mozilla.org/?tree=Try&rev=322c65eace25
(Assignee)

Comment 10

5 years ago
On to inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cc053eb807ce
https://hg.mozilla.org/mozilla-central/rev/cc053eb807ce
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
You need to log in before you can comment on or make changes to this bug.