Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 2735213002: Indexed DB: Ensure large explicit keys consistently max out generator (Closed)

Created:
3 years, 9 months ago by jsbell
Modified:
3 years, 9 months ago
Reviewers:
pwnall
CC:
chromium-reviews, blink-reviews-w3ctests_chromium.org, jam, darin-cc_chromium.org, cmumford, blink-reviews, jsbell+idb_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Indexed DB: Ensure large explicit keys consistently max out generator Background: Stores can have a key generator which generates successive numeric keys. Storing a record with an explicit numeric key adjusts they key generator to produce values above the explicit key. Once the generator hits 2^53 it stops generating new keys (since that's the maximum integer uniquely representable as a JS number). Chrome's logic for certain values above this limit was "wonky". Values above 2^53 would max out the generator. Values above 2^63 and Infinity would be ignored and not adjust the generator, due to relying on undefined double->int64_t casting behavior. Fix to always max out the generator for large values. Also adds web-platform-tests - other implementations are wonky too. :( Also adds some missing test coverage for key injection cases. Spec discussion: https://github.com/w3c/IndexedDB/issues/147 BUG=691754 Review-Url: https://codereview.chromium.org/2735213002 Cr-Commit-Position: refs/heads/master@{#455256} Committed: https://chromium.googlesource.com/chromium/src/+/c4c73fb74bfeedbc41e0fc41f14feed642c6a86b

Patch Set 1 #

Total comments: 10

Patch Set 2 : Incorporate review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -6 lines) Patch
M content/browser/indexed_db/indexed_db_database.cc View 1 4 chunks +13 lines, -6 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/IndexedDB/keygenerator-explicit.html View 1 1 chunk +146 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/IndexedDB/keygenerator-inject.html View 1 1 chunk +119 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (8 generated)
jsbell
pwnall@ - can you review?
3 years, 9 months ago (2017-03-07 19:09:45 UTC) #3
pwnall
LGTM with nits. https://codereview.chromium.org/2735213002/diff/1/content/browser/indexed_db/indexed_db_database.cc File content/browser/indexed_db/indexed_db_database.cc (right): https://codereview.chromium.org/2735213002/diff/1/content/browser/indexed_db/indexed_db_database.cc#newcode1216 content/browser/indexed_db/indexed_db_database.cc:1216: // Maximum integer storable as ECMAScript ...
3 years, 9 months ago (2017-03-07 19:42:41 UTC) #5
jsbell
https://codereview.chromium.org/2735213002/diff/1/content/browser/indexed_db/indexed_db_database.cc File content/browser/indexed_db/indexed_db_database.cc (right): https://codereview.chromium.org/2735213002/diff/1/content/browser/indexed_db/indexed_db_database.cc#newcode1216 content/browser/indexed_db/indexed_db_database.cc:1216: // Maximum integer storable as ECMAScript number. On 2017/03/07 ...
3 years, 9 months ago (2017-03-07 20:27:57 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2735213002/20001
3 years, 9 months ago (2017-03-07 20:28:46 UTC) #10
commit-bot: I haz the power
3 years, 9 months ago (2017-03-07 22:35:22 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/c4c73fb74bfeedbc41e0fc41f14f...

Powered by Google App Engine
This is Rietveld 408576698