Closed Bug 1170226 Opened 9 years ago Closed 9 years ago

Wrong shistory index collected from pending tabs

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

(Keywords: regression)

Attachments

(1 file)

With the landing of bug 1166757 we removed the duplicate __SS_data cache. This means that also for pending tabs the data that is sent to the child and applied immediately (shistory) is live data. Turns out that for some reason we only restore history entries but set history.index only shortly before we start restoring. If we collect data for a pending tab we might thus get the wrong shistory index (always N-1) instead of the actual index.
Ensured that the test is failing without the patch applied.
Attachment #8613608 - Flags: review?(wmccloskey)
Comment on attachment 8613608 [details] [diff] [review]
0001-Bug-1170226-Restore-correct-shistory-index-when-sett.patch

Review of attachment 8613608 [details] [diff] [review]:
-----------------------------------------------------------------

This looks like a nice simplification. I'm a little confused how we would get a problem though. After the history is restored and before the tab is fully restored, the frame script would have to send up the history data, but why would it do that? Does initial restore step of setting the history data cause us to send an update message from the frame script? I guess that would make sense, although it's an unfortunate redundancy.
Attachment #8613608 - Flags: review?(wmccloskey) → review+
Yes, applying the shistory entries and index fires SHistoryListener notifications and we're redundantly sending those to the parent again. This is unfortunate yeah but also makes the code a little simpler if we don't have to care too much about what has modified shistory :)
https://hg.mozilla.org/mozilla-central/rev/9148fbab0a6c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: