Closed Bug 721577 Opened 12 years ago Closed 12 years ago

Race condition in about:home for tabs from last time

Categories

(Firefox for Android Graveyard :: General, defect, P3)

ARM
Android
defect

Tracking

(firefox11 fixed, fennec+)

RESOLVED FIXED
Firefox 12
Tracking Status
firefox11 --- fixed
fennec + ---

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

Attachments

(1 file)

About:home reads the previous session JSON from sessionstore.js, but sessionstore.js may contain the current session if about:home reads it too late. This isn't much of a problem right now since we always show about:home immediately (meaning sessionstore.js is read before anything is written to it), but this will change when bug 719195 is fixed.
Attached patch patchSplinter Review
Attachment #592000 - Flags: review?(mark.finkle)
Comment on attachment 592000 [details] [diff] [review]
patch

This looks OK, but I wanted to pitch another thought too: Could we check to see if sessionstore.bak exists and use it. If it doesn't, we could use sessionstore.js ?

The only reason I might like that better is we would be using real file existence as a check, not gecko being ready flag - a flag which does not exactly match up on the session store state.

Thoughts?
Priority: -- → P3
tracking-fennec: --- → +
(In reply to Mark Finkle (:mfinkle) from comment #2)
> Comment on attachment 592000 [details] [diff] [review]
> patch
> 
> This looks OK, but I wanted to pitch another thought too: Could we check to
> see if sessionstore.bak exists and use it. If it doesn't, we could use
> sessionstore.js ?
> 
> The only reason I might like that better is we would be using real file
> existence as a check, not gecko being ready flag - a flag which does not
> exactly match up on the session store state.
> 
> Thoughts?

I originally wanted to do this too, but unfortunately, I don't think that will work. It's possible for sessionstore.bak to have stale data from 2 sessions ago. Consider this sequence:

- have tab google.com open; google.com JSON written to sessionstore.js
- quit
- reopen fennec; google.com JSON moved to sessionstore.bak at session store init
- visit tab cnn.com; cnn.com JSON written to sessionstore.js
- browser crashes
- sessionstore.bak contains google.com JSON rather than cnn.com JSON
tracking-fennec: + → ---
Priority: P3 → --
Oops - comment collision accidentally killed your flags.
tracking-fennec: --- → ?
Priority: -- → P3
tracking-fennec: ? → +
Comment on attachment 592000 [details] [diff] [review]
patch

OK, lets see where this gets us
Attachment #592000 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/04e40f6991f6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Brian, please request approval for aurora
Attachment #592000 - Flags: approval-mozilla-aurora?
Comment on attachment 592000 [details] [diff] [review]
patch

[Triage Comment]
Mobile only - approved for Beta 11.
Attachment #592000 - Flags: approval-mozilla-aurora? → approval-mozilla-beta+
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: