IndexedDB: Add webkitErrorMessage to IDBTransaction
https://bugs.webkit.org/show_bug.cgi?id=104199

Reviewed by Tony Chang.

Source/WebCore:

Don't drop error messages on the floor.

Expose an error message on IDBTransaction to give developers more
information than the opaque error code currently available. This is
exactly what is done in IDBRequest.

Tests - transaction-error.html

* Modules/indexeddb/IDBDatabaseError.h:
(WebCore::IDBDatabaseError::create):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::setError):
(WebCore):
(WebCore::IDBTransaction::webkitErrorMessage):
(WebCore::IDBTransaction::onAbort):
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* Modules/indexeddb/IDBTransaction.idl:

LayoutTests:

Test for webkitErrorMessage in the three circumstances that can
generate one:
1) Bubble from operation error
2) Uncaught exception in operation event handler
3) Asynchronous abort from the backend

And fix a FIXME in the test.

* storage/indexeddb/resources/transaction-error.js:
(testErrorFromRequest.trans.onabort):
(testErrorFromRequest):
(testErrorFromException.trans.onabort):
(testErrorFromException):
(testErrorFromCommit.trans.oncomplete.request.onupgradeneeded.trans.onabort):
(testErrorFromCommit.trans.oncomplete.request.onupgradeneeded):
(testErrorFromCommit.trans.oncomplete):
(testErrorFromCommit):
* storage/indexeddb/transaction-error-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9 files changed