IndexedDB: Overwriting key in unique index should be possible
Created attachment 103499 [details] Patch
Attachment 103499 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/stor..." exit_code: 1 Source/WebCore/storage/IDBLevelDBBackingStore.cpp:794: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/storage/IDBSQLiteBackingStore.h:65: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/storage/IDBLevelDBBackingStore.h:70: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/storage/IDBBackingStore.h:84: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/storage/IDBSQLiteBackingStore.cpp:678: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 5 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
I noticed this bug when dealing with the unique index stuff recently. David, would you like to take a look? I believe the style bot errors here are bogus...
Comment on attachment 103499 [details] Patch LGTM
Tony, would you like to take a look?
Comment on attachment 103499 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=103499&action=review > LayoutTests/storage/indexeddb/index-unique.html:141 > + request.onsuccess = function() { done(); } Nit: Can you just do request.onsuccess = done; ? >> Source/WebCore/storage/IDBBackingStore.h:84 > > The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Nit: I would give the first IDBKey a name like searchKey to disambiguate it. >> Source/WebCore/storage/IDBLevelDBBackingStore.h:70 >> + virtual bool keyExistsInIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, RefPtr<IDBKey>& foundPrimaryKey); > > The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Ditto. >> Source/WebCore/storage/IDBSQLiteBackingStore.h:65 >> + virtual bool keyExistsInIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, RefPtr<IDBKey>& foundPrimaryKey); > > The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Ditto.
Committed r92950: <http://trac.webkit.org/changeset/92950>
(In reply to comment #6) > (From update of attachment 103499 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=103499&action=review Thanks Tony! > > > LayoutTests/storage/indexeddb/index-unique.html:141 > > + request.onsuccess = function() { done(); } > > Nit: Can you just do request.onsuccess = done; ? Done. > > >> Source/WebCore/storage/IDBBackingStore.h:84 > > > > > The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] > > Nit: I would give the first IDBKey a name like searchKey to disambiguate it. Done. > > >> Source/WebCore/storage/IDBLevelDBBackingStore.h:70 > >> + virtual bool keyExistsInIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, RefPtr<IDBKey>& foundPrimaryKey); > > > > The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] > > Ditto. Done. > > >> Source/WebCore/storage/IDBSQLiteBackingStore.h:65 > >> + virtual bool keyExistsInIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, RefPtr<IDBKey>& foundPrimaryKey); > > > > The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] > > Ditto. Done.