RESOLVED FIXED 68726
IndexedDB: Null key path gets stored as empty string key path
https://bugs.webkit.org/show_bug.cgi?id=68726
Summary IndexedDB: Null key path gets stored as empty string key path
Joshua Bell
Reported 2011-09-23 13:49:22 PDT
IndexedDB: Null key path gets stored as empty string key path
Attachments
Patch (6.78 KB, patch)
2011-09-23 13:52 PDT, Joshua Bell
no flags
Patch (7.90 KB, patch)
2011-09-23 16:41 PDT, Joshua Bell
no flags
Patch (8.91 KB, patch)
2011-09-26 09:47 PDT, Joshua Bell
no flags
Patch (8.96 KB, patch)
2011-09-26 10:53 PDT, Joshua Bell
no flags
Joshua Bell
Comment 1 2011-09-23 13:52:37 PDT
Joshua Bell
Comment 2 2011-09-23 13:53:59 PDT
Chromium issue is http://code.google.com/p/chromium/issues/detail?id=90635 Tests to detect regressions across browser sessions will be added on the chromium side.
WebKit Review Bot
Comment 3 2011-09-23 14:25:20 PDT
Comment on attachment 108530 [details] Patch Attachment 108530 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9831049
Hans Wennborg
Comment 4 2011-09-23 14:33:03 PDT
Thanks! It will be very nice to get this landed. The storage/indexeddb/migrate-basics.html layout test failed when I tried this locally.
Joshua Bell
Comment 5 2011-09-23 16:41:56 PDT
Joshua Bell
Comment 6 2011-09-23 16:45:37 PDT
Hooray for tests. Ensure we don't try and decode a stop key. Passes the storage layout tests now
WebKit Review Bot
Comment 7 2011-09-23 17:19:59 PDT
Comment on attachment 108558 [details] Patch Attachment 108558 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9831125
David Grogan
Comment 8 2011-09-23 17:31:12 PDT
From that bot: Source/WebCore/storage/IDBLevelDBBackingStore.cpp:225: error: unused variable 'p'
Hans Wennborg
Comment 9 2011-09-26 08:41:48 PDT
Comment on attachment 108558 [details] Patch Looks good, just a couple of nits. View in context: https://bugs.webkit.org/attachment.cgi?id=108558&action=review > Source/WebCore/storage/IDBLevelDBBackingStore.cpp:226 > + ASSERT(p); you want ASSERT_UNUSED(p, p); > Source/WebCore/storage/IDBLevelDBBackingStore.cpp:291 > + hasKeyPath = *it->value().begin(); This works, but I would feel safer if we had specific encode/decode functions for bools. Would you like to add a FIXME about that? > Source/WebCore/storage/IDBLevelDBBackingStore.cpp:409 > + if (!deleteRange(m_currentTransaction.get(), ObjectStoreMetaDataKey::encode(databaseId, objectStoreId, 0), ObjectStoreMetaDataKey::encode(databaseId, objectStoreId, INT64_MAX))) We try to avoid using INT64_MAX in this file by calling various *encodeMaxKey functions instead. You can add a ObjectStoreMetaDataKey::encodeMaxKey(int databaseId, int objectStoreId) function.
Joshua Bell
Comment 10 2011-09-26 09:47:01 PDT
Hans Wennborg
Comment 11 2011-09-26 09:53:00 PDT
(In reply to comment #10) > Created an attachment (id=108681) [details] > Patch LGTM
Joshua Bell
Comment 12 2011-09-26 10:21:24 PDT
Comment on attachment 108681 [details] Patch Tony, can you please review?
Tony Chang
Comment 13 2011-09-26 10:28:26 PDT
Comment on attachment 108681 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108681&action=review > Source/WebCore/storage/IDBLevelDBBackingStore.cpp:215 > +bool checkObjectStoreAndMetaDataType(const LevelDBIterator* it, const Vector<char>& stopKey, int64_t objectStoreId, int64_t metaDataType) Nit: Should this function be static?
Joshua Bell
Comment 14 2011-09-26 10:53:36 PDT
Joshua Bell
Comment 15 2011-09-26 10:54:28 PDT
Comment on attachment 108687 [details] Patch Good call on static function
WebKit Review Bot
Comment 16 2011-09-26 15:21:29 PDT
Comment on attachment 108687 [details] Patch Clearing flags on attachment: 108687 Committed r96007: <http://trac.webkit.org/changeset/96007>
WebKit Review Bot
Comment 17 2011-09-26 15:21:34 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.