IndexedDB: Handle generated keys up to 2^53
Created attachment 139311 [details] Patch
I noticed this edge case when perusing the spec, and we had many casts to int that prevented us from getting anywhere close to 2^53. dgrogan@, alecflett@ - sanity check?
Comment on attachment 139311 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=139311&action=review LGTM > Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:-605 > -double IDBLevelDBBackingStore::nextAutoIncrementNumber(int64_t databaseId, int64_t objectStoreId) Seems weird that this was ever a double. Do you know why it was?
(In reply to comment #3) > > Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:-605 > > -double IDBLevelDBBackingStore::nextAutoIncrementNumber(int64_t databaseId, int64_t objectStoreId) > > Seems weird that this was ever a double. Do you know why it was? Since it's a number-type key it would be stored as a double (equivalent to JS number). The double->int64 conversion could reasonably be done anywhere along the call stack, but this seemed like the best place.
tony@ - r?
Comment on attachment 139311 [details] Patch Clearing flags on attachment: 139311 Committed r115902: <http://trac.webkit.org/changeset/115902>
All reviewed patches have been landed. Closing bug.
cc1plus: warnings being treated as errors third_party/WebKit/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:686: error: integer constant is too large for 'long' type make: *** [out/Release/obj.target/webcore_remaining/third_party/WebKit/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.o] Error 1 Compie failure on Linux 32 bot. I couldn't get hold of you in time, so I am reverting. Apparently the constant is too large for 32 bit.
Sorry. Probably would compile with L or .0 suffix.
(In reply to comment #9) > Sorry. Probably would compile with L or .0 suffix. ... or more correctly, LL. Verified this with a test app and compiling with gcc -m32. Will re-land shortly.
Created attachment 140045 [details] Patch for landing
Comment on attachment 140045 [details] Patch for landing Clearing flags on attachment: 140045 Committed r115997: <http://trac.webkit.org/changeset/115997>