gecko-dev/toolkit/modules/sessionstore
Jan Henning 08bbf2a6e2 Bug 1341417 - Using aFromIdx should skip SHEntry serialisation, not just throw the data away afterwards.r=mikedeboer
When calling SessionHistory.collect(), we can indicate that we're not interested in the first N (where N = aFromIdx + 1) session history entries, with N potentially being a very big number if we don't want any SHEntries at all and are just interested in updating the value of the current history index.

Currently, we always serialise all available SHEntries and then throw away the first N entries, which is wasteful - instead, we should just skip them right away.

We still need to keep track how many entries we actually skipped and how many we could have collected if we wanted to, so
- we can correctly clamp data.index
- if we end up with no entries, figure out whether we simply skipped all of them or else need to create a fallback entry.

MozReview-Commit-ID: DjHnnhK0M9L

--HG--
extra : rebase_source : 510027ecbc18b921c7a7fa5824466113b04057a5
2017-02-21 21:42:08 +01:00
..
FormData.jsm Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN 2016-12-29 18:34:54 -05:00
PrivacyLevel.jsm Bug 1335008 - Part 1 - Move PrivacyLevel.jsm to toolkit. r=mikedeboer 2017-01-31 23:05:31 +01:00
ScrollPosition.jsm Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN 2016-12-29 18:34:54 -05:00
SessionHistory.jsm Bug 1341417 - Using aFromIdx should skip SHEntry serialisation, not just throw the data away afterwards.r=mikedeboer 2017-02-21 21:42:08 +01:00
Utils.jsm Bug 1338009 - Utils#deserializePrincipal should return NullPrincipal if deserialization fails. r=mikedeboer 2017-02-12 11:50:25 +01:00
XPathGenerator.jsm Bug 1284887 - Replaced references to mxr.mozilla.org in the codebase with dxr.mozilla.org r=dolske 2016-08-15 17:28:05 -07:00