IDB: Support "put" In radar as <rdar://problem/15779643>
Created attachment 221829 [details] Patch v1
Attachment 221829 [details] did not pass style-queue: ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:409: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:410: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:80: The parameter name "key" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:122: The parameter name "key" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WebCore/Modules/indexeddb/IDBKeyData.cpp:78: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:78: The parameter name "key" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 29 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 221829 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=221829&action=review Please fix non-Mac builds. > Source/WebCore/Modules/indexeddb/IDBKeyData.cpp:13 > + * THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY I'm not sure if these headers are correct. Did you get it from webkit.org? This says "Apple Inc." in copyright line, but "APPLE, INC." with a comma inside. > Source/WebCore/Modules/indexeddb/IDBKeyData.cpp:69 > +PassRefPtr<IDBKey> IDBKeyData::maybeCreateIDBKey() const maybe? > Source/WebKit2/DatabaseProcess/IndexedDB/IDBSerialization.cpp:57 > +RefPtr<WebCore::SharedBuffer> serializeIDBKey(const WebCore::IDBKey& key) We should have "using namespace WebCore" in this file if we don't yet. > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:396 > +void UniqueIDBDatabase::putRecord(const IDBTransactionIdentifier& identifier, int64_t objectStoreID, const WebCore::IDBKeyData& keyData, const IPC::DataReference& value, int64_t putMode, const Vector<int64_t>& indexIDs, const Vector<Vector<WebCore::IDBKeyData>>& indexKeys, std::function<void(const IDBKeyData&, uint32_t, const String&)> callback) Ditto. > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:409 > + }, [this, callback]() { Hopefully something protects "this" while the request is in progress. > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:528 > + // FIXME: The LevelDB post performs "makeIndexWriters" here. Necessary? "post" looks like a typo.
(In reply to comment #3) > (From update of attachment 221829 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=221829&action=review > > Please fix non-Mac builds. > > > Source/WebCore/Modules/indexeddb/IDBKeyData.cpp:13 > > + * THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY > > I'm not sure if these headers are correct. Did you get it from webkit.org? > > This says "Apple Inc." in copyright line, but "APPLE, INC." with a comma inside. Grabbed from another newly added file. I see there's subtle variations floating around, not sure if any are canonical. I removed the comma. > > > Source/WebCore/Modules/indexeddb/IDBKeyData.cpp:69 > > +PassRefPtr<IDBKey> IDBKeyData::maybeCreateIDBKey() const > > maybe? Definitely might return nullptr to represent a null IDBKey > > > Source/WebKit2/DatabaseProcess/IndexedDB/IDBSerialization.cpp:57 > > +RefPtr<WebCore::SharedBuffer> serializeIDBKey(const WebCore::IDBKey& key) > > We should have "using namespace WebCore" in this file if we don't yet. Okay! > > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:396 > > +void UniqueIDBDatabase::putRecord(const IDBTransactionIdentifier& identifier, int64_t objectStoreID, const WebCore::IDBKeyData& keyData, const IPC::DataReference& value, int64_t putMode, const Vector<int64_t>& indexIDs, const Vector<Vector<WebCore::IDBKeyData>>& indexKeys, std::function<void(const IDBKeyData&, uint32_t, const String&)> callback) > > Ditto. Okay! > > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:409 > > + }, [this, callback]() { > > Hopefully something protects "this" while the request is in progress. Yup, the connection outlives requests. > > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:528 > > + // FIXME: The LevelDB post performs "makeIndexWriters" here. Necessary? > > "post" looks like a typo. Because it is! s/post/port/ Thanks!
Created attachment 221906 [details] EWS run to check the builds
Attachment 221906 [details] did not pass style-queue: ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:409: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 221914 [details] Maybe fix EWS builds
Attachment 221914 [details] did not pass style-queue: ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:409: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
http://trac.webkit.org/changeset/162566