Test from http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_key_requirements.html?force=1#136 , taking an object store which was created with a keyPath and trying to add() a record with both the key in the first (value) object and in the second (key) argument should throw a DATA_ERR. This behavior is implemented by Mozilla and supported by spec text, namely http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBObjectStore-add . WebKit does not throw any exception.
Created attachment 89680 [details] test case
Created attachment 111982 [details] Patch
Created attachment 111984 [details] Patch
Created attachment 111999 [details] Patch
Sorry for the patch churn on this one. It should be ready for a look now.
Comment on attachment 111999 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=111999&action=review > Source/WebCore/storage/IDBObjectStoreBackendImpl.cpp:142 > + || (!key && !autoIncrement && !hasKeyPath)) { This is pretty hard to parse; can we split them into two if statements? One for the missing key case, and one for the "inline key and explicit key simultaneously" case? LGTM besides that, thanks for fixing.
Created attachment 112202 [details] Patch
Comment on attachment 112202 [details] Patch Split the "if" statement for readability per Hans. Tony, can you give this a look?
Comment on attachment 112202 [details] Patch Clearing flags on attachment: 112202 Committed r98258: <http://trac.webkit.org/changeset/98258>
All reviewed patches have been landed. Closing bug.