IndexedDB: Pass type of error causing abort to IDBTransaction::onAbort
authorjsbell <jsbell@chromium.org>
Mon, 15 Oct 2012 22:19:08 +0000 (22:19 +0000)
committerjsbell <jsbell@chromium.org>
Mon, 15 Oct 2012 22:19:08 +0000 (22:19 +0000)
commit0b8692c1148a6c1fdbf03271217c07968d4106ce
treea6b3465b0673a05e31a3de65776530865524133b
parent3d39e6f51a06899e3d0f32213bb2fde6d652971e
IndexedDB: Pass type of error causing abort to IDBTransaction::onAbort
https://bugs.webkit.org/show_bug.cgi?id=99097

Reviewed by Tony Chang.

Source/WebCore:

Include the error causing the abort in the callback from back end to
front end so it can be exposed on the IDBTransaction.error property.

Test: lazy-index-population.html

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::setVersionInternal):
(WebCore::IDBDatabaseBackendImpl::setIntVersionInternal):
* Modules/indexeddb/IDBDatabaseCallbacks.h:
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::onAbort):
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::abort):
(WebCore):
(WebCore::IDBTransactionBackendImpl::commit):
* Modules/indexeddb/IDBTransactionBackendImpl.h:
(IDBTransactionBackendImpl):
* Modules/indexeddb/IDBTransactionCallbacks.h:
(IDBTransactionCallbacks):
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):

Source/WebKit/chromium:

Plumbing to pass details about the cause of the transaction abort through to the
front end.

* public/WebIDBTransactionCallbacks.h:
(WebKit):
(WebKit::WebIDBTransactionCallbacks::onAbort):
* src/IDBTransactionCallbacksProxy.cpp:
(WebKit::IDBTransactionCallbacksProxy::onAbort):
* src/IDBTransactionCallbacksProxy.h:
(IDBTransactionCallbacksProxy):
* src/WebIDBTransactionCallbacksImpl.cpp:
(WebKit::WebIDBTransactionCallbacksImpl::onAbort):
* src/WebIDBTransactionCallbacksImpl.h:
(WebIDBTransactionCallbacksImpl):

LayoutTests:

Verify that IDBTransaction.error is reporting ConstraintError when indexing fails.

* storage/indexeddb/lazy-index-population-expected.txt:
* storage/indexeddb/lazy-index-population.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/lazy-index-population-expected.txt
LayoutTests/storage/indexeddb/lazy-index-population.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h
Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.h
Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBTransactionCallbacks.h
Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h