IndexedDB: Methods should throw TRANSACTION_INACTIVE_ERR when transaction is complete...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jan 2012 01:02:49 +0000 (01:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jan 2012 01:02:49 +0000 (01:02 +0000)
commitc746851c189914b43c1481d96e1a5ef713e12f32
treef298697f33e12c4b2685ba75c6418e51c3703b6a
parentbe957567dc53ef2a44f5d00da5a3a7792b924363
IndexedDB: Methods should throw TRANSACTION_INACTIVE_ERR when transaction is completed/aborted
https://bugs.webkit.org/show_bug.cgi?id=76108

Source/WebCore:

Updated IDBDatabaseException error codes to match spec (the pre-DOM4 version),
including updated description strings, and changed relevant store and index
methods to raise the expected exception type now that it is detailed in the spec.

Patch by Joshua Bell <jsbell@chromium.org> on 2012-01-11
Reviewed by Tony Chang.

Tests: storage/indexeddb/transaction-basics.html

* storage/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::continueFunction):
(WebCore::IDBCursorBackendImpl::prefetchContinue):
* storage/IDBDatabaseException.cpp:
* storage/IDBDatabaseException.h:
* storage/IDBDatabaseException.idl:
* storage/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::openCursor):
(WebCore::IDBIndexBackendImpl::openKeyCursor):
(WebCore::IDBIndexBackendImpl::count):
(WebCore::IDBIndexBackendImpl::get):
(WebCore::IDBIndexBackendImpl::getKey):
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::get):
(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore::IDBObjectStoreBackendImpl::deleteFunction):
(WebCore::IDBObjectStoreBackendImpl::clear):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::deleteIndex):
(WebCore::IDBObjectStoreBackendImpl::openCursor):
(WebCore::IDBObjectStoreBackendImpl::count):

LayoutTests:

Patch by Joshua Bell <jsbell@chromium.org> on 2012-01-11
Reviewed by Tony Chang.

* storage/indexeddb/constants-expected.txt:
* storage/indexeddb/constants.html:
* storage/indexeddb/deleteIndex-expected.txt:
* storage/indexeddb/deleteIndex.html:
* storage/indexeddb/set_version_queue-expected.txt:
* storage/indexeddb/set_version_queue.html:
* storage/indexeddb/transaction-abort-expected.txt:
* storage/indexeddb/transaction-abort.html:
* storage/indexeddb/transaction-basics-expected.txt:
* storage/indexeddb/transaction-basics.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/constants-expected.txt
LayoutTests/storage/indexeddb/constants.html
LayoutTests/storage/indexeddb/deleteIndex-expected.txt
LayoutTests/storage/indexeddb/deleteIndex.html
LayoutTests/storage/indexeddb/set_version_queue-expected.txt
LayoutTests/storage/indexeddb/set_version_queue.html
LayoutTests/storage/indexeddb/transaction-abort-expected.txt
LayoutTests/storage/indexeddb/transaction-abort.html
LayoutTests/storage/indexeddb/transaction-basics-expected.txt
LayoutTests/storage/indexeddb/transaction-basics.html
Source/WebCore/ChangeLog
Source/WebCore/storage/IDBCursorBackendImpl.cpp
Source/WebCore/storage/IDBDatabaseException.cpp
Source/WebCore/storage/IDBDatabaseException.h
Source/WebCore/storage/IDBDatabaseException.idl
Source/WebCore/storage/IDBIndexBackendImpl.cpp
Source/WebCore/storage/IDBObjectStoreBackendImpl.cpp