WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 127401
IDB: Support "put"
https://bugs.webkit.org/show_bug.cgi?id=127401
Summary
IDB: Support "put"
Brady Eidson
Reported
2014-01-21 20:32:49 PST
IDB: Support "put" In radar as <
rdar://problem/15779643
>
Attachments
Patch v1
(53.26 KB, patch)
2014-01-21 22:36 PST
,
Brady Eidson
ap
: review+
Details
Formatted Diff
Diff
EWS run to check the builds
(58.40 KB, patch)
2014-01-22 14:47 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Maybe fix EWS builds
(58.42 KB, patch)
2014-01-22 15:13 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2014-01-21 22:36:48 PST
Created
attachment 221829
[details]
Patch v1
WebKit Commit Bot
Comment 2
2014-01-21 22:38:10 PST
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.
Alexey Proskuryakov
Comment 3
2014-01-22 13:56:56 PST
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.
Brady Eidson
Comment 4
2014-01-22 14:44:28 PST
(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!
Brady Eidson
Comment 5
2014-01-22 14:47:08 PST
Created
attachment 221906
[details]
EWS run to check the builds
WebKit Commit Bot
Comment 6
2014-01-22 14:49:26 PST
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.
Brady Eidson
Comment 7
2014-01-22 15:13:42 PST
Created
attachment 221914
[details]
Maybe fix EWS builds
WebKit Commit Bot
Comment 8
2014-01-22 15:15:31 PST
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.
Brady Eidson
Comment 9
2014-01-22 15:44:45 PST
http://trac.webkit.org/changeset/162566
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug