IndexedDB: Raise exception during add/put call if autoIncrement key insertion will...
authorjsbell@chromium.org <jsbell@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Feb 2012 20:00:24 +0000 (20:00 +0000)
committerjsbell@chromium.org <jsbell@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Feb 2012 20:00:24 +0000 (20:00 +0000)
commit2317951c523c95facccf580625cb06026263c743
treef35ffa2e991d6198968f4c276d05a3c8c2e2b01d
parent025fbb69db16b897553285a1d6cbb4b7ea101f81
IndexedDB: Raise exception during add/put call if autoIncrement key insertion will fail
https://bugs.webkit.org/show_bug.cgi?id=77374

Source/WebCore:

If a put request will use a key generator, try inserting a dummy key during the sync
put() call to check if the key insertion will succeed so an exception can be raised
early, rather than deferring to the asynchronous task.

Reviewed by Tony Chang.

Test: storage/indexeddb/keypath-edges.html

* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::put):

LayoutTests:

Reviewed by Tony Chang.

* storage/indexeddb/keypath-edges-expected.txt:
* storage/indexeddb/keypath-edges.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/keypath-edges-expected.txt
LayoutTests/storage/indexeddb/keypath-edges.html
Source/WebCore/ChangeLog
Source/WebCore/storage/IDBObjectStoreBackendImpl.cpp