Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1649257 [wpt PR 24386] - Indexed DB: Use correct range upper limi…
…t for index iteration, a=testonly Automatic update from web-platform-tests Indexed DB: Use correct range upper limit for index iteration When iterating a forwards, comparisons are done between each record found and the range's bound to know when to stop. There's an special case for reverse cursors where a starting key is needed at the upper end of the range, so the uppermost key in the range is looked up as the starting cursor position. The code to do this for indexes was not guarded by a check for the cursor direction, though. This was harmless for most forward iterations as the uppermost actual key would match the upper bound anyway. But when iterating a cursor over a range in an index, records can change their index keys and thus appear again in the iteration. This would lead to the cursor stopping at what was no longer the actual uppermost key in the range, missing records in the iteration. Add the missing check, and a WPT to verify this behavior. (The code dates back to before 2013, so this is not a recent regression.) Bug: 1091731 Change-Id: I23336ba03d31607607d496fc7e18c28bcf644cf0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274085 Commit-Queue: Joshua Bell <[email protected]> Reviewed-by: enne <[email protected]> Cr-Commit-Position: refs/heads/master@{#783792} -- wpt-commits: 93caf8cf824c75e47a68af9d3000e297139c4974 wpt-pr: 24386
- Loading branch information