Closed Bug 789340 Opened 13 years ago Closed 13 years ago

Session store uses wrong tabs from last time

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 18

People

(Reporter: bnicholson, Assigned: bnicholson)

Details

Attachments

(1 file)

STR: 1) Go to about:home and look at tabs from last time 2) Go to http://wikipedia.org 3) Push home and OOM Fennec 4) Reopen Fennec 5) Go to about:home Expected results: Tabs from last time in step 5 will be the same as step 1. Actual results: Tabs from last time shows http://wikipedia.org. This happens because we move sessionstore.js -> sessionstore.bak in SessionStore.init(), and tabs from last time is read from sessionstore.bak. We should only move sessionstore.js -> sessionstore.bak if we crashed (since an OOM-restored session should be treated as the same session before the OOM).
Attachment #659054 - Flags: review?(mark.finkle)
Comment on attachment 659054 [details] [diff] [review] Only move sessionstore.js after a crash >diff --git a/mobile/android/components/SessionStore.js b/mobile/android/components/SessionStore.js > restoreLastSession: function ss_restoreLastSession(aBringToFront, aForceRestore) { > if (!aForceRestore) { I realized I had no idea what aForceRestore == false mean. Can you add a short comment telling us what state causes this if block to be executed? I think you mentioned restart after an OOM. >+ if (sessionFile.exists()) { >+ sessionFile.clone().moveTo(null, this._sessionFileBackup.leafName); >+ sessionFile = this._sessionFileBackup; >+ } Add a comment above this block to let us know why it's important to move the session file here
Attachment #659054 - Flags: review?(mark.finkle) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Following the steps from description after OOM I still get wikipedia.org in tabs from last time on about:home. Build: Firefox 18.0a1 (2012-09-17) Device: Samsung Galaxy Nexus OS: Android 4.1.1
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
These steps work correctly for me - what are you using to OOM Fennec in step 3?
Closing. Please reopen if you can still reproduce.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
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: