<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[193428] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/193428">193428</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-04 11:07:19 -0800 (Fri, 04 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modern IDB: storage/indexeddb/exceptions.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151732
Reviewed by Alex Christensen.
Source/WebCore:
No new tests (At least one failing test now passes).
- Lots of customized exception messages for IDB code to match the text expectations.
- Updates to the test expectations where we can't/won't match them exactly.
- And a couple of little required behavior changes exposed by the test
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBDatabaseException.cpp:
(WebCore::IDBDatabaseException::initializeDescription):
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update):
(WebCore::IDBClient::IDBCursor::advance):
(WebCore::IDBClient::IDBCursor::continueFunction):
(WebCore::IDBClient::IDBCursor::deleteFunction):
* Modules/indexeddb/client/IDBCursorImpl.h:
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::createObjectStore):
(WebCore::IDBClient::IDBDatabase::transaction):
(WebCore::IDBClient::IDBDatabase::deleteObjectStore):
* Modules/indexeddb/client/IDBDatabaseImpl.h:
* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::cmp):
* Modules/indexeddb/client/IDBFactoryImpl.h:
* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::openCursor):
(WebCore::IDBClient::IDBIndex::count):
(WebCore::IDBClient::IDBIndex::doCount):
(WebCore::IDBClient::IDBIndex::openKeyCursor):
(WebCore::IDBClient::IDBIndex::get):
(WebCore::IDBClient::IDBIndex::doGet):
(WebCore::IDBClient::IDBIndex::getKey):
(WebCore::IDBClient::IDBIndex::doGetKey):
* Modules/indexeddb/client/IDBIndexImpl.h:
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::openCursor):
(WebCore::IDBClient::IDBObjectStore::get):
(WebCore::IDBClient::IDBObjectStore::add):
(WebCore::IDBClient::IDBObjectStore::put):
(WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
(WebCore::IDBClient::IDBObjectStore::putOrAdd):
(WebCore::IDBClient::IDBObjectStore::deleteFunction):
(WebCore::IDBClient::IDBObjectStore::clear):
(WebCore::IDBClient::IDBObjectStore::createIndex):
(WebCore::IDBClient::IDBObjectStore::index):
(WebCore::IDBClient::IDBObjectStore::deleteIndex):
(WebCore::IDBClient::IDBObjectStore::count):
(WebCore::IDBClient::IDBObjectStore::doCount):
* Modules/indexeddb/client/IDBObjectStoreImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::result):
(WebCore::IDBClient::IDBRequest::error):
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::objectStore):
(WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBClient::IDBTransaction::abort):
* Modules/indexeddb/client/IDBTransactionImpl.h:
* Modules/indexeddb/legacy/LegacyCursor.cpp:
(WebCore::LegacyCursor::update):
(WebCore::LegacyCursor::continueFunction):
(WebCore::LegacyCursor::deleteFunction):
* Modules/indexeddb/legacy/LegacyCursor.h:
* Modules/indexeddb/legacy/LegacyDatabase.cpp:
(WebCore::LegacyDatabase::createObjectStore):
(WebCore::LegacyDatabase::deleteObjectStore):
(WebCore::LegacyDatabase::transaction):
(WebCore::LegacyDatabase::forceClose):
* Modules/indexeddb/legacy/LegacyDatabase.h:
* Modules/indexeddb/legacy/LegacyFactory.cpp:
(WebCore::LegacyFactory::cmp):
* Modules/indexeddb/legacy/LegacyFactory.h:
* Modules/indexeddb/legacy/LegacyIndex.cpp:
(WebCore::LegacyIndex::openCursor):
(WebCore::LegacyIndex::count):
(WebCore::LegacyIndex::openKeyCursor):
(WebCore::LegacyIndex::get):
(WebCore::LegacyIndex::getKey):
* Modules/indexeddb/legacy/LegacyIndex.h:
* Modules/indexeddb/legacy/LegacyObjectStore.cpp:
(WebCore::LegacyObjectStore::get):
(WebCore::LegacyObjectStore::add):
(WebCore::LegacyObjectStore::put):
(WebCore::LegacyObjectStore::deleteFunction):
(WebCore::LegacyObjectStore::clear):
(WebCore::LegacyObjectStore::createIndex):
(WebCore::LegacyObjectStore::index):
(WebCore::LegacyObjectStore::deleteIndex):
(WebCore::LegacyObjectStore::openCursor):
(WebCore::LegacyObjectStore::count):
* Modules/indexeddb/legacy/LegacyObjectStore.h:
(WebCore::LegacyObjectStore::createIndex):
(WebCore::LegacyObjectStore::count):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::result):
(WebCore::LegacyRequest::error):
(WebCore::LegacyRequest::dispatchEvent):
(WebCore::LegacyRequest::uncaughtExceptionInEventHandler):
* Modules/indexeddb/legacy/LegacyRequest.h:
* Modules/indexeddb/legacy/LegacyTransaction.cpp:
(WebCore::LegacyTransaction::objectStore):
(WebCore::LegacyTransaction::abort):
(WebCore::LegacyTransaction::stop):
* Modules/indexeddb/legacy/LegacyTransaction.h:
* bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMException): For IDBDatabase exceptions, use createWithDescriptionAsMessage
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::createObjectStore):
(WebCore::JSIDBDatabase::transaction):
* bindings/js/JSIDBObjectStoreCustom.cpp:
(WebCore::putOrAdd):
(WebCore::JSIDBObjectStore::createIndex):
* dom/DOMCoreException.h:
(WebCore::DOMCoreException::createWithDescriptionAsMessage): Create an exception whose message
is the description.
(WebCore::DOMCoreException::DOMCoreException):
* dom/ExceptionBase.cpp:
(WebCore::ExceptionBase::ExceptionBase): Add a flag to determine where the message comes from
* dom/ExceptionBase.h:
* dom/make_dom_exceptions.pl:
(generateHeader): Add an IDBDatabaseException type
* inspector/InspectorIndexedDBAgent.cpp:
LayoutTests:
Lots of new wk2-specific expectations to keep Legacy IDB passing for now.
* platform/mac-wk1/TestExpectations:
* platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index5-expected.txt: Added.
* platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index6-expected.txt: Added.
* platform/wk2/imported/w3c/indexeddb/idbcursor_continue_invalid-expected.txt: Added.
* platform/wk2/imported/w3c/indexeddb/idbindex_get7-expected.txt: Added.
* platform/wk2/imported/w3c/indexeddb/idbindex_getKey7-expected.txt: Added.
* platform/wk2/imported/w3c/indexeddb/idbindex_openCursor2-expected.txt: Added.
* platform/wk2/imported/w3c/indexeddb/idbindex_openKeyCursor3-expected.txt: Added.
* platform/wk2/imported/w3c/indexeddb/keypath-expected.txt: Added.
* platform/wk2/storage/indexeddb/aborted-versionchange-closes-expected.txt: Copied from LayoutTests/storage/indexeddb/aborted-versionchange-closes-expected.txt.
* platform/wk2/storage/indexeddb/bad-keypath-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt.
* platform/wk2/storage/indexeddb/basics-expected.txt: Copied from LayoutTests/storage/indexeddb/basics-expected.txt.
* platform/wk2/storage/indexeddb/clear-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/clear-expected.txt.
* platform/wk2/storage/indexeddb/create-and-remove-object-store-expected.txt: Copied from LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt.
* platform/wk2/storage/indexeddb/create-objectstore-basics-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt.
* platform/wk2/storage/indexeddb/cursor-continue-dir-expected.txt: Added.
* platform/wk2/storage/indexeddb/cursor-continue-expected.txt: Added.
* platform/wk2/storage/indexeddb/cursor-finished-expected.txt: Copied from LayoutTests/storage/indexeddb/cursor-finished-expected.txt.
* platform/wk2/storage/indexeddb/cursors-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt.
* platform/wk2/storage/indexeddb/database-basics-expected.txt: Added.
* platform/wk2/storage/indexeddb/deleteIndex-bug110792-expected.txt: Added.
* platform/wk2/storage/indexeddb/index-count-expected.txt: Added.
* platform/wk2/storage/indexeddb/intversion-close-in-oncomplete-expected.txt: Added.
* platform/wk2/storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt: Added.
* platform/wk2/storage/indexeddb/invalid-keys-expected.txt: Added.
* platform/wk2/storage/indexeddb/key-requirements-delete-null-key-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt.
* platform/wk2/storage/indexeddb/key-requirements-inline-and-passed-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt.
* platform/wk2/storage/indexeddb/key-requirements-put-no-key-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt.
* platform/wk2/storage/indexeddb/key-requirements-put-null-key-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt.
* platform/wk2/storage/indexeddb/key-type-array-expected.txt: Added.
* platform/wk2/storage/indexeddb/keypath-arrays-expected.txt: Added.
* platform/wk2/storage/indexeddb/keypath-edges-expected.txt: Added.
* platform/wk2/storage/indexeddb/keyrange-expected.txt: Added.
* platform/wk2/storage/indexeddb/mozilla/clear-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/clear-expected.txt.
* platform/wk2/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt.
* platform/wk2/storage/indexeddb/mozilla/cursors-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt.
* platform/wk2/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt.
* platform/wk2/storage/indexeddb/mozilla/readonly-transactions-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt.
* platform/wk2/storage/indexeddb/object-lookups-in-versionchange-expected.txt: Added.
* platform/wk2/storage/indexeddb/objectstore-count-expected.txt: Added.
* platform/wk2/storage/indexeddb/open-cursor-expected.txt: Added.
* platform/wk2/storage/indexeddb/readonly-transactions-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt.
* platform/wk2/storage/indexeddb/removed-expected.txt: Added.
* platform/wk2/storage/indexeddb/request-result-cache-expected.txt: Added.
* platform/wk2/storage/indexeddb/transaction-abort-expected.txt: Copied from LayoutTests/storage/indexeddb/transaction-abort-expected.txt.
* platform/wk2/storage/indexeddb/transaction-active-flag-expected.txt: Added.
* platform/wk2/storage/indexeddb/transaction-after-close-expected.txt: Added.
* platform/wk2/storage/indexeddb/transaction-read-only-expected.txt: Added.
* platform/wk2/storage/indexeddb/version-change-exclusive-expected.txt: Added.
* storage/indexeddb/aborted-versionchange-closes-expected.txt:
* storage/indexeddb/basics-expected.txt:
* storage/indexeddb/create-and-remove-object-store-expected.txt:
* storage/indexeddb/cursor-finished-expected.txt:
* storage/indexeddb/exceptions-expected.txt:
* storage/indexeddb/modern/createobjectstore-failures-expected.txt:
* storage/indexeddb/modern/double-abort-expected.txt:
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
* storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
* storage/indexeddb/mozilla/bad-keypath-expected.txt:
* storage/indexeddb/mozilla/clear-expected.txt:
* storage/indexeddb/mozilla/create-objectstore-basics-expected.txt:
* storage/indexeddb/mozilla/cursors-expected.txt:
* storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt:
* storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt:
* storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt:
* storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt:
* storage/indexeddb/mozilla/readonly-transactions-expected.txt:
* storage/indexeddb/resources/exceptions.js:
(testObjectStore):
* storage/indexeddb/transaction-abort-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbabortedversionchangeclosesexpectedtxt">trunk/LayoutTests/storage/indexeddb/aborted-versionchange-closes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbbasicsexpectedtxt">trunk/LayoutTests/storage/indexeddb/basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbcreateandremoveobjectstoreexpectedtxt">trunk/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbcursorfinishedexpectedtxt">trunk/LayoutTests/storage/indexeddb/cursor-finished-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbexceptionsexpectedtxt">trunk/LayoutTests/storage/indexeddb/exceptions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncreateobjectstorefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndoubleabortexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbdatabasetransactionfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillabadkeypathexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillaclearexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillacreateobjectstorebasicsexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillacursorsexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillakeyrequirementsdeletenullkeyexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillakeyrequirementsinlineandpassedexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillakeyrequirementsputnokeyexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillakeyrequirementsputnullkeyexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmozillareadonlytransactionsexpectedtxt">trunk/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbresourcesexceptionsjs">trunk/LayoutTests/storage/indexeddb/resources/exceptions.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbtransactionabortexpectedtxt">trunk/LayoutTests/storage/indexeddb/transaction-abort-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorh">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursoridl">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseidl">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseExceptioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactoryh">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactoryidl">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexh">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexidl">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequesth">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestidl">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionidl">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBIndexImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBIndexImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyCursorcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyCursorh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyDatabaseh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyFactorycpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyFactoryh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyIndexcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyIndexh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyRequestcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyRequesth">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyTransactionh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingcpp">trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBDatabaseCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBObjectStoreCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDOMCoreExceptionh">trunk/Source/WebCore/dom/DOMCoreException.h</a></li>
<li><a href="#trunkSourceWebCoredomExceptionBasecpp">trunk/Source/WebCore/dom/ExceptionBase.cpp</a></li>
<li><a href="#trunkSourceWebCoredomExceptionBaseh">trunk/Source/WebCore/dom/ExceptionBase.h</a></li>
<li><a href="#trunkSourceWebCoredommake_dom_exceptionspl">trunk/Source/WebCore/dom/make_dom_exceptions.pl</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp">trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/wk2/imported/</li>
<li>trunk/LayoutTests/platform/wk2/imported/w3c/</li>
<li>trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/</li>
<li><a href="#trunkLayoutTestsplatformwk2importedw3cindexeddbidbcursor_continue_index5expectedtxt">trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index5-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2importedw3cindexeddbidbcursor_continue_index6expectedtxt">trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index6-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2importedw3cindexeddbidbcursor_continue_invalidexpectedtxt">trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_invalid-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2importedw3cindexeddbidbindex_get7expectedtxt">trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_get7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2importedw3cindexeddbidbindex_getKey7expectedtxt">trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_getKey7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2importedw3cindexeddbidbindex_openCursor2expectedtxt">trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_openCursor2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2importedw3cindexeddbidbindex_openKeyCursor3expectedtxt">trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_openKeyCursor3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2importedw3cindexeddbkeypathexpectedtxt">trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/keypath-expected.txt</a></li>
<li>trunk/LayoutTests/platform/wk2/storage/</li>
<li>trunk/LayoutTests/platform/wk2/storage/indexeddb/</li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbabortedversionchangeclosesexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/aborted-versionchange-closes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbbadkeypathexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/bad-keypath-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbbasicsexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbclearexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/clear-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbcreateandremoveobjectstoreexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/create-and-remove-object-store-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbcreateobjectstorebasicsexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/create-objectstore-basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbcursorcontinuedirexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-continue-dir-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbcursorcontinueexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-continue-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbcursorfinishedexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-finished-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbcursorsexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/cursors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbdatabasebasicsexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/database-basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbdeleteIndexbug110792expectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/deleteIndex-bug110792-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbindexcountexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/index-count-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbintversioncloseinoncompleteexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-close-in-oncomplete-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbintversioncloseinupgradeneededexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbinvalidkeysexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/invalid-keys-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbkeyrequirementsdeletenullkeyexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-delete-null-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbkeyrequirementsinlineandpassedexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-inline-and-passed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbkeyrequirementsputnokeyexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-put-no-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbkeyrequirementsputnullkeyexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-put-null-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbkeytypearrayexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/key-type-array-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbkeypatharraysexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/keypath-arrays-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbkeypathedgesexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/keypath-edges-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbkeyrangeexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/keyrange-expected.txt</a></li>
<li>trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/</li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbmozillaclearexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/clear-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbmozillacreateobjectstorebasicsexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbmozillacursorsexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/cursors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbmozillakeyrequirementsdeletenullkeyexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbmozillareadonlytransactionsexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/readonly-transactions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbobjectlookupsinversionchangeexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/object-lookups-in-versionchange-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbobjectstorecountexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/objectstore-count-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbopencursorexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/open-cursor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbreadonlytransactionsexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/readonly-transactions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbremovedexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/removed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbrequestresultcacheexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/request-result-cache-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbtransactionabortexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-abort-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbtransactionactiveflagexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-active-flag-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbtransactionaftercloseexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-after-close-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbtransactionreadonlyexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-read-only-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwk2storageindexeddbversionchangeexclusiveexpectedtxt">trunk/LayoutTests/platform/wk2/storage/indexeddb/version-change-exclusive-expected.txt</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/ChangeLog        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -1,3 +1,83 @@
</span><ins>+2015-12-04 Brady Eidson <beidson@apple.com>
+
+ Modern IDB: storage/indexeddb/exceptions.html fails.
+ https://bugs.webkit.org/show_bug.cgi?id=151732
+
+ Reviewed by Alex Christensen.
+
+ Lots of new wk2-specific expectations to keep Legacy IDB passing for now.
+
+ * platform/mac-wk1/TestExpectations:
+ * platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index5-expected.txt: Added.
+ * platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index6-expected.txt: Added.
+ * platform/wk2/imported/w3c/indexeddb/idbcursor_continue_invalid-expected.txt: Added.
+ * platform/wk2/imported/w3c/indexeddb/idbindex_get7-expected.txt: Added.
+ * platform/wk2/imported/w3c/indexeddb/idbindex_getKey7-expected.txt: Added.
+ * platform/wk2/imported/w3c/indexeddb/idbindex_openCursor2-expected.txt: Added.
+ * platform/wk2/imported/w3c/indexeddb/idbindex_openKeyCursor3-expected.txt: Added.
+ * platform/wk2/imported/w3c/indexeddb/keypath-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/aborted-versionchange-closes-expected.txt: Copied from LayoutTests/storage/indexeddb/aborted-versionchange-closes-expected.txt.
+ * platform/wk2/storage/indexeddb/bad-keypath-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt.
+ * platform/wk2/storage/indexeddb/basics-expected.txt: Copied from LayoutTests/storage/indexeddb/basics-expected.txt.
+ * platform/wk2/storage/indexeddb/clear-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/clear-expected.txt.
+ * platform/wk2/storage/indexeddb/create-and-remove-object-store-expected.txt: Copied from LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt.
+ * platform/wk2/storage/indexeddb/create-objectstore-basics-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt.
+ * platform/wk2/storage/indexeddb/cursor-continue-dir-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/cursor-continue-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/cursor-finished-expected.txt: Copied from LayoutTests/storage/indexeddb/cursor-finished-expected.txt.
+ * platform/wk2/storage/indexeddb/cursors-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt.
+ * platform/wk2/storage/indexeddb/database-basics-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/deleteIndex-bug110792-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/index-count-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/intversion-close-in-oncomplete-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/invalid-keys-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/key-requirements-delete-null-key-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt.
+ * platform/wk2/storage/indexeddb/key-requirements-inline-and-passed-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt.
+ * platform/wk2/storage/indexeddb/key-requirements-put-no-key-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt.
+ * platform/wk2/storage/indexeddb/key-requirements-put-null-key-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt.
+ * platform/wk2/storage/indexeddb/key-type-array-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/keypath-arrays-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/keypath-edges-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/keyrange-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/mozilla/clear-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/clear-expected.txt.
+ * platform/wk2/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt.
+ * platform/wk2/storage/indexeddb/mozilla/cursors-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt.
+ * platform/wk2/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt.
+ * platform/wk2/storage/indexeddb/mozilla/readonly-transactions-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt.
+ * platform/wk2/storage/indexeddb/object-lookups-in-versionchange-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/objectstore-count-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/open-cursor-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/readonly-transactions-expected.txt: Copied from LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt.
+ * platform/wk2/storage/indexeddb/removed-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/request-result-cache-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/transaction-abort-expected.txt: Copied from LayoutTests/storage/indexeddb/transaction-abort-expected.txt.
+ * platform/wk2/storage/indexeddb/transaction-active-flag-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/transaction-after-close-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/transaction-read-only-expected.txt: Added.
+ * platform/wk2/storage/indexeddb/version-change-exclusive-expected.txt: Added.
+ * storage/indexeddb/aborted-versionchange-closes-expected.txt:
+ * storage/indexeddb/basics-expected.txt:
+ * storage/indexeddb/create-and-remove-object-store-expected.txt:
+ * storage/indexeddb/cursor-finished-expected.txt:
+ * storage/indexeddb/exceptions-expected.txt:
+ * storage/indexeddb/modern/createobjectstore-failures-expected.txt:
+ * storage/indexeddb/modern/double-abort-expected.txt:
+ * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
+ * storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
+ * storage/indexeddb/mozilla/bad-keypath-expected.txt:
+ * storage/indexeddb/mozilla/clear-expected.txt:
+ * storage/indexeddb/mozilla/create-objectstore-basics-expected.txt:
+ * storage/indexeddb/mozilla/cursors-expected.txt:
+ * storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt:
+ * storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt:
+ * storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt:
+ * storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt:
+ * storage/indexeddb/mozilla/readonly-transactions-expected.txt:
+ * storage/indexeddb/resources/exceptions.js:
+ (testObjectStore):
+ * storage/indexeddb/transaction-abort-expected.txt:
+
</ins><span class="cx"> 2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Unskip many inspector/debugger tests
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx"> storage/indexeddb/cursor-overloads.html [ Pass ]
</span><span class="cx"> storage/indexeddb/cursor-skip-deleted.html [ Pass ]
</span><span class="cx"> storage/indexeddb/events.html [ Pass ]
</span><ins>+storage/indexeddb/exceptions.html [ Pass ]
</ins><span class="cx"> storage/indexeddb/modern [ Pass ]
</span><span class="cx"> storage/indexeddb/mozilla [ Pass ]
</span><span class="cx"> storage/indexeddb/transaction-abort.html [ Pass ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwk2importedw3cindexeddbidbcursor_continue_index5expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index5-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index5-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index5-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL IDBCursor.continue() - index - iterate using 'prevunique' The data provided does not meet requirements.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2importedw3cindexeddbidbcursor_continue_index6expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index6-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index6-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_index6-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL IDBCursor.continue() - index - iterate using nextunique The data provided does not meet requirements.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2importedw3cindexeddbidbcursor_continue_invalidexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_invalid-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_invalid-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbcursor_continue_invalid-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL IDBCursor.continue() - attempt to call continue two times The data provided does not meet requirements.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2importedw3cindexeddbidbindex_get7expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_get7-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_get7-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_get7-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL IDBIndex.get() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
+ index.get("data");
+ }" threw object "Error: A request was placed against a transaction which i..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2importedw3cindexeddbidbindex_getKey7expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_getKey7-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_getKey7-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_getKey7-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL IDBIndex.getKey() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
+ index.getKey("data");
+ }" threw object "Error: A request was placed against a transaction which i..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2importedw3cindexeddbidbindex_openCursor2expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_openCursor2-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_openCursor2-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_openCursor2-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL IDBIndex.openCursor() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
+ index.openCursor();
+ }" threw object "Error: A request was placed against a transaction which i..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2importedw3cindexeddbidbindex_openKeyCursor3expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_openKeyCursor3-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_openKeyCursor3-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbindex_openKeyCursor3-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL IDBIndex.openKeyCursor() - throw TransactionInactiveError on aborted transaction assert_throws: function "function (){
+ index.openKeyCursor();
+ }" threw object "Error: A request was placed against a transaction which i..." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2importedw3cindexeddbkeypathexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/keypath-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/keypath-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/imported/w3c/indexeddb/keypath-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+
+PASS Keypath - my.key
+FAIL Keypath - my.køi The data provided does not meet requirements.
+PASS Keypath - my.key_ya
+PASS Keypath - public.key$ya
+PASS Keypath - true.$
+PASS Keypath - my._
+PASS Keypath - delete.a7
+PASS Keypath - p.p.p.p.p.p.p.p.p.p.p.p.p.p
+PASS Keypath - str.length
+PASS Keypath - arr.length
+PASS Keypath - length
+PASS Keypath - '' uses value as key
+PASS Keypath - [''] uses value as [key]
+PASS Keypath - ['x', 'y']
+PASS Keypath - [['x'], 'y'] (stringifies)
+PASS Keypath - ['x', {toString->'y'}] (stringifies)
+PASS Keypath - name,type
+PASS Keypath - name,type.name
+PASS Keypath - array loop -> stringify becomes ['']
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbabortedversionchangeclosesexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbabortedversionchangeclosesexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/aborted-versionchange-closes-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/aborted-versionchange-closes-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/aborted-versionchange-closes-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/aborted-versionchange-closes-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+Test that an aborted 'versionchange' transaction closes the connection.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "aborted-versionchange-closes.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname, 1)
+
+prepareDatabase():
+db = event.target.result
+db.createObjectStore('store')
+
+onOpen():
+db = event.target.result
+db.close()
+
+openAgain():
+request = indexedDB.open(dbname, 2)
+
+onUpgradeNeeded():
+db = event.target.result
+transaction = event.target.transaction
+sawTransactionAbort = false
+
+onTransactionAbort():
+sawTransactionAbort = true
+creating a transaction should fail because connection is closed:
+Expecting exception from db.transaction('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+
+onOpenError():
+PASS sawTransactionAbort is true
+creating a transaction should fail because connection is closed:
+Expecting exception from db.transaction('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbbadkeypathexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillabadkeypathexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/bad-keypath-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/bad-keypath-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/bad-keypath-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Test IndexedDB adding property with invalid keypath
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "bad-keypath.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('foo', { keyPath: 'keyPath' });
+request = objectStore.add({ keyPath: 'foo' });
+Expecting exception from request = objectStore.add({});
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbbasicsexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbbasicsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/basics-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/basics-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/basics-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/basics-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+Test IndexedDB's basics.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.open('basics')
+PASS 'result' in request is true
+Expecting exception from request.result
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS 'error' in request is true
+Expecting exception from request.error
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS 'source' in request is true
+PASS request.source is null
+PASS 'transaction' in request is true
+PASS request.transaction is null
+PASS 'readyState' in request is true
+PASS request.readyState is "pending"
+PASS 'onsuccess' in request is true
+PASS request.onsuccess is null
+PASS 'onerror' in request is true
+PASS request.onerror is null
+PASS 'result' in event.target is true
+PASS !!event.target.result is true
+PASS 'error' in event.target is true
+PASS event.target.error is null
+PASS 'source' in event.target is true
+PASS request.source is null
+PASS 'transaction' in event.target is true
+PASS event.target.transaction is null
+PASS 'readyState' in request is true
+PASS event.target.readyState is "done"
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbclearexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillaclearexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/clear-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/clear-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/clear-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+Test IndexedDB's clearing an object store
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "clear.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('foo', { autoIncrement: true });
+request = objectStore.add({});
+Expecting exception from db.transaction('foo').objectStore('foo').clear();
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+db.transaction('foo', 'readwrite')
+transaction.objectStore('foo').clear();
+request = db.transaction('foo').objectStore('foo').openCursor();
+cursor = request.result;
+PASS cursor is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbcreateandremoveobjectstoreexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbcreateandremoveobjectstoreexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/create-and-remove-object-store-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/create-and-remove-object-store-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/create-and-remove-object-store-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+Test IndexedDB's create and removeObjectStore
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "create-and-remove-object-store.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('tmp')
+Expecting exception from db.createObjectStore('tmp')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ConstraintError'
+Exception message: A mutation operation in the transaction failed because a constraint was not satisfied.
+trans = db.transaction(['tmp'])
+trans.objectStore('tmp').get(0)
+PASS event.target.result is undefined.
+Trying create
+Expecting exception from db.createObjectStore("some os")
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+Trying remove
+Expecting exception from db.deleteObjectStore("some os")
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+Trying create with store that already exists
+Expecting exception from db.createObjectStore('tmp')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+Trying remove with store that already exists
+Expecting exception from db.deleteObjectStore('tmp')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbcreateobjectstorebasicsexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillacreateobjectstorebasicsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/create-objectstore-basics-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/create-objectstore-basics-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/create-objectstore-basics-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+Test IndexedDB's creating object store and updating properties
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "create-objectstore-basics.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+Expecting exception from objectStore = db.createObjectStore(info.name, info.options)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_ACCESS_ERR
+Exception message: An invalid operation was performed on an object.
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.keyPath is info.options.keyPath
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.keyPath is info.options.keyPath
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.keyPath is info.options.keyPath
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbcursorcontinuedirexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-continue-dir-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-continue-dir-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-continue-dir-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+Test that continue() calls against cursors are validated by direction.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "cursor-continue-dir.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+store.put(1,1)
+store.put(2,2)
+store.put(3,3)
+store.put(4,4)
+store.put(5,5)
+store.put(6,6)
+store.put(7,7)
+store.put(8,8)
+store.put(9,9)
+store.put(10,10)
+trans = db.transaction('store')
+store = trans.objectStore('store')
+request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'next')
+cursor = request.result
+PASS cursor is non-null.
+Expect DataError if: The parameter is less than or equal to this cursor's position and this cursor's direction is "next" or "nextunique".
+PASS cursor.key is 1
+Expecting exception from cursor.continue(-1)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'prev')
+cursor = request.result
+PASS cursor is non-null.
+Expect DataError if: The parameter is greater than or equal to this cursor's position and this cursor's direction is "prev" or "prevunique".
+PASS cursor.key is 10
+Expecting exception from cursor.continue(11)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbcursorcontinueexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-continue-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-continue-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-continue-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+Test IndexedDB's IDBCursor.continue() with a key parameter.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "cursor-continue.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('someObjectStore')
+objectStore.createIndex('someIndex', 'x')
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+
+indexObject.openKeyCursor(null, 'next')
+PASS event.target.result.primaryKey is 0
+event.target.result.continue(3.14159)
+PASS event.target.result.primaryKey is 3
+event.target.result.continue()
+PASS event.target.result.primaryKey is 4
+event.target.result.continue()
+PASS event.target.result.primaryKey is 5
+event.target.result.continue(12)
+PASS event.target.result.primaryKey is 7
+event.target.result.continue(date)
+PASS event.target.result.primaryKey is 9
+event.target.result.continue()
+PASS event.target.result.primaryKey is 10
+event.target.result.continue()
+PASS event.target.result.primaryKey is 11
+event.target.result.continue('A bit1')
+PASS event.target.result.primaryKey is 14
+event.target.result.continue('A bit3')
+PASS event.target.result.primaryKey is 16
+event.target.result.continue('the BIGGEST string')
+PASS event.target.result.primaryKey is 17
+event.target.result.continue()
+PASS event.target.result is null
+
+indexObject.openKeyCursor(null, 'prev')
+PASS event.target.result.primaryKey is 17
+event.target.result.continue('A bit2')
+PASS event.target.result.primaryKey is 15
+event.target.result.continue()
+PASS event.target.result.primaryKey is 14
+event.target.result.continue(date)
+PASS event.target.result.primaryKey is 10
+event.target.result.continue()
+PASS event.target.result.primaryKey is 9
+event.target.result.continue(1)
+PASS event.target.result.primaryKey is 2
+event.target.result.continue()
+PASS event.target.result.primaryKey is 1
+event.target.result.continue()
+PASS event.target.result.primaryKey is 0
+event.target.result.continue()
+PASS event.target.result is null
+
+indexObject.openKeyCursor(null, 'next')
+PASS event.target.result.primaryKey is 0
+event.target.result.continue(3.14159)
+PASS event.target.result.primaryKey is 3
+Expecting exception from event.target.result.continue(1)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+indexObject.openKeyCursor(null, 'next')
+PASS event.target.result.primaryKey is 0
+event.target.result.continue(3.14159)
+PASS event.target.result.primaryKey is 3
+Expecting exception from event.target.result.continue(3.14159)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+indexObject.openKeyCursor(null, 'prev')
+PASS event.target.result.primaryKey is 17
+event.target.result.continue('A bit2')
+PASS event.target.result.primaryKey is 15
+Expecting exception from event.target.result.continue('A bit3')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+indexObject.openKeyCursor(null, 'prev')
+PASS event.target.result.primaryKey is 17
+event.target.result.continue('A bit2')
+PASS event.target.result.primaryKey is 15
+cursor = event.target.result
+Expecting exception from event.target.result.continue('A bit2')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbcursorfinishedexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbcursorfinishedexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-finished-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/cursor-finished-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-finished-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/cursor-finished-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+Ensure cursor calls behave as expected after cursor has run to the end.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "cursor-finished.html"
+
+prepareDatabase():
+indexedDB.deleteDatabase(dbname)
+
+onDeleteSuccess():
+indexedDB.open(dbname, 1)
+
+onUpgradeNeeded():
+db = event.target.result
+store = db.createObjectStore('store')
+store.put(1, 1)
+store.put(2, 2)
+
+onOpenSuccess():
+db = event.target.result
+transaction = db.transaction('store', 'readwrite')
+store = transaction.objectStore('store')
+count = 0
+cursorRequest = store.openCursor()
+
+onCursorSuccess():
+cursor = event.target.result
+PASS cursor is non-null.
+count++
+savedCursor = cursor
+cursor.continue()
+
+onCursorSuccess():
+cursor = event.target.result
+PASS cursor is non-null.
+count++
+savedCursor = cursor
+cursor.continue()
+
+onCursorSuccess():
+cursor = event.target.result
+PASS cursor is null
+PASS savedCursor is non-null.
+
+Expecting exception from savedCursor.update('value')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+Expecting exception from savedCursor.advance(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+Expecting exception from savedCursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+Expecting exception from savedCursor.continue('key')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+Expecting exception from savedCursor.delete()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbcursorsexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillacursorsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/cursors-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/cursors-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/cursors-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,609 @@
</span><ins>+Test IndexedDB cursor behavior
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "cursors.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('autoIncrement', { autoIncrement: true });
+request = objectStore.openCursor();
+PASS event.target.result is null
+db.createObjectStore('autoIncrementKeyPath', { keyPath: 'foo', autoIncrement: true });
+request = objectStore.openCursor();
+PASS event.target.result is null
+db.createObjectStore('keyPath', { keyPath: 'foo' });
+request = objectStore.openCursor();
+PASS event.target.result is null
+db.createObjectStore('foo');
+request = objectStore.openCursor();
+PASS event.target.result is null
+keys = [1, -1, 0, 10, 2000, 'q', 'z', 'two', 'b', 'a'];
+sortedKeys = [-1, 0, 1, 10, 2000, 'a', 'b', 'q', 'two', 'z'];
+keyIndex = 0;
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS keyIndex is keys.length
+keyIndex = 4;
+range = IDBKeyRange.bound(2000, 'q');
+request = objectStore.openCursor(range);
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS keyIndex is 8
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue('b');
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS keyIndex is keys.length
+keyIndex = 0;
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue(10);
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS keyIndex is keys.length
+keyIndex = 0;
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue('c');
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1 : 7;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1 : 7;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1 : 7;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1 : 7;
+cursor = event.target.result;
+PASS keyIndex is keys.length
+keyIndex = 0;
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+request = cursor.update('bar');
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS keyIndex is keys.length
+request = objectStore.get(sortedKeys[4]);
+PASS event.target.result is 'bar'
+request = objectStore.put('foo', sortedKeys[4]);
+keyIndex = 0;
+request = objectStore.openCursor(null, 'next');
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+request = cursor.delete();
+keyIndex++;
+cursor.continue();
+PASS keyIndex is 5
+gotRemoveEvent = true;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS keyIndex is keys.length
+PASS gotRemoveEvent is true
+request = objectStore.get(sortedKeys[4]);
+PASS event.target.result is undefined
+request = objectStore.add('foo', sortedKeys[4]);
+request = objectStore.openCursor(null, 'prev');
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS keyIndex is -1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbdatabasebasicsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/database-basics-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/database-basics-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/database-basics-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+Test the basics of IndexedDB's IDBDatabase.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "database-basics.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Test that you can't open a transaction while in a versionchange transaction
+Expecting exception from db.transaction("doesntExist")
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS db.version is 1
+PASS db.name is "database-basics.html"
+PASS db.objectStoreNames is []
+PASS db.objectStoreNames.length is 0
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames[0] is undefined.
+PASS db.objectStoreNames.item(0) is null
+db.createObjectStore("test123")
+PASS db.objectStoreNames is ['test123']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames.contains('test456') is false
+PASS db.objectStoreNames.contains('test123') is true
+db.close()
+request = indexedDB.open(dbname, 2)
+db = event.target.result
+PASS db.version is 2
+PASS db.name is "database-basics.html"
+PASS db.objectStoreNames is ['test123']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames.contains('test456') is false
+PASS db.objectStoreNames.contains('test123') is true
+db.createObjectStore("test456")
+setVersionTrans = event.target.transaction
+PASS setVersionTrans is non-null.
+setVersionTrans.abort()
+PASS db.version is 1
+PASS db.objectStoreNames is ['test123']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames.contains('test456') is false
+PASS db.objectStoreNames.contains('test123') is true
+db.close()
+Now that the connection is closed, transaction creation should fail
+Expecting exception from db.transaction('test123')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+Call twice, make sure it's harmless
+db.close()
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbdeleteIndexbug110792expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/deleteIndex-bug110792-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/deleteIndex-bug110792-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/deleteIndex-bug110792-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+Ensure IndexedDB's IDBObjectStore.deleteIndex() works if IDBIndex object has not been fetched - regression test for bug 110792.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "deleteIndex-bug110792.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname, 1)
+
+onFirstUpgradeNeeded():
+db = event.target.result
+store = db.createObjectStore('store')
+store.createIndex('index', 'keyPath')
+
+closeAndReOpen():
+db.close()
+
+indexedDB.open(dbname, 2)
+
+onSecondUpgradeNeeded():
+db = event.target.result
+store = event.target.transaction.objectStore('store')
+store.deleteIndex('index')
+Expecting exception from store.index('index')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: An operation failed because the requested database object could not be found.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbindexcountexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/index-count-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/index-count-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/index-count-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,120 @@
</span><ins>+Test IndexedDB's IDBIndex.count().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "index-count.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('storeName', null)
+store.createIndex('indexName', '')
+PASS store.indexNames.contains('indexName') is true
+adding 0 ... 99
+
+verifying count without range
+trans = db.transaction('storeName', 'readonly')
+PASS trans is non-null.
+store = trans.objectStore('storeName')
+PASS store is non-null.
+index = store.index('indexName')
+PASS index is non-null.
+request = index.count()
+PASS typeof request.result is "number"
+PASS request.result is 100
+
+verifying count with range
+trans = db.transaction('storeName', 'readonly')
+PASS trans is non-null.
+store = trans.objectStore('storeName')
+PASS store is non-null.
+index = trans.objectStore('storeName').index('indexName')
+PASS index is non-null.
+
+test = {"lower":0,"lowerOpen":false,"upper":99,"upperOpen":false,"expected":100}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 100
+
+test = {"lower":0,"lowerOpen":true,"upper":99,"upperOpen":false,"expected":99}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 99
+
+test = {"lower":0,"lowerOpen":false,"upper":99,"upperOpen":true,"expected":99}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 99
+
+test = {"lower":0,"lowerOpen":true,"upper":99,"upperOpen":true,"expected":98}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 98
+
+test = {"lower":0,"lowerOpen":false,"upper":100,"upperOpen":false,"expected":100}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 100
+
+test = {"lower":0,"lowerOpen":false,"upper":100,"upperOpen":false,"expected":100}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 100
+
+test = {"lower":10,"lowerOpen":false,"upper":100,"upperOpen":false,"expected":90}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 90
+
+test = {"lower":0,"lowerOpen":false,"upper":0,"upperOpen":false,"expected":1}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 1
+
+test = {"lower":500,"lowerOpen":false,"upper":500,"upperOpen":false,"expected":0}
+request = index.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 0
+
+verifying count with key
+trans = db.transaction('storeName', 'readonly')
+PASS trans is non-null.
+store = trans.objectStore('storeName')
+PASS store is non-null.
+index = trans.objectStore('storeName').index('indexName')
+PASS index is non-null.
+Expecting exception from index.count(NaN)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from index.count({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from index.count(/regex/)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+test = {"key":0,"expected":1}
+request = index.count(test.key)
+PASS typeof request.result is "number"
+PASS request.result is 1
+
+test = {"key":100,"expected":0}
+request = index.count(test.key)
+PASS typeof request.result is "number"
+PASS request.result is 0
+
+test = {"key":null,"expected":100}
+request = index.count(test.key)
+PASS typeof request.result is "number"
+PASS request.result is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbintversioncloseinoncompleteexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-close-in-oncomplete-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-close-in-oncomplete-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-close-in-oncomplete-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+Call db.close() in the complete handler for a version change transaction, before the success event associated with the open call fires
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "intversion-close-in-oncomplete.html"
+indexedDB.deleteDatabase(dbname)
+request = indexedDB.open(dbname, 7)
+
+upgradeNeeded():
+db = event.target.result
+PASS event.newVersion is 7
+db.createObjectStore('os')
+transaction = event.target.transaction
+
+transaction.oncomplete:
+sawTransactionComplete = true
+db.close()
+
+openError():
+PASS sawTransactionComplete is true
+PASS event.target.result is null
+PASS event.target.error.name is "AbortError"
+Expecting exception from transaction = db.transaction('os', 'readwrite')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbintversioncloseinupgradeneededexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+Test that when db.close is called in upgradeneeded, the db is cleaned up on refresh.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "intversion-close-in-upgradeneeded.html"
+indexedDB.deleteDatabase(dbname)
+request = indexedDB.open(dbname, 7)
+
+
+upgradeNeeded():
+db = event.target.result
+PASS event.newVersion is 7
+transaction = event.target.transaction
+db.createObjectStore('os')
+db.close()
+
+transaction.oncomplete:
+sawTransactionComplete = true
+
+openError():
+PASS sawTransactionComplete is true
+PASS event.target.error.name is 'AbortError'
+PASS event.result is undefined
+
+Verify that the old connection is unchanged and was closed:
+PASS db is non-null.
+PASS db.version is 7
+Expecting exception from db.transaction('os')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbinvalidkeysexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/invalid-keys-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/invalid-keys-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/invalid-keys-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,95 @@
</span><ins>+Test IndexedDB invalid keys
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "invalid-keys.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('foo');
+Expecting exception from request = objectStore.put('value', void 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', null)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', (function() { return arguments; }()))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', true)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', false)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', new Error)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', function () {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', JSON)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', Math)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', NaN)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', new Date(NaN))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', /regex/)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', self)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', self.document)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from request = objectStore.put('value', self.document.body)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbkeyrequirementsdeletenullkeyexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillakeyrequirementsdeletenullkeyexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-delete-null-key-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-delete-null-key-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-delete-null-key-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test IndexedDB's behavior deleting entry with no key
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "key-requirements-delete-null-key.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('bar');
+Expecting exception from objectStore.delete(null);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbkeyrequirementsinlineandpassedexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillakeyrequirementsinlineandpassedexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-inline-and-passed-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-inline-and-passed-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-inline-and-passed-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test IndexedDB's behavior adding inline and passed key simultaneously
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "key-requirements-inline-and-passed.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('baz', { keyPath: 'id' });
+Expecting exception from objectStore.add({id: 5}, 5);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbkeyrequirementsputnokeyexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillakeyrequirementsputnokeyexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-put-no-key-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-put-no-key-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-put-no-key-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test IndexedDB's behavior puting without key
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "key-requirements-put-no-key.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('bar');
+Expecting exception from objectStore.put({});
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbkeyrequirementsputnullkeyexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillakeyrequirementsputnullkeyexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-put-null-key-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-put-null-key-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/key-requirements-put-null-key-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test IndexedDB's behavior put()ing with null key
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "key-requirements-put-null-key.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('bar');
+Expecting exception from objectStore.put({}, null);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbkeytypearrayexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/key-type-array-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/key-type-array-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/key-type-array-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,291 @@
</span><ins>+Test IndexedDB key types
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "key-type-array.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('store');
+
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store')
+
+long_array = []; for (i = 0; i < 1000; ++i) { long_array.push('abc', 123, new Date(0), []); }
+
+array that contains non-numeric self-reference
+self_referrential_array = []; self_referrential_array.self = self_referrential_array;
+
+testing array key: []
+store.put('value1', []);
+store.get([]);
+PASS getreq.result is "value1"
+
+testing array key: [-Infinity]
+store.put('value2', [-Infinity]);
+store.get([-Infinity]);
+PASS getreq.result is "value2"
+
+testing array key: [-Number.MAX_VALUE]
+store.put('value3', [-Number.MAX_VALUE]);
+store.get([-Number.MAX_VALUE]);
+PASS getreq.result is "value3"
+
+testing array key: [-1]
+store.put('value4', [-1]);
+store.get([-1]);
+PASS getreq.result is "value4"
+
+testing array key: [-Number.MIN_VALUE]
+store.put('value5', [-Number.MIN_VALUE]);
+store.get([-Number.MIN_VALUE]);
+PASS getreq.result is "value5"
+
+testing array key: [0]
+store.put('value6', [0]);
+store.get([0]);
+PASS getreq.result is "value6"
+
+testing array key: [Number.MIN_VALUE]
+store.put('value7', [Number.MIN_VALUE]);
+store.get([Number.MIN_VALUE]);
+PASS getreq.result is "value7"
+
+testing array key: [1]
+store.put('value8', [1]);
+store.get([1]);
+PASS getreq.result is "value8"
+
+testing array key: [Number.MAX_VALUE]
+store.put('value9', [Number.MAX_VALUE]);
+store.get([Number.MAX_VALUE]);
+PASS getreq.result is "value9"
+
+testing array key: [Infinity]
+store.put('value10', [Infinity]);
+store.get([Infinity]);
+PASS getreq.result is "value10"
+
+testing array key: [1,2,3]
+store.put('value11', [1,2,3]);
+store.get([1,2,3]);
+PASS getreq.result is "value11"
+
+testing array key: [new Date(0)]
+store.put('value12', [new Date(0)]);
+store.get([new Date(0)]);
+PASS getreq.result is "value12"
+
+testing array key: [new Date('2525-01-01T00:00:00Z')]
+store.put('value13', [new Date('2525-01-01T00:00:00Z')]);
+store.get([new Date('2525-01-01T00:00:00Z')]);
+PASS getreq.result is "value13"
+
+testing array key: [new Date(0), new Date('2525-01-01T00:00:00Z')]
+store.put('value14', [new Date(0), new Date('2525-01-01T00:00:00Z')]);
+store.get([new Date(0), new Date('2525-01-01T00:00:00Z')]);
+PASS getreq.result is "value14"
+
+testing array key: ['']
+store.put('value15', ['']);
+store.get(['']);
+PASS getreq.result is "value15"
+
+testing array key: ['']
+store.put('value16', ['']);
+store.get(['']);
+PASS getreq.result is "value16"
+
+testing array key: ['abc123']
+store.put('value17', ['abc123']);
+store.get(['abc123']);
+PASS getreq.result is "value17"
+
+testing array key: ['abc', 123]
+store.put('value18', ['abc', 123]);
+store.get(['abc', 123]);
+PASS getreq.result is "value18"
+
+testing array key: [[]]
+store.put('value19', [[]]);
+store.get([[]]);
+PASS getreq.result is "value19"
+
+testing array key: [[], []]
+store.put('value20', [[], []]);
+store.get([[], []]);
+PASS getreq.result is "value20"
+
+testing array key: [[], [], []]
+store.put('value21', [[], [], []]);
+store.get([[], [], []]);
+PASS getreq.result is "value21"
+
+testing array key: [[[]]]
+store.put('value22', [[[]]]);
+store.get([[[]]]);
+PASS getreq.result is "value22"
+
+testing array key: [[[[]]]]
+store.put('value23', [[[[]]]]);
+store.get([[[[]]]]);
+PASS getreq.result is "value23"
+
+testing array key: [123, 'abc', new Date(0), []]
+store.put('value24', [123, 'abc', new Date(0), []]);
+store.get([123, 'abc', new Date(0), []]);
+PASS getreq.result is "value24"
+
+testing array key: [[123, 'abc', new Date(0), []], [456, 'def', new Date(999), [[]]]]
+store.put('value25', [[123, 'abc', new Date(0), []], [456, 'def', new Date(999), [[]]]]);
+store.get([[123, 'abc', new Date(0), []], [456, 'def', new Date(999), [[]]]]);
+PASS getreq.result is "value25"
+
+testing array key: long_array
+store.put('value26', long_array);
+store.get(long_array);
+PASS getreq.result is "value26"
+
+testing array key: self_referrential_array
+store.put('value27', self_referrential_array);
+store.get(self_referrential_array);
+PASS getreq.result is "value27"
+
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store')
+
+array that contains itself: array = [ array ]
+cyclic_array = []; cyclic_array.push(cyclic_array)
+array that contains itself, one level down: array = [ [ array ] ]
+cyclic_array2 = []; cyclic_array2.push([cyclic_array2])
+array that contains itself, not as first element: array = [1, 'b', [], array]
+cyclic_array3 = [1, 'b', []]; cyclic_array3.push(cyclic_array3)
+array that contains array that contains itself
+cyclic_array4 = [cyclic_array];
+
+testing invalid array key: [ void 0 ]
+Expecting exception from store.put('value', [ void 0 ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ true ]
+Expecting exception from store.put('value', [ true ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ false ]
+Expecting exception from store.put('value', [ false ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ NaN ]
+Expecting exception from store.put('value', [ NaN ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ null ]
+Expecting exception from store.put('value', [ null ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ {} ]
+Expecting exception from store.put('value', [ {} ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ function () {} ]
+Expecting exception from store.put('value', [ function () {} ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ /regex/ ]
+Expecting exception from store.put('value', [ /regex/ ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ self ]
+Expecting exception from store.put('value', [ self ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ self.document ]
+Expecting exception from store.put('value', [ self.document ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: [ self.document.body ]
+Expecting exception from store.put('value', [ self.document.body ]);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: cyclic_array
+Expecting exception from store.put('value', cyclic_array);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: cyclic_array2
+Expecting exception from store.put('value', cyclic_array2);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: cyclic_array3
+Expecting exception from store.put('value', cyclic_array3);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: cyclic_array4
+Expecting exception from store.put('value', cyclic_array4);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+testing invalid array key: Array(1000)
+Expecting exception from store.put('value', Array(1000));
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+PASS indexedDB.cmp(makeArrayOfDepth(25), 0) is 1
+PASS indexedDB.cmp(makeArrayOfDepth(250), 0) is 1
+Expecting exception from indexedDB.cmp(makeArrayOfDepth(2500), 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbkeypatharraysexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/keypath-arrays-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/keypath-arrays-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/keypath-arrays-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+Test IndexedDB Array-type keyPaths
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "keypath-arrays.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store', {keyPath: ['a', 'b']})
+store.createIndex('index', ['c', 'd'])
+Expecting exception from db.createObjectStore('store-with-generator', {keyPath: ['a', 'b'], autoIncrement: true})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_ACCESS_ERR
+Exception message: An invalid operation was performed on an object.
+Expecting exception from store.createIndex('index-multientry', ['e', 'f'], {multiEntry: true})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_ACCESS_ERR
+Exception message: An invalid operation was performed on an object.
+
+Empty arrays are not valid key paths:
+Expecting exception from db.createObjectStore('store-keypath-empty-array', {keyPath: []})
+PASS Exception was thrown.
+PASS code is DOMException.SYNTAX_ERR
+Exception message: The keypath argument contains an invalid key path.
+Expecting exception from store.createIndex('index-keypath-empty-array', [])
+PASS Exception was thrown.
+PASS code is DOMException.SYNTAX_ERR
+Exception message: The keypath argument contains an invalid key path.
+
+testKeyPaths():
+transaction = db.transaction(['store'], 'readwrite')
+store = transaction.objectStore('store')
+index = store.index('index')
+
+request = store.put({a: 1, b: 2, c: 3, d: 4})
+request = store.put({a: 5, b: 6, c: 7, d: 8})
+request = store.openCursor()
+cursor = request.result
+PASS cursor is non-null.
+PASS JSON.stringify(cursor.key) is "[1,2]"
+cursor = request.result
+PASS cursor is non-null.
+PASS JSON.stringify(cursor.key) is "[5,6]"
+request = index.openCursor()
+cursor = request.result
+PASS cursor is non-null.
+PASS JSON.stringify(cursor.primaryKey) is "[1,2]"
+PASS JSON.stringify(cursor.key) is "[3,4]"
+cursor = request.result
+PASS cursor is non-null.
+PASS JSON.stringify(cursor.primaryKey) is "[5,6]"
+PASS JSON.stringify(cursor.key) is "[7,8]"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbkeypathedgesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/keypath-edges-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/keypath-edges-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/keypath-edges-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+Test IndexedDB keyPath edge cases
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "keypath-edges.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('store-with-path', {keyPath: 'foo'})
+db.createObjectStore('store-with-path-and-generator', {keyPath: 'foo', autoIncrement: true})
+
+testKeyPaths():
+transaction = db.transaction(['store-with-path'], 'readwrite')
+store = transaction.objectStore('store-with-path')
+
+Key path doesn't resolve to a value; should yield null, should throw DATA_ERR
+Expecting exception from store.put(null)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+Key path doesn't resolve to a value; should yield null, should throw DATA_ERR
+Expecting exception from store.put({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+Key path resolves to a value that is invalid key; should yield 'invalid' key, should throw DATA_ERR
+Expecting exception from store.put({foo: null})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+Key path resolves to a value that is valid key; should yield 'string' key, should succeed
+store.put({foo: 'zoo'})
+PASS store.put succeeded
+
+testKeyPathsAndGenerator():
+transaction = db.transaction(['store-with-path-and-generator'], 'readwrite')
+store = transaction.objectStore('store-with-path-and-generator')
+
+Key path doesn't resolve to a value; should yield null but insertion would fail, so put request should raise exception
+Expecting exception from store.put(null)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+Key path doesn't resolve to a value; should yield null but insertion would fail, so put request should raise exception
+Expecting exception from store.put('string')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+Key path doesn't resolve to a value; should yield null, key should be generated, put request should succeed
+store.put({})
+PASS store.put succeeded
+
+Key path resolves to a value that is invalid key; should yield 'invalid' key, should throw DATA_ERR
+Expecting exception from store.put({foo: null})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+Key path resolves to a value that is valid key; should yield 'string' key, should succeed
+store.put({foo: 'zoo'})
+PASS store.put succeeded
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbkeyrangeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/keyrange-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/keyrange-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/keyrange-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,276 @@
</span><ins>+Test IndexedDB's KeyRange.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+PASS 'lower' in IDBKeyRange is false
+PASS 'upper' in IDBKeyRange is false
+PASS 'lowerOpen' in IDBKeyRange is false
+PASS 'upperOpen' in IDBKeyRange is false
+PASS 'only' in IDBKeyRange is true
+PASS 'lowerBound' in IDBKeyRange is true
+PASS 'upperBound' in IDBKeyRange is true
+PASS 'bound' in IDBKeyRange is true
+
+instance = IDBKeyRange.only(1)
+PASS 'lower' in instance is true
+PASS 'upper' in instance is true
+PASS 'lowerOpen' in instance is true
+PASS 'upperOpen' in instance is true
+PASS 'only' in instance is false
+PASS 'lowerBound' in instance is false
+PASS 'upperBound' in instance is false
+PASS 'bound' in instance is false
+
+IDBKeyRange.only(1)
+PASS keyRange.lower is 1
+PASS keyRange.upper is 1
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.only(3.14)
+PASS keyRange.lower is 3.14
+PASS keyRange.upper is 3.14
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.only('a')
+PASS keyRange.lower is 'a'
+PASS keyRange.upper is 'a'
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.lowerBound(10,true)
+PASS keyRange.lower is 10
+PASS keyRange.lowerOpen is true
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.lowerBound(11,false)
+PASS keyRange.lower is 11
+PASS keyRange.lowerOpen is false
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.lowerBound(12,undefined)
+PASS keyRange.lower is 12
+PASS keyRange.lowerOpen is false
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.lowerBound(10.1,true)
+PASS keyRange.lower is 10.1
+PASS keyRange.lowerOpen is true
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.lowerBound(11.2,false)
+PASS keyRange.lower is 11.2
+PASS keyRange.lowerOpen is false
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.lowerBound(12.3,undefined)
+PASS keyRange.lower is 12.3
+PASS keyRange.lowerOpen is false
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.lowerBound('aa',true)
+PASS keyRange.lower is 'aa'
+PASS keyRange.lowerOpen is true
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.lowerBound('ab',false)
+PASS keyRange.lower is 'ab'
+PASS keyRange.lowerOpen is false
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.lowerBound('ac',undefined)
+PASS keyRange.lower is 'ac'
+PASS keyRange.lowerOpen is false
+PASS keyRange.upper is undefined.
+PASS keyRange.upperOpen is true
+IDBKeyRange.upperBound(20,true)
+PASS keyRange.upper is 20
+PASS keyRange.upperOpen is true
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.upperBound(21,false)
+PASS keyRange.upper is 21
+PASS keyRange.upperOpen is false
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.upperBound(22,undefined)
+PASS keyRange.upper is 22
+PASS keyRange.upperOpen is false
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.upperBound(20.2,true)
+PASS keyRange.upper is 20.2
+PASS keyRange.upperOpen is true
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.upperBound(21.3,false)
+PASS keyRange.upper is 21.3
+PASS keyRange.upperOpen is false
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.upperBound(22.4,undefined)
+PASS keyRange.upper is 22.4
+PASS keyRange.upperOpen is false
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.upperBound('ba',true)
+PASS keyRange.upper is 'ba'
+PASS keyRange.upperOpen is true
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.upperBound('bb',false)
+PASS keyRange.upper is 'bb'
+PASS keyRange.upperOpen is false
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.upperBound('bc',undefined)
+PASS keyRange.upper is 'bc'
+PASS keyRange.upperOpen is false
+PASS keyRange.lower is undefined.
+PASS keyRange.lowerOpen is true
+IDBKeyRange.bound(30,40, undefined, undefined)
+PASS keyRange.lower is 30
+PASS keyRange.upper is 40
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound(31,41, false, false)
+PASS keyRange.lower is 31
+PASS keyRange.upper is 41
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound(32,42, false, true)
+PASS keyRange.lower is 32
+PASS keyRange.upper is 42
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is true
+IDBKeyRange.bound(33,43, true, false)
+PASS keyRange.lower is 33
+PASS keyRange.upper is 43
+PASS keyRange.lowerOpen is true
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound(34,44, true, true)
+PASS keyRange.lower is 34
+PASS keyRange.upper is 44
+PASS keyRange.lowerOpen is true
+PASS keyRange.upperOpen is true
+IDBKeyRange.bound(30.1,40.2, undefined, undefined)
+PASS keyRange.lower is 30.1
+PASS keyRange.upper is 40.2
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound(31.3,41.4, false, false)
+PASS keyRange.lower is 31.3
+PASS keyRange.upper is 41.4
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound(32.5,42.6, false, true)
+PASS keyRange.lower is 32.5
+PASS keyRange.upper is 42.6
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is true
+IDBKeyRange.bound(33.7,43.8, true, false)
+PASS keyRange.lower is 33.7
+PASS keyRange.upper is 43.8
+PASS keyRange.lowerOpen is true
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound(34.9,44, true, true)
+PASS keyRange.lower is 34.9
+PASS keyRange.upper is 44
+PASS keyRange.lowerOpen is true
+PASS keyRange.upperOpen is true
+IDBKeyRange.bound('aaa','aba', false, false)
+PASS keyRange.lower is 'aaa'
+PASS keyRange.upper is 'aba'
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound('aab','abb', undefined, undefined)
+PASS keyRange.lower is 'aab'
+PASS keyRange.upper is 'abb'
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound('aac','abc', false, false)
+PASS keyRange.lower is 'aac'
+PASS keyRange.upper is 'abc'
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound('aad','abd', false, true)
+PASS keyRange.lower is 'aad'
+PASS keyRange.upper is 'abd'
+PASS keyRange.lowerOpen is false
+PASS keyRange.upperOpen is true
+IDBKeyRange.bound('aae','abe', true, false)
+PASS keyRange.lower is 'aae'
+PASS keyRange.upper is 'abe'
+PASS keyRange.lowerOpen is true
+PASS keyRange.upperOpen is false
+IDBKeyRange.bound('aaf','abf', true, true)
+PASS keyRange.lower is 'aaf'
+PASS keyRange.upper is 'abf'
+PASS keyRange.lowerOpen is true
+PASS keyRange.upperOpen is true
+Passing an invalid key into only({})
+Expecting exception from IDBKeyRange.only({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Passing an invalid key into upperBound({})
+Expecting exception from IDBKeyRange.upperBound({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Passing an invalid key into lowerBound({})
+Expecting exception from IDBKeyRange.lowerBound({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Passing an invalid key into bound(null, {})
+Expecting exception from IDBKeyRange.bound(null, {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Passing an invalid key into bound({},null)
+Expecting exception from IDBKeyRange.bound({}, null)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Passing an invalid key into bound({}, {})
+Expecting exception from IDBKeyRange.bound({}, {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Lower key greater than higher key, bound(4, 3)
+Expecting exception from IDBKeyRange.bound(4, 3)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Equal keys, either of the bounds is open, bound(4, 4, true, false)
+Expecting exception from IDBKeyRange.bound(4, 4, true, false)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Equal keys, either of the bounds is open, bound(4, 4, false, true)
+Expecting exception from IDBKeyRange.bound(4, 4, false, true)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Equal keys, either of the bounds is open, bound(4, 4, true, true)
+Expecting exception from IDBKeyRange.bound(4, 4, true, true)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Equal keys, none of the bounds is open, bound(4, 4, false, false)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbmozillaclearexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillaclearexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/clear-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/clear-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/clear-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+Test IndexedDB's clearing an object store
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "clear.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('foo', { autoIncrement: true });
+request = objectStore.add({});
+Expecting exception from db.transaction('foo').objectStore('foo').clear();
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+db.transaction('foo', 'readwrite')
+transaction.objectStore('foo').clear();
+request = db.transaction('foo').objectStore('foo').openCursor();
+cursor = request.result;
+PASS cursor is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbmozillacreateobjectstorebasicsexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillacreateobjectstorebasicsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+Test IndexedDB's creating object store and updating properties
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "create-objectstore-basics.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+Expecting exception from objectStore = db.createObjectStore(info.name, info.options)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_ACCESS_ERR
+Exception message: An invalid operation was performed on an object.
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.keyPath is info.options.keyPath
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.keyPath is info.options.keyPath
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+objectStore = db.createObjectStore(info.name, info.options);
+PASS objectStore.name is info.name
+PASS objectStore.keyPath is info.options.keyPath
+PASS objectStore.indexNames.length is 0
+PASS event.target.transaction.db is db
+PASS event.target.transaction.mode is "versionchange"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbmozillacursorsexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillacursorsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/cursors-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/cursors-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/cursors-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,609 @@
</span><ins>+Test IndexedDB cursor behavior
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "cursors.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('autoIncrement', { autoIncrement: true });
+request = objectStore.openCursor();
+PASS event.target.result is null
+db.createObjectStore('autoIncrementKeyPath', { keyPath: 'foo', autoIncrement: true });
+request = objectStore.openCursor();
+PASS event.target.result is null
+db.createObjectStore('keyPath', { keyPath: 'foo' });
+request = objectStore.openCursor();
+PASS event.target.result is null
+db.createObjectStore('foo');
+request = objectStore.openCursor();
+PASS event.target.result is null
+keys = [1, -1, 0, 10, 2000, 'q', 'z', 'two', 'b', 'a'];
+sortedKeys = [-1, 0, 1, 10, 2000, 'a', 'b', 'q', 'two', 'z'];
+keyIndex = 0;
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+Expecting exception from cursor.continue();
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS keyIndex is keys.length
+keyIndex = 4;
+range = IDBKeyRange.bound(2000, 'q');
+request = objectStore.openCursor(range);
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor = event.target.result;
+PASS keyIndex is 8
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue('b');
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 6;
+cursor = event.target.result;
+PASS keyIndex is keys.length
+keyIndex = 0;
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue(10);
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1: 3;
+cursor = event.target.result;
+PASS keyIndex is keys.length
+keyIndex = 0;
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue('c');
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1 : 7;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1 : 7;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1 : 7;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex += keyIndex ? 1 : 7;
+cursor = event.target.result;
+PASS keyIndex is keys.length
+keyIndex = 0;
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+request = cursor.update('bar');
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS keyIndex is keys.length
+request = objectStore.get(sortedKeys[4]);
+PASS event.target.result is 'bar'
+request = objectStore.put('foo', sortedKeys[4]);
+keyIndex = 0;
+request = objectStore.openCursor(null, 'next');
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+request = cursor.delete();
+keyIndex++;
+cursor.continue();
+PASS keyIndex is 5
+gotRemoveEvent = true;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex++;
+cursor.continue();
+cursor = event.target.result;
+PASS keyIndex is keys.length
+PASS gotRemoveEvent is true
+request = objectStore.get(sortedKeys[4]);
+PASS event.target.result is undefined
+request = objectStore.add('foo', sortedKeys[4]);
+request = objectStore.openCursor(null, 'prev');
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+cursor.continue();
+PASS cursor.key is sortedKeys[keyIndex]
+PASS cursor.primaryKey is sortedKeys[keyIndex]
+PASS cursor.value is 'foo'
+keyIndex--;
+cursor = event.target.result;
+PASS keyIndex is -1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbmozillakeyrequirementsdeletenullkeyexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillakeyrequirementsdeletenullkeyexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test IndexedDB's behavior deleting entry with no key
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "key-requirements-delete-null-key.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('bar');
+Expecting exception from objectStore.delete(null);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbmozillareadonlytransactionsexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillareadonlytransactionsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/readonly-transactions-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/readonly-transactions-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/mozilla/readonly-transactions-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+Test IndexedDB's readonly transactions
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "readonly-transactions.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore(osName, { autoIncrement: true });
+Expecting exception from db.transaction([osName]).objectStore(osName).add({});
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction(osName).objectStore(osName).add({});
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+key1 = 1;
+key2 = 2;
+Expecting exception from db.transaction([osName]).objectStore(osName).put({}, key1);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction(osName).objectStore(osName).put({}, key2);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction([osName]).objectStore(osName).put({}, key1);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction(osName).objectStore(osName).put({}, key1);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction([osName]).objectStore(osName).delete(key1);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction(osName).objectStore(osName).delete(key2);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbobjectlookupsinversionchangeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/object-lookups-in-versionchange-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/object-lookups-in-versionchange-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/object-lookups-in-versionchange-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+Regression test for http://webkit.org/b/102547
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "object-lookups-in-versionchange.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db = event.target.result
+transaction = event.target.transaction
+store = db.createObjectStore('store')
+
+Expecting exception from transaction.objectStore('no-such-store')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: An operation failed because the requested database object could not be found.
+
+Expecting exception from store.index('no-such-index')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: An operation failed because the requested database object could not be found.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbobjectstorecountexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/objectstore-count-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/objectstore-count-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/objectstore-count-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,112 @@
</span><ins>+Test IndexedDB's IDBObjectStore.count().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "objectstore-count.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('storeName', null)
+adding 0 ... 99
+
+verifying count without range
+trans = db.transaction('storeName', 'readonly')
+PASS trans is non-null.
+store = trans.objectStore('storeName')
+PASS store is non-null.
+request = store.count()
+PASS typeof request.result is "number"
+PASS request.result is 100
+
+verifying count with range
+trans = db.transaction('storeName', 'readonly')
+PASS trans is non-null.
+store = trans.objectStore('storeName')
+PASS store is non-null.
+
+test = {"lower":0,"lowerOpen":false,"upper":99,"upperOpen":false,"expected":100}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 100
+
+test = {"lower":0,"lowerOpen":true,"upper":99,"upperOpen":false,"expected":99}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 99
+
+test = {"lower":0,"lowerOpen":false,"upper":99,"upperOpen":true,"expected":99}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 99
+
+test = {"lower":0,"lowerOpen":true,"upper":99,"upperOpen":true,"expected":98}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 98
+
+test = {"lower":0,"lowerOpen":false,"upper":100,"upperOpen":false,"expected":100}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 100
+
+test = {"lower":0,"lowerOpen":false,"upper":100,"upperOpen":false,"expected":100}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 100
+
+test = {"lower":10,"lowerOpen":false,"upper":100,"upperOpen":false,"expected":90}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 90
+
+test = {"lower":0,"lowerOpen":false,"upper":0,"upperOpen":false,"expected":1}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 1
+
+test = {"lower":500,"lowerOpen":false,"upper":500,"upperOpen":false,"expected":0}
+request = store.count(IDBKeyRange.bound(test.lower, test.upper, test.lowerOpen, test.upperOpen))
+PASS typeof request.result is "number"
+PASS request.result is 0
+
+verifying count with key
+trans = db.transaction('storeName', 'readonly')
+PASS trans is non-null.
+store = trans.objectStore('storeName')
+PASS store is non-null.
+Expecting exception from store.count(NaN)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from store.count({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+Expecting exception from store.count(/regex/)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+test = {"key":0,"expected":1}
+request = store.count(test.key)
+PASS typeof request.result is "number"
+PASS request.result is 1
+
+test = {"key":100,"expected":0}
+request = store.count(test.key)
+PASS typeof request.result is "number"
+PASS request.result is 0
+
+test = {"key":null,"expected":100}
+request = store.count(test.key)
+PASS typeof request.result is "number"
+PASS request.result is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbopencursorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/open-cursor-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/open-cursor-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/open-cursor-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+Test IndexedDB's openCursor.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "open-cursor.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('test')
+objectStore.add('myValue', 'myKey')
+Opening cursor
+event.target.source.openCursor(keyRange)
+Cursor opened successfully.
+PASS cursor.direction is "next"
+PASS cursor.key is "myKey"
+PASS cursor.value is "myValue"
+
+Passing an invalid key into .continue({}).
+Expecting exception from event.target.result.continue({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+Opening an empty cursor.
+objectStore.openCursor(keyRange)
+Empty cursor opened successfully.
+PASS cursor is null
+Opening cursor
+event.target.source.openCursor("myKey")
+Cursor opened successfully.
+PASS cursor.direction is "next"
+PASS cursor.key is "myKey"
+PASS cursor.value is "myValue"
+
+Passing an invalid key into .continue({}).
+Expecting exception from cursor.continue({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: The data provided does not meet requirements.
+
+Opening an empty cursor.
+objectStore.openCursor("InexistentKey")
+Empty cursor opened successfully.
+PASS cursor is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbreadonlytransactionsexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbmozillareadonlytransactionsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/readonly-transactions-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/readonly-transactions-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/readonly-transactions-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+Test IndexedDB's readonly transactions
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "readonly-transactions.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore(osName, { autoIncrement: true });
+Expecting exception from db.transaction([osName]).objectStore(osName).add({});
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction(osName).objectStore(osName).add({});
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+key1 = 1;
+key2 = 2;
+Expecting exception from db.transaction([osName]).objectStore(osName).put({}, key1);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction(osName).objectStore(osName).put({}, key2);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction([osName]).objectStore(osName).put({}, key1);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction(osName).objectStore(osName).put({}, key1);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction([osName]).objectStore(osName).delete(key1);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+Expecting exception from db.transaction(osName).objectStore(osName).delete(key2);
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbremovedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/removed-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/removed-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/removed-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+Ensure that some obsolete IndexedDB features are gone.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "removed.html"
+PASS self.webkitIDBDatabaseError is undefined.
+PASS 'IDBDatabaseException' in self is false
+PASS 'errorCode' in indexedDB.open(dbname) is false
+PASS 'setVersion' in IDBDatabase.prototype is false
+PASS document.createEvent('IDBUpgradeNeededEvent') threw exception Error: NotSupportedError: DOM Exception 9.
+PASS 'version' in document.createEvent('IDBVersionChangeEvent') is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbrequestresultcacheexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/request-result-cache-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/request-result-cache-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/request-result-cache-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+Verify that a request's result is dirtied when a cursor is continued
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "request-result-cache.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+
+prepareDatabase():
+db = event.target.result
+store = db.createObjectStore('store')
+
+onOpen():
+db = event.target.result
+tx = db.transaction('store')
+store = tx.objectStore('store')
+cursorRequest = store.openCursor()
+
+cursorRequestSuccess():
+cursor = cursorRequest.result
+cursor.continue()
+Expecting exception from cursorRequest.result
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+
+cursorRequestSuccess():
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbtransactionabortexpectedtxtfromrev193427trunkLayoutTestsstorageindexeddbtransactionabortexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-abort-expected.txt (from rev 193427, trunk/LayoutTests/storage/indexeddb/transaction-abort-expected.txt) (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-abort-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-abort-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+Test transaction aborts send the proper onabort messages..
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "transaction-abort.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('storeName', null)
+store.add({x: 'value', y: 'zzz'}, 'key')
+trans = db.transaction(['storeName'], 'readwrite')
+trans.onabort = transactionAborted
+trans.oncomplete = unexpectedCompleteCallback
+store = trans.objectStore('storeName')
+store.add({x: 'value2', y: 'zzz2'}, 'key2')
+store.add({x: 'value3', y: 'zzz3'}, 'key3')
+PASS event.target.error.name is 'AbortError'
+PASS trans.error is null
+PASS firstError is false
+PASS secondError is false
+PASS abortFired is false
+Expecting exception from store.add({x: 'value4', y: 'zzz4'}, 'key4')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+PASS event.target.error.name is 'AbortError'
+PASS trans.error is null
+PASS firstError is true
+PASS secondError is false
+PASS abortFired is false
+PASS firstError is true
+PASS secondError is true
+PASS abortFired is false
+PASS trans.error is null
+Expecting exception from store.add({x: 'value5', y: 'zzz5'}, 'key5')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from trans.abort()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbtransactionactiveflagexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-active-flag-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-active-flag-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-active-flag-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,266 @@
</span><ins>+Test IndexedDB transaction internal active flag.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "transaction-active-flag.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+store.createIndex('index', 'keypath')
+
+runTransaction():
+transaction = db.transaction('store', 'readwrite')
+
+Verify that transactions are created with |active| flag set:
+store = transaction.objectStore('store')
+index = store.index('index')
+PASS store.add(0, 0) did not throw exception.
+PASS store.put(0, 0) did not throw exception.
+PASS store.get(0) did not throw exception.
+PASS store.get(IDBKeyRange.only(0)) did not throw exception.
+PASS store.delete(0) did not throw exception.
+PASS store.delete(IDBKeyRange.only(0)) did not throw exception.
+PASS store.count() did not throw exception.
+PASS store.count(0) did not throw exception.
+PASS store.count(IDBKeyRange.only(0)) did not throw exception.
+PASS store.clear() did not throw exception.
+PASS store.openCursor() did not throw exception.
+PASS store.openCursor(0) did not throw exception.
+PASS store.openCursor(0, 'next') did not throw exception.
+PASS store.openCursor(IDBKeyRange.only(0)) did not throw exception.
+PASS store.openCursor(IDBKeyRange.only(0), 'next') did not throw exception.
+PASS index.get(0) did not throw exception.
+PASS index.get(IDBKeyRange.only(0)) did not throw exception.
+PASS index.getKey(0) did not throw exception.
+PASS index.getKey(IDBKeyRange.only(0)) did not throw exception.
+PASS index.count() did not throw exception.
+PASS index.count(0) did not throw exception.
+PASS index.count(IDBKeyRange.only(0)) did not throw exception.
+PASS index.openCursor() did not throw exception.
+PASS index.openCursor(0) did not throw exception.
+PASS index.openCursor(0, 'next') did not throw exception.
+PASS index.openCursor(IDBKeyRange.only(0)) did not throw exception.
+PASS index.openCursor(IDBKeyRange.only(0), 'next') did not throw exception.
+PASS index.openKeyCursor() did not throw exception.
+PASS index.openKeyCursor(0) did not throw exception.
+PASS index.openKeyCursor(0, 'next') did not throw exception.
+PASS index.openKeyCursor(IDBKeyRange.only(0)) did not throw exception.
+PASS index.openKeyCursor(IDBKeyRange.only(0), 'next') did not throw exception.
+
+Transaction shouldn't be active inside a non-IDB-event callback
+setTimeout(testTimeout, 0)
+
+testTimeout():
+store = transaction.objectStore('store')
+index = store.index('index')
+Expecting exception from store.add(0, 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.put(0, 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.get(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.get(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.delete(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.delete(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.count()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.count(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.count(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.clear()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.openCursor()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.openCursor(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.openCursor(0, 'next')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.openCursor(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from store.openCursor(IDBKeyRange.only(0), 'next')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.get(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.get(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.getKey(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.getKey(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.count()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.count(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.count(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openCursor()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openCursor(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openCursor(0, 'next')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openCursor(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openCursor(IDBKeyRange.only(0), 'next')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openKeyCursor()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openKeyCursor(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openKeyCursor(0, 'next')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openKeyCursor(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+Expecting exception from index.openKeyCursor(IDBKeyRange.only(0), 'next')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: A request was placed against a transaction which is either currently not active, or which is finished.
+
+testEventCallback():
+Transaction should be active inside a non-IDB-event callback
+store = transaction.objectStore('store')
+index = store.index('index')
+PASS store.add(0, 0) did not throw exception.
+PASS store.put(0, 0) did not throw exception.
+PASS store.get(0) did not throw exception.
+PASS store.get(IDBKeyRange.only(0)) did not throw exception.
+PASS store.delete(0) did not throw exception.
+PASS store.delete(IDBKeyRange.only(0)) did not throw exception.
+PASS store.count() did not throw exception.
+PASS store.count(0) did not throw exception.
+PASS store.count(IDBKeyRange.only(0)) did not throw exception.
+PASS store.clear() did not throw exception.
+PASS store.openCursor() did not throw exception.
+PASS store.openCursor(0) did not throw exception.
+PASS store.openCursor(0, 'next') did not throw exception.
+PASS store.openCursor(IDBKeyRange.only(0)) did not throw exception.
+PASS store.openCursor(IDBKeyRange.only(0), 'next') did not throw exception.
+PASS index.get(0) did not throw exception.
+PASS index.get(IDBKeyRange.only(0)) did not throw exception.
+PASS index.getKey(0) did not throw exception.
+PASS index.getKey(IDBKeyRange.only(0)) did not throw exception.
+PASS index.count() did not throw exception.
+PASS index.count(0) did not throw exception.
+PASS index.count(IDBKeyRange.only(0)) did not throw exception.
+PASS index.openCursor() did not throw exception.
+PASS index.openCursor(0) did not throw exception.
+PASS index.openCursor(0, 'next') did not throw exception.
+PASS index.openCursor(IDBKeyRange.only(0)) did not throw exception.
+PASS index.openCursor(IDBKeyRange.only(0), 'next') did not throw exception.
+PASS index.openKeyCursor() did not throw exception.
+PASS index.openKeyCursor(0) did not throw exception.
+PASS index.openKeyCursor(0, 'next') did not throw exception.
+PASS index.openKeyCursor(IDBKeyRange.only(0)) did not throw exception.
+PASS index.openKeyCursor(IDBKeyRange.only(0), 'next') did not throw exception.
+
+transactionComplete():
+Expecting exception from store = transaction.objectStore('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbtransactionaftercloseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-after-close-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-after-close-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-after-close-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+Test closing a database connection in IndexedDB.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "transaction-after-close.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+request = store.put('x', 'y')
+PASS Put success
+running first transaction
+currentTransaction = db.transaction(['store'], 'readwrite')
+objectStore.put('a', 'b')
+db.close()
+Expecting exception from db.transaction(['store'], 'readwrite')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+
+verify that we can reopen the db after calling close
+indexedDB.open(dbname)
+second_db = event.target.result
+currentTransaction = second_db.transaction(['store'], 'readwrite')
+request = store.put('1', '2')
+PASS final put success
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbtransactionreadonlyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-read-only-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-read-only-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/transaction-read-only-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+Test read-only transactions in IndexedDB.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "transaction-read-only.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+store.put('x', 'y')
+trans = db.transaction('store')
+Expecting exception from trans.objectStore('store').put('a', 'b')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+trans = db.transaction('store')
+Expecting exception from trans.objectStore('store').delete('x')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+trans = db.transaction('store')
+cur = trans.objectStore('store').openCursor()
+PASS !event.target.result is false
+Expecting exception from event.target.result.delete()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: A write operation was attempted in a read-only transaction.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwk2storageindexeddbversionchangeexclusiveexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/wk2/storage/indexeddb/version-change-exclusive-expected.txt (0 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/wk2/storage/indexeddb/version-change-exclusive-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/wk2/storage/indexeddb/version-change-exclusive-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+Ensure pending open waits for version change transaction to complete.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "version-change-exclusive.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+calling open() - callback should wait until VERSION_CHANGE transaction is complete
+indexedDB.open(dbname)
+setVersion() callback
+starting work in VERSION_CHANGE transaction
+self.state = 'VERSION_CHANGE started'
+store = db.createObjectStore('test-store')
+Expecting exception from db.transaction('test-store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
+store.put(0, 0)
+in put's onsuccess
+store.put(1, 1)
+in put's onsuccess
+store.put(2, 2)
+in put's onsuccess
+store.put(3, 3)
+in put's onsuccess
+store.put(4, 4)
+in put's onsuccess
+store.put(5, 5)
+in put's onsuccess
+store.put(6, 6)
+in put's onsuccess
+store.put(7, 7)
+in put's onsuccess
+store.put(8, 8)
+in put's onsuccess
+store.put(9, 9)
+in put's onsuccess
+ending work in VERSION_CHANGE transaction
+self.state = 'VERSION_CHANGE finished'
+open() callback - this should appear after VERSION_CHANGE transaction ends
+PASS self.state is "VERSION_CHANGE finished"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbabortedversionchangeclosesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/aborted-versionchange-closes-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/aborted-versionchange-closes-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/aborted-versionchange-closes-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
</ins><span class="cx">
</span><span class="cx"> onOpenError():
</span><span class="cx"> PASS sawTransactionAbort is true
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbbasicsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/basics-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/basics-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/basics-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -11,13 +11,13 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to read the 'result' property from 'IDBRequest': The request has not finished.
</ins><span class="cx"> PASS 'error' in request is true
</span><span class="cx"> Expecting exception from request.error
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to read the 'error' property from 'IDBRequest': The request has not finished.
</ins><span class="cx"> PASS 'source' in request is true
</span><span class="cx"> PASS request.source is null
</span><span class="cx"> PASS 'transaction' in request is true
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbcreateandremoveobjectstoreexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ConstraintError'
</span><del>-Exception message: ConstraintError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
</ins><span class="cx"> trans = db.transaction(['tmp'])
</span><span class="cx"> trans.objectStore('tmp').get(0)
</span><span class="cx"> PASS event.target.result is undefined.
</span><span class="lines">@@ -22,25 +22,25 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
</ins><span class="cx"> Trying remove
</span><span class="cx"> Expecting exception from db.deleteObjectStore("some os")
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
</ins><span class="cx"> Trying create with store that already exists
</span><span class="cx"> Expecting exception from db.createObjectStore('tmp')
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
</ins><span class="cx"> Trying remove with store that already exists
</span><span class="cx"> Expecting exception from db.deleteObjectStore('tmp')
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbcursorfinishedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/cursor-finished-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/cursor-finished-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/cursor-finished-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -49,27 +49,27 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
</ins><span class="cx"> Expecting exception from savedCursor.advance(1)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'advance' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> Expecting exception from savedCursor.continue()
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> Expecting exception from savedCursor.continue('key')
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> Expecting exception from savedCursor.delete()
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
</ins><span class="cx">
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbexceptionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/exceptions-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/exceptions-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/exceptions-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -149,18 +149,18 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction is read-only.
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
</ins><span class="cx"> The transaction this IDBObjectStore belongs to is not active.
</span><span class="cx"> Expecting exception from storeFromInactiveTransaction.add(0, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction has finished.
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</ins><span class="cx"> The data being stored could not be cloned by the internal structured cloning algorithm.
</span><span class="cx"> Expecting exception from store.add(self, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.DATA_CLONE_ERR
</span><del>-Exception message: Failed to execute 'add' on 'IDBObjectStore': An object could not be cloned.
</del><ins>+Exception message: DataCloneError: DOM Exception 25
</ins><span class="cx">
</span><span class="cx"> IDBObjectStore.clear()
</span><span class="cx"> This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBObjectStore.count()
</span><span class="cx"> If the optional key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'count' on 'IDBObjectStore': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'count' on 'IDBObjectStore': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBObjectStore.delete()
</span><span class="cx"> This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction has finished.
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBObjectStore.get()
</span><span class="cx"> If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBObjectStore.index()
</span><span class="cx"> There is no index with the given name, compared in a case-sensitive manner, in the connected database.
</span><span class="lines">@@ -234,9 +234,9 @@
</span><span class="cx"> Occurs if a request is made on a source object that has been deleted or removed, or if the transaction the object store belongs to has finished.
</span><span class="cx"> Expecting exception from storeFromInactiveTransaction.index('index')
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is DOMException.INVALID_STATE_ERR
-PASS ename is 'InvalidStateError'
-Exception message: Failed to execute 'index' on 'IDBObjectStore': The transaction has finished.
</del><ins>+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'index' on 'IDBObjectStore': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBObjectStore.openCursor()
</span><span class="cx"> If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
</span><span class="lines">@@ -250,48 +250,30 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished.
</ins><span class="cx"> The value for the direction parameter is invalid.
</span><span class="cx"> Expecting TypeError exception from store.openCursor(0, 'invalid-direction')
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS store.openCursor(0, 'invalid-direction') threw TypeError: Failed to execute 'openCursor' on 'IDBObjectStore': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.
</del><ins>+PASS store.openCursor(0, 'invalid-direction') threw TypeError: Type error
</ins><span class="cx">
</span><del>-IDBObjectStore.openKeyCursor()
-If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
-Expecting exception from store.openKeyCursor({})
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The parameter is not a valid key.
-The transaction this IDBObjectStore belongs to is not active.
-Expecting exception from storeFromInactiveTransaction.openKeyCursor()
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The transaction has finished.
-The value for the direction parameter is invalid.
-Expecting TypeError exception from store.openKeyCursor(0, 'invalid-direction')
-PASS Exception was thrown.
-PASS store.openKeyCursor(0, 'invalid-direction') threw TypeError: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.
-
</del><span class="cx"> IDBObjectStore.put()
</span><span class="cx"> This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
</span><span class="cx"> Expecting exception from storeFromReadOnlyTransaction.put(0, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: Failed to execute 'put' on 'IDBObjectStore': The transaction is read-only.
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
</ins><span class="cx"> The transaction this IDBObjectStore belongs to is not active.
</span><span class="cx"> Expecting exception from storeFromInactiveTransaction.put(0, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'put' on 'IDBObjectStore': The transaction has finished.
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</ins><span class="cx"> The data being stored could not be cloned by the internal structured cloning algorithm.
</span><span class="cx"> Expecting exception from store.put(self, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.DATA_CLONE_ERR
</span><del>-Exception message: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned.
</del><ins>+Exception message: DataCloneError: DOM Exception 25
</ins><span class="cx"> db.close()
</span><span class="cx"> ro_transaction.oncomplete = transactionComplete
</span><span class="cx"> rw_transaction.oncomplete = transactionComplete
</span><span class="lines">@@ -363,7 +345,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'count' on 'IDBIndex': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBIndex.get()
</span><span class="cx"> If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
</span><span class="lines">@@ -377,7 +359,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'get' on 'IDBIndex': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBIndex.getKey()
</span><span class="cx"> If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
</span><span class="lines">@@ -391,7 +373,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'getKey' on 'IDBIndex': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBIndex.openCursor()
</span><span class="cx"> If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
</span><span class="lines">@@ -405,7 +387,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'openCursor' on 'IDBIndex': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.
</ins><span class="cx"> The value for the direction parameter is invalid.
</span><span class="cx"> Expecting TypeError exception from index.openCursor(0, 'invalid-direction')
</span><span class="cx"> PASS Exception was thrown.
</span><span class="lines">@@ -423,7 +405,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.
</ins><span class="cx"> The value for the direction parameter is invalid.
</span><span class="cx"> Expecting TypeError exception from index.openKeyCursor(0, 'invalid-direction')
</span><span class="cx"> PASS Exception was thrown.
</span><span class="lines">@@ -457,7 +439,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'advance' on 'IDBCursor': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'advance' on 'IDBCursor': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBCursor.continue()
</span><span class="cx"> The parameter is not a valid key.
</span><span class="lines">@@ -490,7 +472,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'continue' on 'IDBCursor': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBCursor.delete()
</span><span class="cx"> If this cursor's got value flag is false, or if this cursor was created using openKeyCursor a DOMException of type InvalidStateError is thrown.
</span><span class="lines">@@ -504,7 +486,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'delete' on 'IDBCursor': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'delete' on 'IDBCursor': The transaction is inactive or finished.
</ins><span class="cx">
</span><span class="cx"> IDBCursor.update()
</span><span class="cx"> If this cursor's got value flag is false or if this cursor was created using openKeyCursor. This method throws a DOMException of type InvalidStateError.
</span><span class="lines">@@ -523,13 +505,13 @@
</span><span class="cx"> Expecting exception from cursor.update(self)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.DATA_CLONE_ERR
</span><del>-Exception message: Failed to execute 'update' on 'IDBCursor': An object could not be cloned.
</del><ins>+Exception message: DataCloneError: DOM Exception 25
</ins><span class="cx"> The transaction this IDBCursor belongs to is not active.
</span><span class="cx"> Expecting exception from cursorFromInactiveTransaction.update({})
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: Failed to execute 'update' on 'IDBCursor': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'update' on 'IDBCursor': The transaction is inactive or finished.
</ins><span class="cx"> readOnlyTransaction = db.transaction('store', 'readonly')
</span><span class="cx"> request = readOnlyTransaction.objectStore('store').openCursor()
</span><span class="cx"> cursorFromReadOnlyTransaction = request.result
</span><span class="lines">@@ -558,7 +540,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: Failed to execute 'abort' on 'IDBTransaction': The transaction has finished.
</del><ins>+Exception message: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
</ins><span class="cx"> If the requested object store is not in this transaction's scope.
</span><span class="cx"> Expecting exception from db.transaction('store').objectStore('otherStore')
</span><span class="cx"> PASS Exception was thrown.
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncreateobjectstorefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -1,23 +1,23 @@
</span><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><del>-ALERT: Failed to create object store with both autoincrement and an empty keypath: Error: InvalidAccessError: DOM IDBDatabase Exception 15
</del><ins>+ALERT: Failed to create object store with both autoincrement and an empty keypath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
</ins><span class="cx"> ALERT: Object store names:
</span><del>-ALERT: Failed to create object store with both autoincrement and a sequence keypath: Error: InvalidAccessError: DOM IDBDatabase Exception 15
</del><ins>+ALERT: Failed to create object store with both autoincrement and a sequence keypath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
</ins><span class="cx"> ALERT: Object store names:
</span><del>-ALERT: Failed to create object store with invalid keyPath: Error: SyntaxError: DOM IDBDatabase Exception 12
</del><ins>+ALERT: Failed to create object store with invalid keyPath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.
</ins><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: Actually created an object store
</span><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: TestObjectStore1
</span><del>-ALERT: Failed to create TestObjectStore a second time: Error: ConstraintError: DOM IDBDatabase Exception 0
</del><ins>+ALERT: Failed to create TestObjectStore a second time: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
</ins><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: TestObjectStore1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: TestObjectStore1
</span><del>-ALERT: Failed to create object store while there is no version change transaction: Error: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+ALERT: Failed to create object store while there is no version change transaction: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
</ins><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: TestObjectStore1
</span><del>-ALERT: Failed to create object store outside of onupgradeneeded: Error: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+ALERT: Failed to create object store outside of onupgradeneeded: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
</ins><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: TestObjectStore1
</span><span class="cx"> ALERT: Done
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndoubleabortexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><del>-ALERT: Second abort failed: Error: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+ALERT: Second abort failed: Error: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
</ins><span class="cx"> ALERT: Initial upgrade versionchange transaction aborted
</span><span class="cx"> ALERT: Done
</span><span class="cx"> This test aborts the same transaction twice, making the appropriate exception is thrown.
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -1,11 +1,11 @@
</span><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: readwrite put success - about to try to delete an objectstore
</span><del>-ALERT: Failed to deleteObjectStore without a versionchange transaction - Error: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+ALERT: Failed to deleteObjectStore without a versionchange transaction - Error: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
</ins><span class="cx"> ALERT: readwrite transaction complete
</span><span class="cx"> ALERT: Second upgrade needed: Old version - 1 New version - 2
</span><del>-ALERT: Failed to deleteObjectStore with a non-existent objectstore - Error: NotFoundError: DOM IDBDatabase Exception 8
-ALERT: Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - Error: TransactionInactiveError: DOM IDBDatabase Exception 0
</del><ins>+ALERT: Failed to deleteObjectStore with a non-existent objectstore - Error: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.
+ALERT: Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - Error: A request was placed against a transaction which is either currently not active, or which is finished.
</ins><span class="cx"> ALERT: Second version change transaction complete
</span><span class="cx"> ALERT: Done
</span><span class="cx"> This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbdatabasetransactionfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><del>-ALERT: Failed to start a transaction while a versionChange transaction was in progress - Error: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+ALERT: Failed to start a transaction while a versionChange transaction was in progress - Error: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
</ins><span class="cx"> ALERT: versionchange transaction completed
</span><del>-ALERT: Failed to start a transaction with an empty set of object stores - Error: InvalidAccessError: DOM IDBDatabase Exception 15
-ALERT: Failed to start a transaction to a nonexistent object store - Error: NotFoundError: DOM IDBDatabase Exception 8
-ALERT: Failed to start a transaction with an invalid mode - TypeError: Type error
-ALERT: Failed to explicitly start a versionchange transaction - TypeError: Type error
-ALERT: Failed to explicitly start a transaction with the close pending flag set - Error: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+ALERT: Failed to start a transaction with an empty set of object stores - Error: Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.
+ALERT: Failed to start a transaction to a nonexistent object store - Error: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
+ALERT: Failed to start a transaction with an invalid mode - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('invalid-mode') is not one of 'readonly' or 'readwrite'.
+ALERT: Failed to explicitly start a versionchange transaction - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('invalid-mode') is not one of 'readonly' or 'readwrite'.
+ALERT: Failed to explicitly start a transaction with the close pending flag set - Error: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
</ins><span class="cx"> ALERT: Done
</span><span class="cx"> This tests some obvious failures that can happen while calling IDBDatabase.transaction()
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillabadkeypathexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'DataError'
</span><del>-Exception message: DataError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: The data provided does not meet requirements.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillaclearexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transaction is read-only.
</ins><span class="cx"> db.transaction('foo', 'readwrite')
</span><span class="cx"> transaction.objectStore('foo').clear();
</span><span class="cx"> request = db.transaction('foo').objectStore('foo').openCursor();
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillacreateobjectstorebasicsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> Expecting exception from objectStore = db.createObjectStore(info.name, info.options)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_ACCESS_ERR
</span><del>-Exception message: InvalidAccessError: DOM IDBDatabase Exception 15
</del><ins>+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
</ins><span class="cx"> objectStore = db.createObjectStore(info.name, info.options);
</span><span class="cx"> PASS objectStore.name is info.name
</span><span class="cx"> PASS objectStore.indexNames.length is 0
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillacursorsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx"> Expecting exception from cursor.continue();
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
</ins><span class="cx"> PASS cursor.key is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.primaryKey is sortedKeys[keyIndex]
</span><span class="cx"> PASS cursor.value is 'foo'
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillakeyrequirementsdeletenullkeyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'DataError'
</span><del>-Exception message: DataError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key range.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillakeyrequirementsinlineandpassedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'DataError'
</span><del>-Exception message: DataError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: The data provided does not meet requirements.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillakeyrequirementsputnokeyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'DataError'
</span><del>-Exception message: DataError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: The data provided does not meet requirements.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillakeyrequirementsputnullkeyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'DataError'
</span><del>-Exception message: DataError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: The data provided does not meet requirements.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmozillareadonlytransactionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -13,44 +13,44 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
</ins><span class="cx"> Expecting exception from db.transaction(osName).objectStore(osName).add({});
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
</ins><span class="cx"> key1 = 1;
</span><span class="cx"> key2 = 2;
</span><span class="cx"> Expecting exception from db.transaction([osName]).objectStore(osName).put({}, key1);
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
</ins><span class="cx"> Expecting exception from db.transaction(osName).objectStore(osName).put({}, key2);
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
</ins><span class="cx"> Expecting exception from db.transaction([osName]).objectStore(osName).put({}, key1);
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
</ins><span class="cx"> Expecting exception from db.transaction(osName).objectStore(osName).put({}, key1);
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
</ins><span class="cx"> Expecting exception from db.transaction([osName]).objectStore(osName).delete(key1);
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only.
</ins><span class="cx"> Expecting exception from db.transaction(osName).objectStore(osName).delete(key2);
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'ReadOnlyError'
</span><del>-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbresourcesexceptionsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/resources/exceptions.js (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/resources/exceptions.js        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/resources/exceptions.js        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx"> debug("There is no index with the given name, compared in a case-sensitive manner, in the connected database.");
</span><span class="cx"> evalAndExpectException("store.index('no-such-index')", "DOMException.NOT_FOUND_ERR", "'NotFoundError'");
</span><span class="cx"> debug("Occurs if a request is made on a source object that has been deleted or removed, or if the transaction the object store belongs to has finished.");
</span><del>- evalAndExpectException("storeFromInactiveTransaction.index('index')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
</del><ins>+ evalAndExpectException("storeFromInactiveTransaction.index('index')", "0", "'TransactionInactiveError'");
</ins><span class="cx"> // "Occurs if a request is made on a source object that has been deleted or removed." - covered in deleted-objects.html
</span><span class="cx">
</span><span class="cx"> debug("");
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbtransactionabortexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/transaction-abort-expected.txt (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/transaction-abort-expected.txt        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/LayoutTests/storage/indexeddb/transaction-abort-expected.txt        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: TransactionInactiveError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</ins><span class="cx"> PASS event.target.error.name is 'AbortError'
</span><span class="cx"> PASS trans.error is null
</span><span class="cx"> PASS firstError is true
</span><span class="lines">@@ -39,12 +39,12 @@
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'TransactionInactiveError'
</span><del>-Exception message: TransactionInactiveError: DOM IDBDatabase Exception 0
</del><ins>+Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</ins><span class="cx"> Expecting exception from trans.abort()
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS code is DOMException.INVALID_STATE_ERR
</span><span class="cx"> PASS ename is 'InvalidStateError'
</span><del>-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
</del><ins>+Exception message: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/ChangeLog        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -1,3 +1,166 @@
</span><ins>+2015-12-04 Brady Eidson <beidson@apple.com>
+
+ Modern IDB: storage/indexeddb/exceptions.html fails.
+ https://bugs.webkit.org/show_bug.cgi?id=151732
+
+ Reviewed by Alex Christensen.
+
+ No new tests (At least one failing test now passes).
+
+ - Lots of customized exception messages for IDB code to match the text expectations.
+ - Updates to the test expectations where we can't/won't match them exactly.
+ - And a couple of little required behavior changes exposed by the test
+
+ * Modules/indexeddb/IDBCursor.h:
+ * Modules/indexeddb/IDBCursor.idl:
+ * Modules/indexeddb/IDBDatabase.h:
+ * Modules/indexeddb/IDBDatabase.idl:
+ * Modules/indexeddb/IDBDatabaseException.cpp:
+ (WebCore::IDBDatabaseException::initializeDescription):
+ * Modules/indexeddb/IDBFactory.h:
+ * Modules/indexeddb/IDBFactory.idl:
+ * Modules/indexeddb/IDBIndex.h:
+ * Modules/indexeddb/IDBIndex.idl:
+ * Modules/indexeddb/IDBObjectStore.h:
+ * Modules/indexeddb/IDBObjectStore.idl:
+ * Modules/indexeddb/IDBRequest.h:
+ * Modules/indexeddb/IDBRequest.idl:
+ * Modules/indexeddb/IDBTransaction.h:
+ * Modules/indexeddb/IDBTransaction.idl:
+
+ * Modules/indexeddb/client/IDBCursorImpl.cpp:
+ (WebCore::IDBClient::IDBCursor::update):
+ (WebCore::IDBClient::IDBCursor::advance):
+ (WebCore::IDBClient::IDBCursor::continueFunction):
+ (WebCore::IDBClient::IDBCursor::deleteFunction):
+ * Modules/indexeddb/client/IDBCursorImpl.h:
+
+ * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
+ (WebCore::IDBClient::IDBDatabase::createObjectStore):
+ (WebCore::IDBClient::IDBDatabase::transaction):
+ (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
+ * Modules/indexeddb/client/IDBDatabaseImpl.h:
+
+ * Modules/indexeddb/client/IDBFactoryImpl.cpp:
+ (WebCore::IDBClient::IDBFactory::cmp):
+ * Modules/indexeddb/client/IDBFactoryImpl.h:
+
+ * Modules/indexeddb/client/IDBIndexImpl.cpp:
+ (WebCore::IDBClient::IDBIndex::openCursor):
+ (WebCore::IDBClient::IDBIndex::count):
+ (WebCore::IDBClient::IDBIndex::doCount):
+ (WebCore::IDBClient::IDBIndex::openKeyCursor):
+ (WebCore::IDBClient::IDBIndex::get):
+ (WebCore::IDBClient::IDBIndex::doGet):
+ (WebCore::IDBClient::IDBIndex::getKey):
+ (WebCore::IDBClient::IDBIndex::doGetKey):
+ * Modules/indexeddb/client/IDBIndexImpl.h:
+
+ * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
+ (WebCore::IDBClient::IDBObjectStore::openCursor):
+ (WebCore::IDBClient::IDBObjectStore::get):
+ (WebCore::IDBClient::IDBObjectStore::add):
+ (WebCore::IDBClient::IDBObjectStore::put):
+ (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
+ (WebCore::IDBClient::IDBObjectStore::putOrAdd):
+ (WebCore::IDBClient::IDBObjectStore::deleteFunction):
+ (WebCore::IDBClient::IDBObjectStore::clear):
+ (WebCore::IDBClient::IDBObjectStore::createIndex):
+ (WebCore::IDBClient::IDBObjectStore::index):
+ (WebCore::IDBClient::IDBObjectStore::deleteIndex):
+ (WebCore::IDBClient::IDBObjectStore::count):
+ (WebCore::IDBClient::IDBObjectStore::doCount):
+ * Modules/indexeddb/client/IDBObjectStoreImpl.h:
+
+ * Modules/indexeddb/client/IDBRequestImpl.cpp:
+ (WebCore::IDBClient::IDBRequest::result):
+ (WebCore::IDBClient::IDBRequest::error):
+ * Modules/indexeddb/client/IDBRequestImpl.h:
+
+ * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+ (WebCore::IDBClient::IDBTransaction::objectStore):
+ (WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
+ (WebCore::IDBClient::IDBTransaction::abort):
+ * Modules/indexeddb/client/IDBTransactionImpl.h:
+
+ * Modules/indexeddb/legacy/LegacyCursor.cpp:
+ (WebCore::LegacyCursor::update):
+ (WebCore::LegacyCursor::continueFunction):
+ (WebCore::LegacyCursor::deleteFunction):
+ * Modules/indexeddb/legacy/LegacyCursor.h:
+
+ * Modules/indexeddb/legacy/LegacyDatabase.cpp:
+ (WebCore::LegacyDatabase::createObjectStore):
+ (WebCore::LegacyDatabase::deleteObjectStore):
+ (WebCore::LegacyDatabase::transaction):
+ (WebCore::LegacyDatabase::forceClose):
+ * Modules/indexeddb/legacy/LegacyDatabase.h:
+
+ * Modules/indexeddb/legacy/LegacyFactory.cpp:
+ (WebCore::LegacyFactory::cmp):
+ * Modules/indexeddb/legacy/LegacyFactory.h:
+
+ * Modules/indexeddb/legacy/LegacyIndex.cpp:
+ (WebCore::LegacyIndex::openCursor):
+ (WebCore::LegacyIndex::count):
+ (WebCore::LegacyIndex::openKeyCursor):
+ (WebCore::LegacyIndex::get):
+ (WebCore::LegacyIndex::getKey):
+ * Modules/indexeddb/legacy/LegacyIndex.h:
+
+ * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
+ (WebCore::LegacyObjectStore::get):
+ (WebCore::LegacyObjectStore::add):
+ (WebCore::LegacyObjectStore::put):
+ (WebCore::LegacyObjectStore::deleteFunction):
+ (WebCore::LegacyObjectStore::clear):
+ (WebCore::LegacyObjectStore::createIndex):
+ (WebCore::LegacyObjectStore::index):
+ (WebCore::LegacyObjectStore::deleteIndex):
+ (WebCore::LegacyObjectStore::openCursor):
+ (WebCore::LegacyObjectStore::count):
+ * Modules/indexeddb/legacy/LegacyObjectStore.h:
+ (WebCore::LegacyObjectStore::createIndex):
+ (WebCore::LegacyObjectStore::count):
+
+ * Modules/indexeddb/legacy/LegacyRequest.cpp:
+ (WebCore::LegacyRequest::result):
+ (WebCore::LegacyRequest::error):
+ (WebCore::LegacyRequest::dispatchEvent):
+ (WebCore::LegacyRequest::uncaughtExceptionInEventHandler):
+ * Modules/indexeddb/legacy/LegacyRequest.h:
+
+ * Modules/indexeddb/legacy/LegacyTransaction.cpp:
+ (WebCore::LegacyTransaction::objectStore):
+ (WebCore::LegacyTransaction::abort):
+ (WebCore::LegacyTransaction::stop):
+ * Modules/indexeddb/legacy/LegacyTransaction.h:
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::createDOMException): For IDBDatabase exceptions, use createWithDescriptionAsMessage
+
+ * bindings/js/JSIDBDatabaseCustom.cpp:
+ (WebCore::JSIDBDatabase::createObjectStore):
+ (WebCore::JSIDBDatabase::transaction):
+
+ * bindings/js/JSIDBObjectStoreCustom.cpp:
+ (WebCore::putOrAdd):
+ (WebCore::JSIDBObjectStore::createIndex):
+
+ * dom/DOMCoreException.h:
+ (WebCore::DOMCoreException::createWithDescriptionAsMessage): Create an exception whose message
+ is the description.
+ (WebCore::DOMCoreException::DOMCoreException):
+
+ * dom/ExceptionBase.cpp:
+ (WebCore::ExceptionBase::ExceptionBase): Add a flag to determine where the message comes from
+ * dom/ExceptionBase.h:
+
+ * dom/make_dom_exceptions.pl:
+ (generateHeader): Add an IDBDatabaseException type
+
+ * inspector/InspectorIndexedDBAgent.cpp:
+
</ins><span class="cx"> 2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Remove untested and unused Worker inspection
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -65,12 +65,12 @@
</span><span class="cx"> virtual const Deprecated::ScriptValue& value() const = 0;
</span><span class="cx"> virtual IDBAny* source() = 0;
</span><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> update(JSC::ExecState&, Deprecated::ScriptValue&, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> update(JSC::ExecState&, Deprecated::ScriptValue&, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx"> virtual void advance(unsigned long, ExceptionCodeWithMessage&) = 0;
</span><span class="cx"> // FIXME: Try to modify the code generator so this overload is unneeded.
</span><del>- virtual void continueFunction(ScriptExecutionContext*, ExceptionCode&) = 0;
- virtual void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCode&) = 0;
</del><ins>+ virtual void continueFunction(ScriptExecutionContext*, ExceptionCodeWithMessage&) = 0;
+ virtual void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><span class="cx"> virtual bool isKeyCursor() const = 0;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -33,8 +33,8 @@
</span><span class="cx"> readonly attribute any key;
</span><span class="cx"> readonly attribute any primaryKey;
</span><span class="cx">
</span><del>- [CallWith=ScriptState, RaisesException] IDBRequest update(any value);
</del><ins>+ [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest update(any value);
</ins><span class="cx"> [RaisesExceptionWithMessage] void advance([EnforceRange] unsigned long count);
</span><del>- [CallWith=ScriptExecutionContext, ImplementedAs=continueFunction, RaisesException] void continue(optional any key);
- [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete();
</del><ins>+ [CallWith=ScriptExecutionContext, ImplementedAs=continueFunction, RaisesExceptionWithMessage] void continue(optional any key);
+ [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete();
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="cx">
</span><del>-typedef int ExceptionCode;
</del><ins>+struct ExceptionCodeWithMessage;
</ins><span class="cx">
</span><span class="cx"> class IDBDatabase : public RefCounted<IDBDatabase>, public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject {
</span><span class="cx"> public:
</span><span class="lines">@@ -55,11 +55,11 @@
</span><span class="cx"> virtual uint64_t version() const = 0;
</span><span class="cx"> virtual RefPtr<DOMStringList> objectStoreNames() const = 0;
</span><span class="cx">
</span><del>- virtual RefPtr<IDBObjectStore> createObjectStore(const String& name, const Dictionary&, ExceptionCode&) = 0;
- virtual RefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, ExceptionCode&) = 0;
- virtual RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const Vector<String>&, const String& mode, ExceptionCode&) = 0;
- virtual RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String&, const String& mode, ExceptionCode&) = 0;
- virtual void deleteObjectStore(const String& name, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBObjectStore> createObjectStore(const String& name, const Dictionary&, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const Vector<String>&, const String& mode, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String&, const String& mode, ExceptionCodeWithMessage&) = 0;
+ virtual void deleteObjectStore(const String& name, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx"> virtual void close() = 0;
</span><span class="cx">
</span><span class="cx"> using RefCounted<IDBDatabase>::ref;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -37,10 +37,10 @@
</span><span class="cx"> readonly attribute unsigned long long version;
</span><span class="cx"> readonly attribute DOMStringList objectStoreNames;
</span><span class="cx">
</span><del>- [Custom, RaisesException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
- [RaisesException] void deleteObjectStore(DOMString name);
- [Custom, CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(DOMString storeName, [Default=NullString] optional DOMString mode);
- [Custom, CallWith=ScriptExecutionContext, RaisesException] IDBTransaction transaction(sequence<DOMString> storeNames, [Default=NullString] optional DOMString mode);
</del><ins>+ [Custom, RaisesExceptionWithMessage] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
+ [RaisesExceptionWithMessage] void deleteObjectStore(DOMString name);
+ [Custom, CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBTransaction transaction(DOMString storeName, [Default=NullString] optional DOMString mode);
+ [Custom, CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBTransaction transaction(sequence<DOMString> storeNames, [Default=NullString] optional DOMString mode);
</ins><span class="cx"> void close();
</span><span class="cx">
</span><span class="cx"> attribute EventHandler onabort;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseExceptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">
</span><span class="cx"> description->typeName = "DOM IDBDatabase";
</span><span class="cx"> description->code = entry->code;
</span><del>- description->type = DOMCoreExceptionType;
</del><ins>+ description->type = IDBDatabaseExceptionType;
</ins><span class="cx">
</span><span class="cx"> description->name = entry ? entry->name : 0;
</span><span class="cx"> description->description = entry ? entry->description : 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -41,6 +41,8 @@
</span><span class="cx"> class IDBFactoryBackendInterface;
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="cx">
</span><ins>+struct ExceptionCodeWithMessage;
+
</ins><span class="cx"> typedef int ExceptionCode;
</span><span class="cx">
</span><span class="cx"> class IDBFactory : public RefCounted<IDBFactory> {
</span><span class="lines">@@ -56,7 +58,7 @@
</span><span class="cx"> virtual RefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, unsigned long long version, ExceptionCode&) = 0;
</span><span class="cx"> virtual RefPtr<IDBOpenDBRequest> deleteDatabase(ScriptExecutionContext*, const String& name, ExceptionCode&) = 0;
</span><span class="cx">
</span><del>- virtual short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue& first, const Deprecated::ScriptValue& second, ExceptionCode&) = 0;
</del><ins>+ virtual short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue& first, const Deprecated::ScriptValue& second, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> IDBFactory();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactoryidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -30,6 +30,6 @@
</span><span class="cx"> ] interface IDBFactory {
</span><span class="cx"> [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version);
</span><span class="cx"> [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest deleteDatabase(DOMString name);
</span><del>- [CallWith=ScriptExecutionContext, RaisesException] short cmp(any first, any second);
</del><ins>+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] short cmp(any first, any second);
</ins><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -55,27 +55,27 @@
</span><span class="cx"> virtual bool unique() const = 0;
</span><span class="cx"> virtual bool multiEntry() const = 0;
</span><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> getKey(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> getKey(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> getKey(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> getKey(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> IDBIndex();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -34,17 +34,17 @@
</span><span class="cx"> readonly attribute boolean multiEntry;
</span><span class="cx"> readonly attribute boolean unique;
</span><span class="cx">
</span><del>- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor(optional IDBKeyRange? range, optional DOMString direction);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor(any key, optional DOMString direction);
</del><ins>+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range, optional DOMString direction);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction);
</ins><span class="cx">
</span><del>- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openKeyCursor(optional IDBKeyRange? range, optional DOMString direction);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openKeyCursor(any key, optional DOMString direction);
</del><ins>+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openKeyCursor(optional IDBKeyRange? range, optional DOMString direction);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openKeyCursor(any key, optional DOMString direction);
</ins><span class="cx">
</span><del>- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(IDBKeyRange? key);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(any key);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest getKey(IDBKeyRange? key);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest getKey(any key);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count(optional IDBKeyRange? range);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count(any key);
</del><ins>+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(IDBKeyRange? key);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(any key);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest getKey(IDBKeyRange? key);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest getKey(any key);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(any key);
</ins><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -67,30 +67,30 @@
</span><span class="cx"> virtual RefPtr<IDBTransaction> transaction() = 0;
</span><span class="cx"> virtual bool autoIncrement() const = 0;
</span><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> clear(ScriptExecutionContext*, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> clear(ScriptExecutionContext*, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBIndex> createIndex(ScriptExecutionContext*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBIndex> createIndex(ScriptExecutionContext*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBIndex> index(const String& name, ExceptionCode&) = 0;
- virtual void deleteIndex(const String& name, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBIndex> index(const String& name, ExceptionCodeWithMessage&) = 0;
+ virtual void deleteIndex(const String& name, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) = 0;
- virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) = 0;
+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> IDBObjectStore();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -34,19 +34,19 @@
</span><span class="cx"> readonly attribute IDBTransaction transaction;
</span><span class="cx"> readonly attribute boolean autoIncrement;
</span><span class="cx">
</span><del>- [CallWith=ScriptExecutionContext, Custom, ImplementedAs=putFunction, RaisesException] IDBRequest put(any value, optional any key);
- [CallWith=ScriptExecutionContext, Custom, RaisesException] IDBRequest add(any value, optional any key);
- [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(IDBKeyRange? keyRange);
- [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(any key);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(IDBKeyRange? key);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest get(any key);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest clear();
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor(optional IDBKeyRange? range, optional DOMString direction);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest openCursor(any key, optional DOMString direction);
- [CallWith=ScriptExecutionContext, Custom, RaisesException] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional Dictionary options);
- [CallWith=ScriptExecutionContext, Custom, RaisesException] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options);
- [RaisesException] IDBIndex index(DOMString name);
- [RaisesException] void deleteIndex(DOMString name);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count(optional IDBKeyRange? range);
- [CallWith=ScriptExecutionContext, RaisesException] IDBRequest count(any key);
</del><ins>+ [CallWith=ScriptExecutionContext, Custom, ImplementedAs=putFunction, RaisesExceptionWithMessage] IDBRequest put(any value, optional any key);
+ [CallWith=ScriptExecutionContext, Custom, RaisesExceptionWithMessage] IDBRequest add(any value, optional any key);
+ [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete(IDBKeyRange? keyRange);
+ [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete(any key);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(IDBKeyRange? key);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(any key);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest clear();
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range, optional DOMString direction);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction);
+ [CallWith=ScriptExecutionContext, Custom, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional Dictionary options);
+ [CallWith=ScriptExecutionContext, Custom, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options);
+ [RaisesExceptionWithMessage] IDBIndex index(DOMString name);
+ [RaisesExceptionWithMessage] void deleteIndex(DOMString name);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range);
+ [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(any key);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -42,6 +42,8 @@
</span><span class="cx">
</span><span class="cx"> class IDBTransaction;
</span><span class="cx">
</span><ins>+struct ExceptionCodeWithMessage;
+
</ins><span class="cx"> typedef int ExceptionCode;
</span><span class="cx">
</span><span class="cx"> // Defined in the IDL
</span><span class="lines">@@ -55,9 +57,9 @@
</span><span class="cx"> public:
</span><span class="cx"> virtual ~IDBRequest() { }
</span><span class="cx">
</span><del>- virtual RefPtr<IDBAny> result(ExceptionCode&) const = 0;
</del><ins>+ virtual RefPtr<IDBAny> result(ExceptionCodeWithMessage&) const = 0;
</ins><span class="cx"> virtual unsigned short errorCode(ExceptionCode&) const = 0;
</span><del>- virtual RefPtr<DOMError> error(ExceptionCode&) const = 0;
</del><ins>+ virtual RefPtr<DOMError> error(ExceptionCodeWithMessage&) const = 0;
</ins><span class="cx"> virtual RefPtr<IDBAny> source() const = 0;
</span><span class="cx"> virtual RefPtr<IDBTransaction> transaction() const = 0;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -36,8 +36,8 @@
</span><span class="cx"> JSGenerateToNativeObject,
</span><span class="cx"> SkipVTableValidation,
</span><span class="cx"> ] interface IDBRequest : EventTarget {
</span><del>- [GetterRaisesException] readonly attribute IDBAny result;
- [GetterRaisesException] readonly attribute DOMError error;
</del><ins>+ [GetterRaisesExceptionWithMessage] readonly attribute IDBAny result;
+ [GetterRaisesExceptionWithMessage] readonly attribute DOMError error;
</ins><span class="cx"> readonly attribute IDBAny source;
</span><span class="cx"> readonly attribute IDBTransaction transaction;
</span><span class="cx"> readonly attribute DOMString readyState;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -44,6 +44,8 @@
</span><span class="cx"> class IDBDatabaseError;
</span><span class="cx"> class IDBObjectStore;
</span><span class="cx"> class IDBOpenDBRequest;
</span><ins>+
+struct ExceptionCodeWithMessage;
</ins><span class="cx"> struct IDBObjectStoreMetadata;
</span><span class="cx">
</span><span class="cx"> class IDBTransaction : public ScriptWrappable, public RefCounted<IDBTransaction>, public EventTargetWithInlineData, public ActiveDOMObject {
</span><span class="lines">@@ -63,8 +65,8 @@
</span><span class="cx"> virtual const String& mode() const = 0;
</span><span class="cx"> virtual IDBDatabase* db() = 0;
</span><span class="cx"> virtual RefPtr<DOMError> error() const = 0;
</span><del>- virtual RefPtr<IDBObjectStore> objectStore(const String& name, ExceptionCode&) = 0;
- virtual void abort(ExceptionCode&) = 0;
</del><ins>+ virtual RefPtr<IDBObjectStore> objectStore(const String& name, ExceptionCodeWithMessage&) = 0;
+ virtual void abort(ExceptionCodeWithMessage&) = 0;
</ins><span class="cx">
</span><span class="cx"> using RefCounted<IDBTransaction>::ref;
</span><span class="cx"> using RefCounted<IDBTransaction>::deref;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -37,8 +37,8 @@
</span><span class="cx"> readonly attribute IDBDatabase db;
</span><span class="cx"> readonly attribute DOMError error;
</span><span class="cx">
</span><del>- [RaisesException] IDBObjectStore objectStore (DOMString name);
- [RaisesException] void abort ();
</del><ins>+ [RaisesExceptionWithMessage] IDBObjectStore objectStore (DOMString name);
+ [RaisesExceptionWithMessage] void abort ();
</ins><span class="cx">
</span><span class="cx"> attribute EventHandler onabort;
</span><span class="cx"> attribute EventHandler oncomplete;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -110,36 +110,56 @@
</span><span class="cx"> return &m_source.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBCursor::update(JSC::ExecState& exec, Deprecated::ScriptValue& value, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBCursor::update(JSC::ExecState& exec, Deprecated::ScriptValue& value, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBCursor::update");
</span><span class="cx">
</span><span class="cx"> if (sourcesDeleted()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!transaction().isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (transaction().isReadOnly()) {
</span><del>- ec = IDBDatabaseException::ReadOnlyError;
</del><ins>+ ec.code = IDBDatabaseException::ReadOnlyError;
+ ec.message = ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_gotValue) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (isKeyCursor()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ auto& objectStore = effectiveObjectStore();
+ auto& keyPath = objectStore.info().keyPath();
+ const bool usesInLineKeys = !keyPath.isNull();
+ if (usesInLineKeys) {
+ RefPtr<IDBKey> keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(exec, value, keyPath);
+ IDBKeyData keyPathKeyData(keyPathKey.get());
+ if (!keyPathKey || keyPathKeyData != m_currentPrimaryKeyData) {
+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.");
+ return nullptr;
+ }
+ }
+
</ins><span class="cx"> auto request = effectiveObjectStore().putForCursorUpdate(exec, value.jsValue(), m_deprecatedCurrentPrimaryKey.jsValue(), ec);
</span><ins>+ if (ec.code)
+ return nullptr;
+
+ ASSERT(request);
</ins><span class="cx"> request->setSource(*this);
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="lines">@@ -166,11 +186,13 @@
</span><span class="cx">
</span><span class="cx"> if (!transaction().isActive()) {
</span><span class="cx"> ec.code = IDBDatabaseException::TransactionInactiveError;
</span><ins>+ ec.message = ASCIILiteral("Failed to execute 'advance' on 'IDBCursor': The transaction is inactive or finished.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_gotValue) {
</span><span class="cx"> ec.code = IDBDatabaseException::InvalidStateError;
</span><ins>+ ec.message = ASCIILiteral("Failed to execute 'advance' on 'IDBCursor': The cursor is being iterated or has iterated past its end.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -179,20 +201,20 @@
</span><span class="cx"> uncheckedIteratorCursor(IDBKeyData(), count);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBCursor::continueFunction(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+void IDBCursor::continueFunction(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (!context) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> continueFunction(IDBKeyData(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBCursor::continueFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec)
</del><ins>+void IDBCursor::continueFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& keyValue, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (!context) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -201,42 +223,47 @@
</span><span class="cx"> continueFunction(key.get(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBCursor::continueFunction(const IDBKeyData& key, ExceptionCode& ec)
</del><ins>+void IDBCursor::continueFunction(const IDBKeyData& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBCursor::continueFunction");
</span><span class="cx">
</span><span class="cx"> if (!m_request) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (sourcesDeleted()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!transaction().isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_gotValue) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!key.isNull() && !key.isValid()) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The parameter is not a valid key.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_info.isDirectionForward()) {
</span><span class="cx"> if (!key.isNull() && key.compare(m_currentPrimaryKeyData) <= 0) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> } else if (!key.isNull() && key.compare(m_currentPrimaryKeyData) >= 0) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -251,35 +278,43 @@
</span><span class="cx"> transaction().iterateCursor(*this, key, count);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBCursor::deleteFunction(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBCursor::deleteFunction(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBCursor::deleteFunction");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (sourcesDeleted()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!transaction().isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (transaction().isReadOnly()) {
</span><del>- ec = IDBDatabaseException::ReadOnlyError;
</del><ins>+ ec.code = IDBDatabaseException::ReadOnlyError;
+ ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The record may not be deleted inside a read-only transaction.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_gotValue) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (isKeyCursor()) {
+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The cursor is a key cursor.");
+ return nullptr;
+ }
+
</ins><span class="cx"> return effectiveObjectStore().deleteFunction(context, m_deprecatedCurrentPrimaryKey.jsValue(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -55,13 +55,13 @@
</span><span class="cx"> virtual const Deprecated::ScriptValue& value() const override final;
</span><span class="cx"> virtual IDBAny* source() override final;
</span><span class="cx">
</span><del>- virtual RefPtr<WebCore::IDBRequest> update(JSC::ExecState&, Deprecated::ScriptValue&, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<WebCore::IDBRequest> update(JSC::ExecState&, Deprecated::ScriptValue&, ExceptionCodeWithMessage&) override final;
</ins><span class="cx"> virtual void advance(unsigned long, ExceptionCodeWithMessage&) override final;
</span><del>- virtual void continueFunction(ScriptExecutionContext*, ExceptionCode&) override final;
- virtual void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCode&) override final;
</del><ins>+ virtual void continueFunction(ScriptExecutionContext*, ExceptionCodeWithMessage&) override final;
+ virtual void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><del>- void continueFunction(const IDBKeyData&, ExceptionCode&);
</del><ins>+ void continueFunction(const IDBKeyData&, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><span class="cx"> const IDBCursorInfo& info() const { return m_info; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -86,41 +86,45 @@
</span><span class="cx"> return WTF::move(objectStoreNames);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBObjectStore> IDBDatabase::createObjectStore(const String&, const Dictionary&, ExceptionCode&)
</del><ins>+RefPtr<WebCore::IDBObjectStore> IDBDatabase::createObjectStore(const String&, const Dictionary&, ExceptionCodeWithMessage&)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBDatabase::createObjectStore");
</span><span class="cx">
</span><span class="cx"> ASSERT(!m_versionChangeTransaction || m_versionChangeTransaction->isVersionChange());
</span><span class="cx">
</span><span class="cx"> if (!m_versionChangeTransaction) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_versionChangeTransaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_info.hasObjectStore(name)) {
</span><del>- ec = IDBDatabaseException::ConstraintError;
</del><ins>+ ec.code = IDBDatabaseException::ConstraintError;
+ ec.message = ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!keyPath.isNull() && !keyPath.isValid()) {
</span><del>- ec = IDBDatabaseException::SyntaxError;
</del><ins>+ ec.code = IDBDatabaseException::SyntaxError;
+ ec.message = ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (autoIncrement && !keyPath.isNull()) {
</span><span class="cx"> if ((keyPath.type() == IndexedDB::KeyPathType::String && keyPath.string().isEmpty()) || keyPath.type() == IndexedDB::KeyPathType::Array) {
</span><del>- ec = IDBDatabaseException::InvalidAccessError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidAccessError;
+ ec.message = ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -133,38 +137,43 @@
</span><span class="cx"> return adoptRef(&objectStore.leakRef());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext*, const Vector<String>& objectStores, const String& modeString, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext*, const Vector<String>& objectStores, const String& modeString, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBDatabase::transaction");
</span><span class="cx">
</span><span class="cx"> if (m_closePending) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (objectStores.isEmpty()) {
</span><del>- ec = IDBDatabaseException::InvalidAccessError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidAccessError;
+ ec.message = ASCIILiteral("Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- IndexedDB::TransactionMode mode = IDBTransaction::stringToMode(modeString, ec);
- if (ec)
</del><ins>+ IndexedDB::TransactionMode mode = IDBTransaction::stringToMode(modeString, ec.code);
+ if (ec.code) {
+ ec.message = ASCIILiteral("Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('invalid-mode') is not one of 'readonly' or 'readwrite'.");
</ins><span class="cx"> return nullptr;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> if (mode != IndexedDB::TransactionMode::ReadOnly && mode != IndexedDB::TransactionMode::ReadWrite) {
</span><del>- ec = TypeError;
</del><ins>+ ec.code = TypeError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_versionChangeTransaction && !m_versionChangeTransaction->isFinishedOrFinishing()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> for (auto& objectStoreName : objectStores) {
</span><span class="cx"> if (m_info.hasObjectStore(objectStoreName))
</span><span class="cx"> continue;
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
+ ec.message = ASCIILiteral("Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -178,29 +187,31 @@
</span><span class="cx"> return adoptRef(&transaction.leakRef());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, const String& objectStore, const String& mode, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, const String& objectStore, const String& mode, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> Vector<String> objectStores(1);
</span><span class="cx"> objectStores[0] = objectStore;
</span><span class="cx"> return transaction(context, objectStores, mode, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBDatabase::deleteObjectStore(const String& objectStoreName, ExceptionCode& ec)
</del><ins>+void IDBDatabase::deleteObjectStore(const String& objectStoreName, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBDatabase::deleteObjectStore");
</span><span class="cx">
</span><span class="cx"> if (!m_versionChangeTransaction) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_versionChangeTransaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_info.hasObjectStore(objectStoreName)) {
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
+ ec.message = ASCIILiteral("Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -53,11 +53,11 @@
</span><span class="cx"> virtual uint64_t version() const override final;
</span><span class="cx"> virtual RefPtr<DOMStringList> objectStoreNames() const override final;
</span><span class="cx">
</span><del>- virtual RefPtr<WebCore::IDBObjectStore> createObjectStore(const String& name, const Dictionary&, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBObjectStore> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBTransaction> transaction(ScriptExecutionContext*, const Vector<String>&, const String& mode, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBTransaction> transaction(ScriptExecutionContext*, const String&, const String& mode, ExceptionCode&) override final;
- virtual void deleteObjectStore(const String& name, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<WebCore::IDBObjectStore> createObjectStore(const String& name, const Dictionary&, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBObjectStore> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBTransaction> transaction(ScriptExecutionContext*, const Vector<String>&, const String& mode, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBTransaction> transaction(ScriptExecutionContext*, const String&, const String& mode, ExceptionCodeWithMessage&) override final;
+ virtual void deleteObjectStore(const String& name, ExceptionCodeWithMessage&) override final;
</ins><span class="cx"> virtual void close() override final;
</span><span class="cx">
</span><span class="cx"> // EventTarget
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -28,8 +28,10 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><ins>+#include "DOMRequestState.h"
</ins><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><ins>+#include "IDBBindingUtilities.h"
</ins><span class="cx"> #include "IDBDatabaseIdentifier.h"
</span><span class="cx"> #include "IDBOpenDBRequestImpl.h"
</span><span class="cx"> #include "Logging.h"
</span><span class="lines">@@ -148,9 +150,22 @@
</span><span class="cx"> return adoptRef(&request.leakRef());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-short IDBFactory::cmp(ScriptExecutionContext*, const Deprecated::ScriptValue&, const Deprecated::ScriptValue&, ExceptionCode&)
</del><ins>+short IDBFactory::cmp(ScriptExecutionContext* context, const Deprecated::ScriptValue& firstValue, const Deprecated::ScriptValue& secondValue, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><del>- return 0;
</del><ins>+ DOMRequestState requestState(context);
+ RefPtr<IDBKey> first = scriptValueToIDBKey(&requestState, firstValue);
+ RefPtr<IDBKey> second = scriptValueToIDBKey(&requestState, secondValue);
+
+ ASSERT(first);
+ ASSERT(second);
+
+ if (!first->isValid() || !second->isValid()) {
+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.");
+ return 0;
+ }
+
+ return static_cast<short>(first->compare(second.get()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace IDBClient
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> virtual RefPtr<WebCore::IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, unsigned long long version, ExceptionCode&) override final;
</span><span class="cx"> virtual RefPtr<WebCore::IDBOpenDBRequest> deleteDatabase(ScriptExecutionContext*, const String& name, ExceptionCode&) override final;
</span><span class="cx">
</span><del>- virtual short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue& first, const Deprecated::ScriptValue& second, ExceptionCode&) override final;
</del><ins>+ virtual short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue& first, const Deprecated::ScriptValue& second, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> IDBFactory(IDBConnectionToServer&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBIndexImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -86,23 +86,26 @@
</span><span class="cx"> return m_info.multiEntry();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& directionString, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& directionString, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::openCursor");
</span><span class="cx">
</span><span class="cx"> if (m_deleted || m_objectStore->isDeleted()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_objectStore->modernTransaction().isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
- if (ec)
</del><ins>+ IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+ if (ec.code) {
+ ec.message = ASCIILiteral("Failed to execute 'openCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.");
</ins><span class="cx"> return nullptr;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> IDBKeyRangeData rangeData = range;
</span><span class="cx"> if (rangeData.lowerKey.isNull())
</span><span class="lines">@@ -115,22 +118,24 @@
</span><span class="cx"> return WTF::move(request);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::openCursor");
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code) {
+ ec.message = ASCIILiteral("Failed to execute 'openCursor' on 'IDBIndex': The parameter is not a valid key.");
</ins><span class="cx"> return nullptr;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> return openCursor(context, keyRange.get(), direction, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::count");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -138,189 +143,199 @@
</span><span class="cx"> range.isNull = false;
</span><span class="cx"> return doCount(*context, range, ec);}
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::count");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return doCount(*context, IDBKeyRangeData(range), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::count");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</span><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return doCount(*context, IDBKeyRangeData(idbKey.get()), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::doCount(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::doCount(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (m_deleted || m_objectStore->isDeleted()) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (range.isNull) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto& transaction = m_objectStore->modernTransaction();
</span><span class="cx"> if (!transaction.isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return transaction.requestCount(context, *this, range);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& directionString, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& directionString, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::openKeyCursor");
</span><span class="cx">
</span><span class="cx"> if (m_deleted || m_objectStore->isDeleted()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_objectStore->modernTransaction().isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
- if (ec)
</del><ins>+ IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+ if (ec.code) {
+ ec.message = ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.");
</ins><span class="cx"> return nullptr;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> auto info = IDBCursorInfo::indexCursor(m_objectStore->modernTransaction(), m_objectStore->info().identifier(), m_info.identifier(), range, direction, IndexedDB::CursorType::KeyOnly);
</span><span class="cx"> Ref<IDBRequest> request = m_objectStore->modernTransaction().requestOpenCursor(*context, *this, info);
</span><span class="cx"> return WTF::move(request);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::openKeyCursor");
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code) {
+ ec.message = ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key.");
</ins><span class="cx"> return nullptr;
</span><del>-
</del><ins>+ }
</ins><span class="cx"> return openKeyCursor(context, keyRange.get(), direction, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::get(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::get(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::get");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return doGet(*context, IDBKeyRangeData(range), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::get(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::get(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::get");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</span><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return doGet(*context, IDBKeyRangeData(idbKey.get()), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::doGet(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::doGet(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (m_deleted || m_objectStore->isDeleted()) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (range.isNull) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto& transaction = m_objectStore->modernTransaction();
</span><span class="cx"> if (!transaction.isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return transaction.requestGetValue(context, *this, range);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::getKey(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::getKey(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::getKey");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return doGetKey(*context, IDBKeyRangeData(range), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::getKey(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::getKey(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::getKey");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</span><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return doGetKey(*context, IDBKeyRangeData(idbKey.get()), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBIndex::doGetKey(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBIndex::doGetKey(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (m_deleted || m_objectStore->isDeleted()) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (range.isNull) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto& transaction = m_objectStore->modernTransaction();
</span><span class="cx"> if (!transaction.isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBIndexImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -54,26 +54,26 @@
</span><span class="cx"> virtual bool unique() const override final;
</span><span class="cx"> virtual bool multiEntry() const override final;
</span><span class="cx">
</span><del>- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) override final { return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec) override final { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) override final { return openCursor(context, key, IDBCursor::directionNext(), ec); }
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec) override final { return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec) override final { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec) override final { return openCursor(context, key, IDBCursor::directionNext(), ec); }
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><del>- virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><del>- virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext* context, ExceptionCode& ec) override final { return openKeyCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
- virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec) override final { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
- virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) override final { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
- virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec) override final { return openKeyCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
+ virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec) override final { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
+ virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec) override final { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
+ virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><del>- virtual RefPtr<WebCore::IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> getKey(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> getKey(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<WebCore::IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> getKey(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> getKey(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><span class="cx"> const IDBIndexInfo& info() const { return m_info; }
</span><span class="cx">
</span><span class="lines">@@ -85,9 +85,9 @@
</span><span class="cx"> private:
</span><span class="cx"> IDBIndex(const IDBIndexInfo&, IDBObjectStore&);
</span><span class="cx">
</span><del>- RefPtr<WebCore::IDBRequest> doCount(ScriptExecutionContext&, const IDBKeyRangeData&, ExceptionCode&);
- RefPtr<WebCore::IDBRequest> doGet(ScriptExecutionContext&, const IDBKeyRangeData&, ExceptionCode&);
- RefPtr<WebCore::IDBRequest> doGetKey(ScriptExecutionContext&, const IDBKeyRangeData&, ExceptionCode&);
</del><ins>+ RefPtr<WebCore::IDBRequest> doCount(ScriptExecutionContext&, const IDBKeyRangeData&, ExceptionCodeWithMessage&);
+ RefPtr<WebCore::IDBRequest> doGet(ScriptExecutionContext&, const IDBKeyRangeData&, ExceptionCodeWithMessage&);
+ RefPtr<WebCore::IDBRequest> doGetKey(ScriptExecutionContext&, const IDBKeyRangeData&, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><span class="cx"> IDBIndexInfo m_info;
</span><span class="cx"> Ref<IDBObjectStore> m_objectStore;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -95,37 +95,38 @@
</span><span class="cx"> return m_info.autoIncrement();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return openCursor(context, keyRange, IDBCursor::directionNext(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return openCursor(context, key, IDBCursor::directionNext(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& directionString, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& directionString, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::openCursor");
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
- if (ec)
</del><ins>+ IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+ if (ec.code)
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> auto info = IDBCursorInfo::objectStoreCursor(m_transaction.get(), m_info.identifier(), range, direction);
</span><span class="lines">@@ -133,38 +134,42 @@
</span><span class="cx"> return WTF::move(request);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code) {
+ ec.message = ASCIILiteral("Failed to execute 'openCursor' on 'IDBObjectStore': The parameter is not a valid key.");
</ins><span class="cx"> return 0;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> return openCursor(context, keyRange.get(), direction, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::get");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</span><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -172,28 +177,28 @@
</span><span class="cx"> return WTF::move(request);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::get");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBKeyRangeData keyRangeData(keyRange);
</span><span class="cx"> if (!keyRangeData.isValid()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -201,66 +206,70 @@
</span><span class="cx"> return WTF::move(request);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::add(JSC::ExecState& state, JSC::JSValue value, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::add(JSC::ExecState& state, JSC::JSValue value, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return putOrAdd(state, value, nullptr, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::add(JSC::ExecState& execState, JSC::JSValue value, JSC::JSValue key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::add(JSC::ExecState& execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> auto idbKey = scriptValueToIDBKey(execState, key);
</span><span class="cx"> return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::put(JSC::ExecState& execState, JSC::JSValue value, JSC::JSValue key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::put(JSC::ExecState& execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> auto idbKey = scriptValueToIDBKey(execState, key);
</span><span class="cx"> return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::put(JSC::ExecState& state, JSC::JSValue value, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::put(JSC::ExecState& state, JSC::JSValue value, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return putOrAdd(state, value, nullptr, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> IDBObjectStore::putForCursorUpdate(JSC::ExecState& state, JSC::JSValue value, JSC::JSValue key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> IDBObjectStore::putForCursorUpdate(JSC::ExecState& state, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return putOrAdd(state, value, scriptValueToIDBKey(state, key), IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::DoNotPerform, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> IDBObjectStore::putOrAdd(JSC::ExecState& state, JSC::JSValue value, RefPtr<IDBKey> key, IndexedDB::ObjectStoreOverwriteMode overwriteMode, InlineKeyCheck inlineKeyCheck, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> IDBObjectStore::putOrAdd(JSC::ExecState& state, JSC::JSValue value, RefPtr<IDBKey> key, IndexedDB::ObjectStoreOverwriteMode overwriteMode, InlineKeyCheck inlineKeyCheck, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::putOrAdd");
</span><span class="cx">
</span><del>- if (m_transaction->isReadOnly()) {
- ec = IDBDatabaseException::ReadOnlyError;
</del><ins>+ if (!m_transaction->isActive()) {
+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!m_transaction->isActive()) {
- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ if (m_transaction->isReadOnly()) {
+ ec.code = IDBDatabaseException::ReadOnlyError;
+ ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: The transaction is read-only.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::create(&state, value, nullptr, nullptr);
</span><span class="cx"> if (state.hadException()) {
</span><del>- ec = IDBDatabaseException::DataCloneError;
</del><ins>+ ec.code = IDBDatabaseException::DataCloneError;
+ ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: An object could not be cloned.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (serializedValue->hasBlobURLs()) {
</span><span class="cx"> // FIXME: Add Blob/File/FileList support
</span><del>- ec = IDBDatabaseException::DataCloneError;
</del><ins>+ ec.code = IDBDatabaseException::DataCloneError;
+ ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (key && key->type() == KeyType::Invalid) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -268,24 +277,24 @@
</span><span class="cx"> bool usesKeyGenerator = autoIncrement();
</span><span class="cx"> if (usesInlineKeys && inlineKeyCheck == InlineKeyCheck::Perform) {
</span><span class="cx"> if (key) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBKey> keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(state, value, m_info.keyPath());
</span><span class="cx"> if (keyPathKey && !keyPathKey->isValid()) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!keyPathKey) {
</span><span class="cx"> if (usesKeyGenerator) {
</span><span class="cx"> if (!canInjectIDBKeyIntoScriptValue(state, value, m_info.keyPath())) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -295,13 +304,13 @@
</span><span class="cx"> key = keyPathKey;
</span><span class="cx"> }
</span><span class="cx"> } else if (!usesKeyGenerator && !key) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto context = scriptExecutionContextFromExecState(&state);
</span><span class="cx"> if (!context) {
</span><del>- ec = IDBDatabaseException::UnknownError;
</del><ins>+ ec.code = IDBDatabaseException::UnknownError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -310,28 +319,31 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::deleteFunction");
</span><span class="cx">
</span><del>- if (m_transaction->isReadOnly()) {
- ec = static_cast<ExceptionCode>(IDBDatabaseException::ReadOnlyError);
</del><ins>+ if (!m_transaction->isActive()) {
+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!m_transaction->isActive()) {
- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ if (m_transaction->isReadOnly()) {
+ ec.code = IDBDatabaseException::ReadOnlyError;
+ ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBKeyRangeData keyRangeData(keyRange);
</span><span class="cx"> if (!keyRangeData.isValid()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key range.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -339,39 +351,42 @@
</span><span class="cx"> return WTF::move(request);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return deleteFunction(context, key.jsValue(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, JSC::JSValue key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, JSC::JSValue key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</span><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return deleteFunction(context, &IDBKeyRange::create(idbKey.get()).get(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::clear(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::clear(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::clear");
</span><span class="cx">
</span><del>- if (m_transaction->isReadOnly()) {
- ec = static_cast<ExceptionCode>(IDBDatabaseException::ReadOnlyError);
</del><ins>+ if (!m_transaction->isActive()) {
+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!m_transaction->isActive()) {
- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ if (m_transaction->isReadOnly()) {
+ ec.code = IDBDatabaseException::ReadOnlyError;
+ ec.message = ASCIILiteral("Failed to execute 'clear' on 'IDBObjectStore': The transaction is read-only.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::InvalidStateError);
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -379,47 +394,51 @@
</span><span class="cx"> return adoptRef(request.leakRef());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBIndex> IDBObjectStore::createIndex(ScriptExecutionContext* context, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBIndex> IDBObjectStore::createIndex(ScriptExecutionContext* context, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::createIndex %s", name.utf8().data());
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::InvalidStateError);
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isVersionChange()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::InvalidStateError);
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': The database is not running a version change transaction.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!keyPath.isValid()) {
</span><del>- ec = IDBDatabaseException::SyntaxError;
</del><ins>+ ec.code = IDBDatabaseException::SyntaxError;
+ ec.message = ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument contains an invalid key path.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (name.isNull()) {
</span><del>- ec = TypeError;
</del><ins>+ ec.code = TypeError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_info.hasIndex(name)) {
</span><del>- ec = IDBDatabaseException::ConstraintError;
</del><ins>+ ec.code = IDBDatabaseException::ConstraintError;
+ ec.message = ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': An index with the specified name already exists.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (keyPath.type() == IndexedDB::KeyPathType::Array && multiEntry) {
</span><del>- ec = IDBDatabaseException::InvalidAccessError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidAccessError;
+ ec.message = ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument was an array and the multiEntry option is true.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -434,22 +453,18 @@
</span><span class="cx"> return WTF::move(index);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBIndex> IDBObjectStore::index(const String& indexName, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBIndex> IDBObjectStore::index(const String& indexName, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::index");
</span><span class="cx">
</span><del>- if (indexName.isEmpty()) {
- ec = NOT_FOUND_ERR;
- return nullptr;
- }
-
</del><span class="cx"> if (m_deleted) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'index' on 'IDBObjectStore': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -459,7 +474,8 @@
</span><span class="cx">
</span><span class="cx"> auto* info = m_info.infoForExistingIndex(indexName);
</span><span class="cx"> if (!info) {
</span><del>- ec = NOT_FOUND_ERR;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
+ ec.message = ASCIILiteral("Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -469,27 +485,29 @@
</span><span class="cx"> return WTF::move(index);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBObjectStore::deleteIndex(const String& name, ExceptionCode& ec)
</del><ins>+void IDBObjectStore::deleteIndex(const String& name, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::deleteIndex %s", name.utf8().data());
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::InvalidStateError);
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isVersionChange()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::InvalidStateError);
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'deleteIndex' on 'IDBObjectStore': The database is not running a version change transaction.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_info.hasIndex(name)) {
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
+ ec.message = ASCIILiteral("Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -505,12 +523,12 @@
</span><span class="cx"> m_transaction->deleteIndex(m_info.identifier(), name);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::count(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::count(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::count");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -519,51 +537,53 @@
</span><span class="cx"> return doCount(*context, range, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::count");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</span><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
+ ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return doCount(*context, IDBKeyRangeData(idbKey.get()), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::count(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::count(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::count");
</span><span class="cx">
</span><span class="cx"> if (!context) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return doCount(*context, IDBKeyRangeData(range), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::doCount(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::doCount(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBObjectStore': The transaction is inactive or finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (range.isNull) {
</span><del>- ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -58,30 +58,30 @@
</span><span class="cx"> virtual RefPtr<WebCore::IDBTransaction> transaction() override final;
</span><span class="cx"> virtual bool autoIncrement() const override final;
</span><span class="cx">
</span><del>- virtual RefPtr<WebCore::IDBRequest> add(JSC::ExecState&, JSC::JSValue, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> put(JSC::ExecState&, JSC::JSValue, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> add(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> put(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> deleteFunction(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> clear(ScriptExecutionContext*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBIndex> createIndex(ScriptExecutionContext*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBIndex> index(const String& name, ExceptionCode&) override final;
- virtual void deleteIndex(const String& name, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<WebCore::IDBRequest> add(JSC::ExecState&, JSC::JSValue, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> put(JSC::ExecState&, JSC::JSValue, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> add(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> put(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> deleteFunction(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> clear(ScriptExecutionContext*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBIndex> createIndex(ScriptExecutionContext*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBIndex> index(const String& name, ExceptionCodeWithMessage&) override final;
+ virtual void deleteIndex(const String& name, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<WebCore::IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><del>- RefPtr<IDBRequest> putForCursorUpdate(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCode&);
</del><ins>+ RefPtr<IDBRequest> putForCursorUpdate(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><del>- RefPtr<WebCore::IDBRequest> deleteFunction(ScriptExecutionContext*, JSC::JSValue key, ExceptionCode&);
</del><ins>+ RefPtr<WebCore::IDBRequest> deleteFunction(ScriptExecutionContext*, JSC::JSValue key, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><span class="cx"> void markAsDeleted();
</span><span class="cx"> bool isDeleted() const { return m_deleted; }
</span><span class="lines">@@ -100,8 +100,8 @@
</span><span class="cx"> DoNotPerform,
</span><span class="cx"> };
</span><span class="cx">
</span><del>- RefPtr<IDBRequest> putOrAdd(JSC::ExecState&, JSC::JSValue, RefPtr<IDBKey>, IndexedDB::ObjectStoreOverwriteMode, InlineKeyCheck, ExceptionCode&);
- RefPtr<WebCore::IDBRequest> doCount(ScriptExecutionContext&, const IDBKeyRangeData&, ExceptionCode&);
</del><ins>+ RefPtr<IDBRequest> putOrAdd(JSC::ExecState&, JSC::JSValue, RefPtr<IDBKey>, IndexedDB::ObjectStoreOverwriteMode, InlineKeyCheck, ExceptionCodeWithMessage&);
+ RefPtr<WebCore::IDBRequest> doCount(ScriptExecutionContext&, const IDBKeyRangeData&, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><span class="cx"> IDBObjectStoreInfo m_info;
</span><span class="cx"> Ref<IDBTransaction> m_transaction;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -120,12 +120,13 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBAny> IDBRequest::result(ExceptionCode& ec) const
</del><ins>+RefPtr<WebCore::IDBAny> IDBRequest::result(ExceptionCodeWithMessage& ec) const
</ins><span class="cx"> {
</span><span class="cx"> if (m_readyState == IDBRequestReadyState::Done)
</span><span class="cx"> return m_result;
</span><span class="cx">
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to read the 'result' property from 'IDBRequest': The request has not finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -134,12 +135,13 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<DOMError> IDBRequest::error(ExceptionCode& ec) const
</del><ins>+RefPtr<DOMError> IDBRequest::error(ExceptionCodeWithMessage& ec) const
</ins><span class="cx"> {
</span><span class="cx"> if (m_readyState == IDBRequestReadyState::Done)
</span><span class="cx"> return m_domError;
</span><span class="cx">
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to read the 'error' property from 'IDBRequest': The request has not finished.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -60,9 +60,9 @@
</span><span class="cx">
</span><span class="cx"> virtual ~IDBRequest() override;
</span><span class="cx">
</span><del>- virtual RefPtr<WebCore::IDBAny> result(ExceptionCode&) const override;
</del><ins>+ virtual RefPtr<WebCore::IDBAny> result(ExceptionCodeWithMessage&) const override;
</ins><span class="cx"> virtual unsigned short errorCode(ExceptionCode&) const override;
</span><del>- virtual RefPtr<DOMError> error(ExceptionCode&) const override;
</del><ins>+ virtual RefPtr<DOMError> error(ExceptionCodeWithMessage&) const override;
</ins><span class="cx"> virtual RefPtr<WebCore::IDBAny> source() const override;
</span><span class="cx"> virtual RefPtr<WebCore::IDBTransaction> transaction() const override;
</span><span class="cx"> virtual const String& readyState() const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -121,17 +121,12 @@
</span><span class="cx"> return m_domError;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBObjectStore> IDBTransaction::objectStore(const String& objectStoreName, ExceptionCode& ec)
</del><ins>+RefPtr<WebCore::IDBObjectStore> IDBTransaction::objectStore(const String& objectStoreName, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::objectStore");
</span><span class="cx">
</span><del>- if (objectStoreName.isEmpty()) {
- ec = NOT_FOUND_ERR;
- return nullptr;
- }
-
</del><span class="cx"> if (isFinishedOrFinishing()) {
</span><del>- ec = INVALID_STATE_ERR;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -149,13 +144,15 @@
</span><span class="cx">
</span><span class="cx"> auto* info = m_database->info().infoForExistingObjectStore(objectStoreName);
</span><span class="cx"> if (!info) {
</span><del>- ec = NOT_FOUND_ERR;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
+ ec.message = ASCIILiteral("Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Version change transactions are scoped to every object store in the database.
</span><del>- if (!found && !isVersionChange()) {
- ec = NOT_FOUND_ERR;
</del><ins>+ if (!info || (!found && !isVersionChange())) {
+ ec.code = IDBDatabaseException::NotFoundError;
+ ec.message = ASCIILiteral("Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.");
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -172,16 +169,17 @@
</span><span class="cx"> ASSERT(!isFinishedOrFinishing());
</span><span class="cx">
</span><span class="cx"> m_domError = &error;
</span><del>- ExceptionCode ec;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> abort(ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBTransaction::abort(ExceptionCode& ec)
</del><ins>+void IDBTransaction::abort(ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::abort");
</span><span class="cx">
</span><span class="cx"> if (isFinishedOrFinishing()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
+ ec.message = ASCIILiteral("Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -68,8 +68,8 @@
</span><span class="cx"> virtual const String& mode() const override final;
</span><span class="cx"> virtual WebCore::IDBDatabase* db() override final;
</span><span class="cx"> virtual RefPtr<DOMError> error() const override final;
</span><del>- virtual RefPtr<WebCore::IDBObjectStore> objectStore(const String& name, ExceptionCode&) override final;
- virtual void abort(ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<WebCore::IDBObjectStore> objectStore(const String& name, ExceptionCodeWithMessage&) override final;
+ virtual void abort(ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><span class="cx"> virtual EventTargetInterface eventTargetInterface() const override final { return IDBTransactionEventTargetInterfaceType; }
</span><span class="cx"> virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -96,20 +96,20 @@
</span><span class="cx"> return m_source.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyCursor::update(JSC::ExecState& state, Deprecated::ScriptValue& value, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyCursor::update(JSC::ExecState& state, Deprecated::ScriptValue& value, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyCursor::update");
</span><span class="cx">
</span><span class="cx"> if (!m_gotValue || isKeyCursor()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (m_transaction->isReadOnly()) {
</span><del>- ec = IDBDatabaseException::ReadOnlyError;
</del><ins>+ ec.code = IDBDatabaseException::ReadOnlyError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> if (usesInLineKeys) {
</span><span class="cx"> RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(m_request->requestState()->exec(), value, keyPath);
</span><span class="cx"> if (!keyPathKey || !keyPathKey->isEqual(m_currentPrimaryKey.get())) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -152,29 +152,29 @@
</span><span class="cx"> ASSERT(!ec.code);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void LegacyCursor::continueFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec)
</del><ins>+void LegacyCursor::continueFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& keyValue, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue);
</span><span class="cx"> continueFunction(key.release(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void LegacyCursor::continueFunction(PassRefPtr<IDBKey> key, ExceptionCode& ec)
</del><ins>+void LegacyCursor::continueFunction(PassRefPtr<IDBKey> key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><del>- ec = 0;
</del><ins>+ ec.code = 0;
</ins><span class="cx"> LOG(StorageAPI, "LegacyCursor::continue");
</span><span class="cx"> if (key && !key->isValid()) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_gotValue) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -182,12 +182,12 @@
</span><span class="cx"> ASSERT(m_currentKey);
</span><span class="cx"> if (m_direction == IndexedDB::CursorDirection::Next || m_direction == IndexedDB::CursorDirection::NextNoDuplicate) {
</span><span class="cx"> if (!m_currentKey->isLessThan(key.get())) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> if (!key->isLessThan(m_currentKey.get())) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -197,30 +197,30 @@
</span><span class="cx"> // will be on the original context openCursor was called on. Is this right?
</span><span class="cx"> m_request->setPendingCursor(this);
</span><span class="cx"> m_gotValue = false;
</span><del>- m_backend->continueFunction(key, m_request, ec);
- ASSERT(!ec);
</del><ins>+ m_backend->continueFunction(key, m_request, ec.code);
+ ASSERT(!ec.code);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyCursor::deleteFunction(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyCursor::deleteFunction(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><del>- ec = 0;
</del><ins>+ ec.code = 0;
</ins><span class="cx"> LOG(StorageAPI, "LegacyCursor::delete");
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (m_transaction->isReadOnly()) {
</span><del>- ec = IDBDatabaseException::ReadOnlyError;
</del><ins>+ ec.code = IDBDatabaseException::ReadOnlyError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_gotValue || isKeyCursor()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> RefPtr<LegacyRequest> request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
</span><del>- m_backend->deleteFunction(request, ec);
- ASSERT(!ec);
</del><ins>+ m_backend->deleteFunction(request, ec.code);
+ ASSERT(!ec.code);
</ins><span class="cx"> return request.release();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -61,14 +61,14 @@
</span><span class="cx"> const Deprecated::ScriptValue& value() const override;
</span><span class="cx"> IDBAny* source() override;
</span><span class="cx">
</span><del>- RefPtr<IDBRequest> update(JSC::ExecState&, Deprecated::ScriptValue&, ExceptionCode&) override;
</del><ins>+ RefPtr<IDBRequest> update(JSC::ExecState&, Deprecated::ScriptValue&, ExceptionCodeWithMessage&) override;
</ins><span class="cx"> void advance(unsigned long, ExceptionCodeWithMessage&) override;
</span><span class="cx"> // FIXME: Try to modify the code generator so this overload is unneeded.
</span><del>- void continueFunction(ScriptExecutionContext*, ExceptionCode& ec) override { continueFunction(static_cast<IDBKey*>(nullptr), ec); }
- void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override;
- RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCode&) override;
</del><ins>+ void continueFunction(ScriptExecutionContext*, ExceptionCodeWithMessage& ec) override { continueFunction(static_cast<IDBKey*>(nullptr), ec); }
+ void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override;
+ RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCodeWithMessage&) override;
</ins><span class="cx">
</span><del>- void continueFunction(PassRefPtr<IDBKey>, ExceptionCode&);
</del><ins>+ void continueFunction(PassRefPtr<IDBKey>, ExceptionCodeWithMessage&);
</ins><span class="cx"> void postSuccessHandlerCallback();
</span><span class="cx"> void close();
</span><span class="cx"> void setValueReady(DOMRequestState*, PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, Deprecated::ScriptValue&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx"> return m_metadata.version != IDBDatabaseMetadata::NoIntVersion ? m_metadata.version : static_cast<uint64_t>(IDBDatabaseMetadata::DefaultIntVersion);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBObjectStore> LegacyDatabase::createObjectStore(const String& name, const Dictionary& options, ExceptionCode& ec)
</del><ins>+RefPtr<IDBObjectStore> LegacyDatabase::createObjectStore(const String& name, const Dictionary& options, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> IDBKeyPath keyPath;
</span><span class="cx"> bool autoIncrement = false;
</span><span class="lines">@@ -179,30 +179,30 @@
</span><span class="cx"> return createObjectStore(name, keyPath, autoIncrement, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBObjectStore> LegacyDatabase::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, ExceptionCode& ec)
</del><ins>+RefPtr<IDBObjectStore> LegacyDatabase::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyDatabase::createObjectStore");
</span><span class="cx"> if (!m_versionChangeTransaction) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_versionChangeTransaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (containsObjectStore(name)) {
</span><del>- ec = IDBDatabaseException::ConstraintError;
</del><ins>+ ec.code = IDBDatabaseException::ConstraintError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!keyPath.isNull() && !keyPath.isValid()) {
</span><del>- ec = IDBDatabaseException::SyntaxError;
</del><ins>+ ec.code = IDBDatabaseException::SyntaxError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (autoIncrement && ((keyPath.type() == IndexedDB::KeyPathType::String && keyPath.string().isEmpty()) || keyPath.type() == IndexedDB::KeyPathType::Array)) {
</span><del>- ec = IDBDatabaseException::InvalidAccessError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidAccessError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -218,21 +218,21 @@
</span><span class="cx"> return objectStore.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void LegacyDatabase::deleteObjectStore(const String& name, ExceptionCode& ec)
</del><ins>+void LegacyDatabase::deleteObjectStore(const String& name, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyDatabase::deleteObjectStore");
</span><span class="cx"> if (!m_versionChangeTransaction) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (!m_versionChangeTransaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int64_t objectStoreId = findObjectStoreId(name);
</span><span class="cx"> if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -241,20 +241,20 @@
</span><span class="cx"> m_metadata.objectStores.remove(objectStoreId);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBTransaction> LegacyDatabase::transaction(ScriptExecutionContext* context, const Vector<String>& scope, const String& modeString, ExceptionCode& ec)
</del><ins>+RefPtr<IDBTransaction> LegacyDatabase::transaction(ScriptExecutionContext* context, const Vector<String>& scope, const String& modeString, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyDatabase::transaction");
</span><span class="cx"> if (!scope.size()) {
</span><del>- ec = IDBDatabaseException::InvalidAccessError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidAccessError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- IndexedDB::TransactionMode mode = IDBTransaction::stringToMode(modeString, ec);
- if (ec)
</del><ins>+ IndexedDB::TransactionMode mode = IDBTransaction::stringToMode(modeString, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> if (m_versionChangeTransaction || m_closePending) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx"> for (auto& name : scope) {
</span><span class="cx"> int64_t objectStoreId = findObjectStoreId(name);
</span><span class="cx"> if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> objectStoreIds.append(objectStoreId);
</span><span class="lines">@@ -275,7 +275,7 @@
</span><span class="cx"> return transaction.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBTransaction> LegacyDatabase::transaction(ScriptExecutionContext* context, const String& storeName, const String& mode, ExceptionCode& ec)
</del><ins>+RefPtr<IDBTransaction> LegacyDatabase::transaction(ScriptExecutionContext* context, const String& storeName, const String& mode, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<DOMStringList> storeNames = DOMStringList::create();
</span><span class="cx"> storeNames->append(storeName);
</span><span class="lines">@@ -284,8 +284,9 @@
</span><span class="cx">
</span><span class="cx"> void LegacyDatabase::forceClose()
</span><span class="cx"> {
</span><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> for (auto& transaction : m_transactions.values())
</span><del>- transaction->abort(IGNORE_EXCEPTION);
</del><ins>+ transaction->abort(ec);
</ins><span class="cx"> this->close();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -65,11 +65,11 @@
</span><span class="cx"> virtual uint64_t version() const override final;
</span><span class="cx"> virtual RefPtr<DOMStringList> objectStoreNames() const override final;
</span><span class="cx">
</span><del>- virtual RefPtr<IDBObjectStore> createObjectStore(const String& name, const Dictionary&, ExceptionCode&) override final;
- virtual RefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, ExceptionCode&) override final;
- virtual RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const Vector<String>&, const String& mode, ExceptionCode&) override final;
- virtual RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String&, const String& mode, ExceptionCode&) override final;
- virtual void deleteObjectStore(const String& name, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<IDBObjectStore> createObjectStore(const String& name, const Dictionary&, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const Vector<String>&, const String& mode, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String&, const String& mode, ExceptionCodeWithMessage&) override final;
+ virtual void deleteObjectStore(const String& name, ExceptionCodeWithMessage&) override final;
</ins><span class="cx"> virtual void close() override final;
</span><span class="cx">
</span><span class="cx"> // IDBDatabaseCallbacks
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> private:
</span><span class="cx"> LegacyDatabase(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackend>, PassRefPtr<IDBDatabaseCallbacks>);
</span><span class="cx">
</span><del>- PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, PassRefPtr<DOMStringList> scope, const String& mode, ExceptionCode& ec) { return transaction(context, *scope, mode, ec); }
</del><ins>+ PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, PassRefPtr<DOMStringList> scope, const String& mode, ExceptionCodeWithMessage& ec) { return transaction(context, *scope, mode, ec); }
</ins><span class="cx">
</span><span class="cx"> // ActiveDOMObject API.
</span><span class="cx"> void stop() override;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-short LegacyFactory::cmp(ScriptExecutionContext* context, const Deprecated::ScriptValue& firstValue, const Deprecated::ScriptValue& secondValue, ExceptionCode& ec)
</del><ins>+short LegacyFactory::cmp(ScriptExecutionContext* context, const Deprecated::ScriptValue& firstValue, const Deprecated::ScriptValue& secondValue, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> first = scriptValueToIDBKey(&requestState, firstValue);
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx"> ASSERT(second);
</span><span class="cx">
</span><span class="cx"> if (!first->isValid() || !second->isValid()) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> virtual RefPtr<IDBOpenDBRequest> open(ScriptExecutionContext*, const String& name, unsigned long long version, ExceptionCode&) override;
</span><span class="cx"> virtual RefPtr<IDBOpenDBRequest> deleteDatabase(ScriptExecutionContext*, const String& name, ExceptionCode&) override;
</span><span class="cx">
</span><del>- short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue& first, const Deprecated::ScriptValue& second, ExceptionCode&) override;
</del><ins>+ short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue& first, const Deprecated::ScriptValue& second, ExceptionCodeWithMessage&) override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> LegacyFactory(IDBFactoryBackendInterface*);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -54,19 +54,19 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, const String& directionString, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, const String& directionString, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::openCursor");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><del>- IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
- if (ec)
</del><ins>+ IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<LegacyRequest> request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
</span><span class="lines">@@ -75,24 +75,24 @@
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::openCursor");
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx"> return openCursor(context, keyRange.get(), direction, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::count(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::count(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::count");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> RefPtr<LegacyRequest> request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
</span><span class="lines">@@ -100,28 +100,28 @@
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::count");
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx"> return count(context, keyRange.get(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::openKeyCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, const String& directionString, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::openKeyCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, const String& directionString, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::openKeyCursor");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><del>- IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
- if (ec)
</del><ins>+ IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<LegacyRequest> request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
</span><span class="lines">@@ -130,37 +130,37 @@
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::openKeyCursor");
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx"> return openKeyCursor(context, keyRange.get(), direction, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::get(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::get(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::get");
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx"> return get(context, keyRange.get(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::get(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::get(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::get");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!keyRange) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -169,29 +169,29 @@
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::getKey(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::getKey(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::getKey");
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> return getKey(context, keyRange.get(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyIndex::getKey(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyIndex::getKey(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyIndex::getKey");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!keyRange) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyIndexh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -65,25 +65,25 @@
</span><span class="cx"> int64_t id() const { return m_metadata.id; }
</span><span class="cx">
</span><span class="cx"> // FIXME: Try to modify the code generator so this is unneeded.
</span><del>- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) override final { return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec) override final { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) override final { return openCursor(context, key, IDBCursor::directionNext(), ec); }
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&) override final;
- virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&) override final;
- virtual RefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCode& ec) override final { return count(context, static_cast<IDBKeyRange*>(nullptr), ec); }
- virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec) override final { return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec) override final { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec) override final { return openCursor(context, key, IDBCursor::directionNext(), ec); }
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec) override final { return count(context, static_cast<IDBKeyRange*>(nullptr), ec); }
+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, ExceptionCode& ec) override final { return openKeyCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec) override final { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) override final { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&) override final;
- virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec) override final { return openKeyCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec) override final { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec) override final { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><del>- virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
- virtual RefPtr<IDBRequest> getKey(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&) override final;
- virtual RefPtr<IDBRequest> getKey(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBRequest> getKey(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&) override final;
+ virtual RefPtr<IDBRequest> getKey(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><span class="cx"> void markDeleted() { m_deleted = true; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -68,19 +68,19 @@
</span><span class="cx"> return indexNames.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::get(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::get(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::get");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!keyRange) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> RefPtr<LegacyRequest> request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
</span><span class="lines">@@ -88,15 +88,15 @@
</span><span class="cx"> return request.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::get(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::get(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx"> return get(context, keyRange.get(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::add(JSC::ExecState& state, JSC::JSValue value, JSC::JSValue key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::add(JSC::ExecState& state, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::add");
</span><span class="cx"> auto deprecatedValue = Deprecated::ScriptValue(state.vm(), value);
</span><span class="lines">@@ -104,28 +104,28 @@
</span><span class="cx"> return put(IDBDatabaseBackend::AddOnly, LegacyAny::create(this), state, deprecatedValue, dKey, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::add(JSC::ExecState& state, JSC::JSValue value, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::add(JSC::ExecState& state, JSC::JSValue value, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::add");
</span><span class="cx"> auto deprecatedValue = Deprecated::ScriptValue(state.vm(), value);
</span><span class="cx"> return put(IDBDatabaseBackend::AddOnly, LegacyAny::create(this), state, deprecatedValue, static_cast<IDBKey*>(nullptr), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::put(JSC::ExecState& state, JSC::JSValue value, JSC::JSValue key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::put(JSC::ExecState& state, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::put");
</span><span class="cx"> auto deprecatedValue = Deprecated::ScriptValue(state.vm(), value);
</span><span class="cx"> return put(IDBDatabaseBackend::AddOrUpdate, LegacyAny::create(this), state, deprecatedValue, Deprecated::ScriptValue(state.vm(), key), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::put(JSC::ExecState& state, JSC::JSValue value, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::put(JSC::ExecState& state, JSC::JSValue value, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::put");
</span><span class="cx"> auto deprecatedValue = Deprecated::ScriptValue(state.vm(), value);
</span><span class="cx"> return put(IDBDatabaseBackend::AddOrUpdate, LegacyAny::create(this), state, deprecatedValue, static_cast<IDBKey*>(nullptr), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::put(IDBDatabaseBackend::PutMode putMode, RefPtr<LegacyAny> source, JSC::ExecState& state, Deprecated::ScriptValue& value, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::put(IDBDatabaseBackend::PutMode putMode, RefPtr<LegacyAny> source, JSC::ExecState& state, Deprecated::ScriptValue& value, const Deprecated::ScriptValue& keyValue, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> ScriptExecutionContext* context = scriptExecutionContextFromExecState(&state);
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="lines">@@ -133,19 +133,19 @@
</span><span class="cx"> return put(putMode, source, state, value, key.release(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::put(IDBDatabaseBackend::PutMode putMode, RefPtr<LegacyAny> source, JSC::ExecState& state, Deprecated::ScriptValue& value, RefPtr<IDBKey> prpKey, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::put(IDBDatabaseBackend::PutMode putMode, RefPtr<LegacyAny> source, JSC::ExecState& state, Deprecated::ScriptValue& value, RefPtr<IDBKey> prpKey, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<IDBKey> key = prpKey;
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> if (m_transaction->isReadOnly()) {
</span><del>- ec = IDBDatabaseException::ReadOnlyError;
</del><ins>+ ec.code = IDBDatabaseException::ReadOnlyError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx">
</span><span class="cx"> if (serializedValue->hasBlobURLs()) {
</span><span class="cx"> // FIXME: Add Blob/File/FileList support
</span><del>- ec = IDBDatabaseException::DataCloneError;
</del><ins>+ ec.code = IDBDatabaseException::DataCloneError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -167,26 +167,26 @@
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx">
</span><span class="cx"> if (putMode != IDBDatabaseBackend::CursorUpdate && usesInLineKeys && key) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> if (!usesInLineKeys && !hasKeyGenerator && !key) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> if (usesInLineKeys) {
</span><span class="cx"> RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(requestState.exec(), value, keyPath);
</span><span class="cx"> if (keyPathKey && !keyPathKey->isValid()) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> if (!hasKeyGenerator && !keyPathKey) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> if (hasKeyGenerator && !keyPathKey) {
</span><span class="cx"> if (!canInjectIDBKeyIntoScriptValue(&requestState, value, keyPath)) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx"> key = keyPathKey;
</span><span class="cx"> }
</span><span class="cx"> if (key && !key->isValid()) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -225,23 +225,23 @@
</span><span class="cx"> return request.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::deleteFunction(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::deleteFunction(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::delete");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (m_transaction->isReadOnly()) {
</span><del>- ec = IDBDatabaseException::ReadOnlyError;
</del><ins>+ ec.code = IDBDatabaseException::ReadOnlyError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!keyRange) {
</span><del>- ec = IDBDatabaseException::DataError;
</del><ins>+ ec.code = IDBDatabaseException::DataError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -250,27 +250,27 @@
</span><span class="cx"> return request.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx"> return deleteFunction(context, keyRange.get(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::clear(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::clear(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::clear");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (m_transaction->isReadOnly()) {
</span><del>- ec = IDBDatabaseException::ReadOnlyError;
</del><ins>+ ec.code = IDBDatabaseException::ReadOnlyError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -321,7 +321,9 @@
</span><span class="cx"> Vector<int64_t, 1> indexIds;
</span><span class="cx"> indexIds.append(m_indexMetadata.id);
</span><span class="cx"> if (cursor) {
</span><del>- cursor->continueFunction(static_cast<IDBKey*>(nullptr), ASSERT_NO_EXCEPTION);
</del><ins>+ ExceptionCodeWithMessage ec;
+ cursor->continueFunction(static_cast<IDBKey*>(nullptr), ec);
+ ASSERT(!ec.code);
</ins><span class="cx">
</span><span class="cx"> RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey();
</span><span class="cx"> Deprecated::ScriptValue value = cursor->value();
</span><span class="lines">@@ -355,7 +357,7 @@
</span><span class="cx"> };
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBIndex> LegacyObjectStore::createIndex(ScriptExecutionContext* context, const String& name, const IDBKeyPath& keyPath, const Dictionary& options, ExceptionCode& ec)
</del><ins>+RefPtr<IDBIndex> LegacyObjectStore::createIndex(ScriptExecutionContext* context, const String& name, const IDBKeyPath& keyPath, const Dictionary& options, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> bool unique = false;
</span><span class="cx"> options.get("unique", unique);
</span><span class="lines">@@ -366,32 +368,32 @@
</span><span class="cx"> return createIndex(context, name, keyPath, unique, multiEntry, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBIndex> LegacyObjectStore::createIndex(ScriptExecutionContext* context, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionCode& ec)
</del><ins>+RefPtr<IDBIndex> LegacyObjectStore::createIndex(ScriptExecutionContext* context, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::createIndex");
</span><span class="cx"> if (!m_transaction->isVersionChange() || m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!keyPath.isValid()) {
</span><del>- ec = IDBDatabaseException::SyntaxError;
</del><ins>+ ec.code = IDBDatabaseException::SyntaxError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (name.isNull()) {
</span><del>- ec = TypeError;
</del><ins>+ ec.code = TypeError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (containsIndex(name)) {
</span><del>- ec = IDBDatabaseException::ConstraintError;
</del><ins>+ ec.code = IDBDatabaseException::ConstraintError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (keyPath.type() == IndexedDB::KeyPathType::Array && multiEntry) {
</span><del>- ec = IDBDatabaseException::InvalidAccessError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidAccessError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -405,23 +407,23 @@
</span><span class="cx"> m_indexMap.set(name, index);
</span><span class="cx"> m_metadata.indexes.set(indexId, metadata);
</span><span class="cx">
</span><del>- ASSERT(!ec);
- if (ec)
</del><ins>+ ASSERT(!ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> ASSERT_UNUSED(context, context);
</span><span class="cx"> return index.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBIndex> LegacyObjectStore::index(const String& name, ExceptionCode& ec)
</del><ins>+RefPtr<IDBIndex> LegacyObjectStore::index(const String& name, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::index");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (m_transaction->isFinished()) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -431,7 +433,7 @@
</span><span class="cx">
</span><span class="cx"> int64_t indexId = findIndexId(name);
</span><span class="cx"> if (indexId == IDBIndexMetadata::InvalidId) {
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -450,20 +452,20 @@
</span><span class="cx"> return index.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void LegacyObjectStore::deleteIndex(const String& name, ExceptionCode& ec)
</del><ins>+void LegacyObjectStore::deleteIndex(const String& name, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::deleteIndex");
</span><span class="cx"> if (!m_transaction->isVersionChange() || m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> int64_t indexId = findIndexId(name);
</span><span class="cx"> if (indexId == IDBIndexMetadata::InvalidId) {
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -477,39 +479,39 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return openCursor(context, keyRange, IDBCursor::directionNext(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return openCursor(context, key, IDBCursor::directionNext(), ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& direction, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& direction, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> return openCursor(context, range, direction, IDBDatabaseBackend::NormalTask, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& directionString, IDBDatabaseBackend::TaskType taskType, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, IDBKeyRange* range, const String& directionString, IDBDatabaseBackend::TaskType taskType, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::openCursor");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><del>- IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
- if (ec)
</del><ins>+ IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<LegacyRequest> request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
</span><span class="lines">@@ -519,23 +521,23 @@
</span><span class="cx"> return request.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx"> return openCursor(context, keyRange.get(), direction, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::count(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::count(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "LegacyObjectStore::count");
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = IDBDatabaseException::TransactionInactiveError;
</del><ins>+ ec.code = IDBDatabaseException::TransactionInactiveError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> RefPtr<LegacyRequest> request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
</span><span class="lines">@@ -543,10 +545,10 @@
</span><span class="cx"> return request.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBRequest> LegacyObjectStore::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec)
</del><ins>+RefPtr<IDBRequest> LegacyObjectStore::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><del>- RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
- if (ec)
</del><ins>+ RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code);
+ if (ec.code)
</ins><span class="cx"> return 0;
</span><span class="cx"> return count(context, keyRange.get(), ec);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -67,37 +67,37 @@
</span><span class="cx"> RefPtr<IDBTransaction> transaction() { return m_transaction; }
</span><span class="cx"> bool autoIncrement() const { return m_metadata.autoIncrement; }
</span><span class="cx">
</span><del>- RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, ExceptionCode&);
- RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, ExceptionCode&);
- RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCode&);
- RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&);
- RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
- RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCode&);
- RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, IDBDatabaseBackend::TaskType, ExceptionCode&);
- RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&);
</del><ins>+ RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, IDBKeyRange*, const String& direction, IDBDatabaseBackend::TaskType, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><del>- RefPtr<IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
- RefPtr<IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&);
- RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCode&);
- RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCode&);
- RefPtr<IDBRequest> put(IDBDatabaseBackend::PutMode, RefPtr<LegacyAny>, JSC::ExecState&, Deprecated::ScriptValue&, RefPtr<IDBKey>, ExceptionCode&);
- RefPtr<IDBRequest> put(IDBDatabaseBackend::PutMode, RefPtr<LegacyAny> source, JSC::ExecState&, Deprecated::ScriptValue&, const Deprecated::ScriptValue& key, ExceptionCode&);
</del><ins>+ RefPtr<IDBRequest> get(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> put(IDBDatabaseBackend::PutMode, RefPtr<LegacyAny>, JSC::ExecState&, Deprecated::ScriptValue&, RefPtr<IDBKey>, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> put(IDBDatabaseBackend::PutMode, RefPtr<LegacyAny> source, JSC::ExecState&, Deprecated::ScriptValue&, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><del>- RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&);
- RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
- RefPtr<IDBRequest> clear(ScriptExecutionContext*, ExceptionCode&);
</del><ins>+ RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> clear(ScriptExecutionContext*, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><del>- RefPtr<IDBIndex> createIndex(ScriptExecutionContext* context, const String& name, const String& keyPath, const Dictionary& options, ExceptionCode& ec) { return createIndex(context, name, IDBKeyPath(keyPath), options, ec); }
- RefPtr<IDBIndex> createIndex(ScriptExecutionContext* context, const String& name, const Vector<String>& keyPath, const Dictionary& options, ExceptionCode& ec) { return createIndex(context, name, IDBKeyPath(keyPath), options, ec); }
- RefPtr<IDBIndex> createIndex(ScriptExecutionContext*, const String& name, const IDBKeyPath&, const Dictionary&, ExceptionCode&);
- RefPtr<IDBIndex> createIndex(ScriptExecutionContext*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionCode&);
</del><ins>+ RefPtr<IDBIndex> createIndex(ScriptExecutionContext* context, const String& name, const String& keyPath, const Dictionary& options, ExceptionCodeWithMessage& ec) { return createIndex(context, name, IDBKeyPath(keyPath), options, ec); }
+ RefPtr<IDBIndex> createIndex(ScriptExecutionContext* context, const String& name, const Vector<String>& keyPath, const Dictionary& options, ExceptionCodeWithMessage& ec) { return createIndex(context, name, IDBKeyPath(keyPath), options, ec); }
+ RefPtr<IDBIndex> createIndex(ScriptExecutionContext*, const String& name, const IDBKeyPath&, const Dictionary&, ExceptionCodeWithMessage&);
+ RefPtr<IDBIndex> createIndex(ScriptExecutionContext*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><del>- RefPtr<IDBIndex> index(const String& name, ExceptionCode&);
- void deleteIndex(const String& name, ExceptionCode&);
</del><ins>+ RefPtr<IDBIndex> index(const String& name, ExceptionCodeWithMessage&);
+ void deleteIndex(const String& name, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><del>- RefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCode& ec) { return count(context, static_cast<IDBKeyRange*>(nullptr), ec); }
- RefPtr<IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&);
- RefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
</del><ins>+ RefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCodeWithMessage& ec) { return count(context, static_cast<IDBKeyRange*>(nullptr), ec); }
+ RefPtr<IDBRequest> count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCodeWithMessage&);
+ RefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage&);
</ins><span class="cx">
</span><span class="cx"> void markDeleted() { m_deleted = true; }
</span><span class="cx"> void transactionFinished();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -95,19 +95,19 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBAny> LegacyRequest::result(ExceptionCode& ec) const
</del><ins>+RefPtr<IDBAny> LegacyRequest::result(ExceptionCodeWithMessage& ec) const
</ins><span class="cx"> {
</span><span class="cx"> if (m_readyState != IDBRequestReadyState::Done) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> return m_result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<DOMError> LegacyRequest::error(ExceptionCode& ec) const
</del><ins>+RefPtr<DOMError> LegacyRequest::error(ExceptionCodeWithMessage& ec) const
</ins><span class="cx"> {
</span><span class="cx"> if (m_readyState != IDBRequestReadyState::Done) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> return m_error;
</span><span class="lines">@@ -530,7 +530,8 @@
</span><span class="cx"> // doesn't receive a second error) and before deactivating (which might trigger commit).
</span><span class="cx"> if (event.type() == eventNames().errorEvent && dontPreventDefault && !m_requestAborted) {
</span><span class="cx"> m_transaction->setError(m_error, m_errorMessage);
</span><del>- m_transaction->abort(IGNORE_EXCEPTION);
</del><ins>+ ExceptionCodeWithMessage ec;
+ m_transaction->abort(ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If this was the last request in the transaction's list, it may commit here.
</span><span class="lines">@@ -551,7 +552,8 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_transaction && !m_requestAborted) {
</span><span class="cx"> m_transaction->setError(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::AbortError)), "Uncaught exception in event handler.");
</span><del>- m_transaction->abort(IGNORE_EXCEPTION);
</del><ins>+ ExceptionCodeWithMessage ec;
+ m_transaction->abort(ec);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -58,10 +58,10 @@
</span><span class="cx"> static Ref<LegacyRequest> create(ScriptExecutionContext*, PassRefPtr<LegacyAny> source, IDBDatabaseBackend::TaskType, LegacyTransaction*);
</span><span class="cx"> virtual ~LegacyRequest();
</span><span class="cx">
</span><del>- virtual RefPtr<IDBAny> result(ExceptionCode&) const override final;
</del><ins>+ virtual RefPtr<IDBAny> result(ExceptionCodeWithMessage&) const override final;
</ins><span class="cx"> PassRefPtr<LegacyAny> legacyResult(ExceptionCode&);
</span><span class="cx"> virtual unsigned short errorCode(ExceptionCode&) const override final;
</span><del>- virtual RefPtr<DOMError> error(ExceptionCode&) const override final;
</del><ins>+ virtual RefPtr<DOMError> error(ExceptionCodeWithMessage&) const override final;
</ins><span class="cx"> virtual RefPtr<IDBAny> source() const override final;
</span><span class="cx"> virtual RefPtr<IDBTransaction> transaction() const override final;
</span><span class="cx"> virtual const String& readyState() const override final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -112,10 +112,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBObjectStore> LegacyTransaction::objectStore(const String& name, ExceptionCode& ec)
</del><ins>+RefPtr<IDBObjectStore> LegacyTransaction::objectStore(const String& name, ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (m_state == Finished) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -124,14 +124,14 @@
</span><span class="cx"> return it->value;
</span><span class="cx">
</span><span class="cx"> if (!isVersionChange() && !m_objectStoreNames.contains(name)) {
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int64_t objectStoreId = m_database->findObjectStoreId(name);
</span><span class="cx"> if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
</span><span class="cx"> ASSERT(isVersionChange());
</span><del>- ec = IDBDatabaseException::NotFoundError;
</del><ins>+ ec.code = IDBDatabaseException::NotFoundError;
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -178,10 +178,10 @@
</span><span class="cx"> backendDB()->commit(m_id);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void LegacyTransaction::abort(ExceptionCode& ec)
</del><ins>+void LegacyTransaction::abort(ExceptionCodeWithMessage& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (m_state == Finishing || m_state == Finished) {
</span><del>- ec = IDBDatabaseException::InvalidStateError;
</del><ins>+ ec.code = IDBDatabaseException::InvalidStateError;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -350,8 +350,8 @@
</span><span class="cx"> void LegacyTransaction::stop()
</span><span class="cx"> {
</span><span class="cx"> m_contextStopped = true;
</span><del>-
- abort(IGNORE_EXCEPTION);
</del><ins>+ ExceptionCodeWithMessage ec;
+ abort(ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const char* LegacyTransaction::activeDOMObjectName() const
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -68,8 +68,8 @@
</span><span class="cx"> virtual const String& mode() const override final;
</span><span class="cx"> virtual IDBDatabase* db() override final;
</span><span class="cx"> virtual RefPtr<DOMError> error() const override final { return m_error; }
</span><del>- virtual RefPtr<IDBObjectStore> objectStore(const String& name, ExceptionCode&) override final;
- virtual void abort(ExceptionCode&) override final;
</del><ins>+ virtual RefPtr<IDBObjectStore> objectStore(const String& name, ExceptionCodeWithMessage&) override final;
+ virtual void abort(ExceptionCodeWithMessage&) override final;
</ins><span class="cx">
</span><span class="cx"> class OpenCursorNotifier {
</span><span class="cx"> public:
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "ExceptionInterfaces.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "HTMLParserIdioms.h"
</span><ins>+#include "IDBDatabaseException.h"
</ins><span class="cx"> #include "JSDOMWindowCustom.h"
</span><span class="cx"> #include "JSExceptionBase.h"
</span><span class="cx"> #include "SecurityOrigin.h"
</span><span class="lines">@@ -259,6 +260,10 @@
</span><span class="cx"> JSValue errorObject;
</span><span class="cx"> switch (description.type) {
</span><span class="cx"> DOM_EXCEPTION_INTERFACES_FOR_EACH(TRY_TO_CREATE_EXCEPTION)
</span><ins>+#if ENABLE(INDEXED_DATABASE)
+ case IDBDatabaseExceptionType:
+ errorObject = toJS(exec, globalObject, DOMCoreException::createWithDescriptionAsMessage(description));
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ASSERT(errorObject);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBDatabaseCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> JSValue result = toJS(&state, globalObject(), wrapped().createObjectStore(name, keyPath, autoIncrement, ec).get());
</span><span class="cx"> setDOMException(&state, ec);
</span><span class="cx"> return result;
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> JSValue result = toJS(&exec, globalObject(), wrapped().transaction(scriptContext, scope, mode, ec).get());
</span><span class="cx"> setDOMException(&exec, ec);
</span><span class="cx"> return result;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBObjectStoreCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> if (UNLIKELY(argsCount < 1))
</span><span class="cx"> return JSValue::decode(throwVMError(&state, createNotEnoughArgumentsError(&state)));
</span><span class="cx">
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> auto value = state.uncheckedArgument(0);
</span><span class="cx">
</span><span class="cx"> if (argsCount == 1) {
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> JSValue result = toJS(&state, globalObject(), wrapped().createIndex(context, name, keyPath, unique, multiEntry, ec).get());
</span><span class="cx"> setDOMException(&state, ec);
</span><span class="cx"> return result;
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMCoreExceptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMCoreException.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMCoreException.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/dom/DOMCoreException.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -40,11 +40,16 @@
</span><span class="cx"> return adoptRef(*new DOMCoreException(description));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ static Ref<DOMCoreException> createWithDescriptionAsMessage(const ExceptionCodeDescription& description)
+ {
+ return adoptRef(*new DOMCoreException(description, ExceptionBase::MessageSource::UseDescription));
+ }
+
</ins><span class="cx"> static bool initializeDescription(ExceptionCode, ExceptionCodeDescription*);
</span><span class="cx">
</span><del>-private:
- explicit DOMCoreException(const ExceptionCodeDescription& description)
- : ExceptionBase(description)
</del><ins>+protected:
+ explicit DOMCoreException(const ExceptionCodeDescription& description, ExceptionBase::MessageSource messageSource = MessageSource::ConstructMessage)
+ : ExceptionBase(description, messageSource)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomExceptionBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ExceptionBase.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ExceptionBase.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/dom/ExceptionBase.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -33,11 +33,16 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-ExceptionBase::ExceptionBase(const ExceptionCodeDescription& description)
</del><ins>+ExceptionBase::ExceptionBase(const ExceptionCodeDescription& description, MessageSource messageSource)
</ins><span class="cx"> : m_code(description.code)
</span><span class="cx"> , m_name(description.name)
</span><span class="cx"> , m_description(description.description)
</span><span class="cx"> {
</span><ins>+ if (messageSource == MessageSource::UseDescription) {
+ m_message = m_description;
+ return;
+ }
+
</ins><span class="cx"> if (description.name)
</span><span class="cx"> m_message = m_name + ": " + description.typeName + " Exception " + String::number(description.code);
</span><span class="cx"> else
</span></span></pre></div>
<a id="trunkSourceWebCoredomExceptionBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ExceptionBase.h (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ExceptionBase.h        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/dom/ExceptionBase.h        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -47,7 +47,11 @@
</span><span class="cx"> String toString() const;
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- explicit ExceptionBase(const ExceptionCodeDescription&);
</del><ins>+ enum class MessageSource {
+ ConstructMessage,
+ UseDescription,
+ };
+ explicit ExceptionBase(const ExceptionCodeDescription&, MessageSource = MessageSource::ConstructMessage);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> unsigned short m_code;
</span></span></pre></div>
<a id="trunkSourceWebCoredommake_dom_exceptionspl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/make_dom_exceptions.pl (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/make_dom_exceptions.pl        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/dom/make_dom_exceptions.pl        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -93,6 +93,9 @@
</span><span class="cx"> print F "#endif\n" if $conditional;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ print F "#if ENABLE(INDEXED_DATABASE)\n";
+ print F " IDBDatabaseExceptionType,\n";
+ print F "#endif\n";
</ins><span class="cx"> print F "};\n";
</span><span class="cx"> print F "\n";
</span><span class="cx"> print F "struct ExceptionCodeDescription {\n";
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (193427 => 193428)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2015-12-04 18:50:10 UTC (rev 193427)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2015-12-04 19:07:19 UTC (rev 193428)
</span><span class="lines">@@ -117,9 +117,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBRequest* idbRequest = static_cast<IDBRequest*>(event->target());
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> RefPtr<IDBAny> requestResult = idbRequest->result(ec);
</span><del>- if (ec) {
</del><ins>+ if (ec.code) {
</ins><span class="cx"> m_requestCallback->sendFailure("Could not get result in callback.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -179,9 +179,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBOpenDBRequest* idbOpenDBRequest = static_cast<IDBOpenDBRequest*>(event->target());
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> RefPtr<IDBAny> requestResult = idbOpenDBRequest->result(ec);
</span><del>- if (ec) {
</del><ins>+ if (ec.code) {
</ins><span class="cx"> m_executableWithDatabase->requestCallback().sendFailure("Could not get result in callback.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -221,27 +221,27 @@
</span><span class="cx">
</span><span class="cx"> static RefPtr<IDBTransaction> transactionForDatabase(ScriptExecutionContext* scriptExecutionContext, IDBDatabase* idbDatabase, const String& objectStoreName, const String& mode = IDBTransaction::modeReadOnly())
</span><span class="cx"> {
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> RefPtr<IDBTransaction> idbTransaction = idbDatabase->transaction(scriptExecutionContext, objectStoreName, mode, ec);
</span><del>- if (ec)
</del><ins>+ if (ec.code)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> return WTF::move(idbTransaction);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static RefPtr<IDBObjectStore> objectStoreForTransaction(IDBTransaction* idbTransaction, const String& objectStoreName)
</span><span class="cx"> {
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> RefPtr<IDBObjectStore> idbObjectStore = idbTransaction->objectStore(objectStoreName, ec);
</span><del>- if (ec)
</del><ins>+ if (ec.code)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> return WTF::move(idbObjectStore);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static RefPtr<IDBIndex> indexForObjectStore(IDBObjectStore* idbObjectStore, const String& indexName)
</span><span class="cx"> {
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> RefPtr<IDBIndex> idbIndex = idbObjectStore->index(indexName, ec);
</span><del>- if (ec)
</del><ins>+ if (ec.code)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> return WTF::move(idbIndex);
</span><span class="cx"> }
</span><span class="lines">@@ -437,9 +437,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBRequest* idbRequest = static_cast<IDBRequest*>(event->target());
</span><del>- ExceptionCode ec = 0;
- RefPtr<IDBAny> requestResult = idbRequest->result(ec);
- if (ec) {
</del><ins>+ ExceptionCodeWithMessage ecwm;
+ RefPtr<IDBAny> requestResult = idbRequest->result(ecwm);
+ if (ecwm.code) {
</ins><span class="cx"> m_requestCallback->sendFailure("Could not get result in callback.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -469,8 +469,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Continue cursor before making injected script calls, otherwise transaction might be finished.
</span><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> idbCursor->continueFunction(nullptr, ec);
</span><del>- if (ec) {
</del><ins>+ if (ec.code) {
</ins><span class="cx"> m_requestCallback->sendFailure("Could not continue cursor.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -534,7 +535,7 @@
</span><span class="cx">
</span><span class="cx"> Ref<OpenCursorCallback> openCursorCallback = OpenCursorCallback::create(m_injectedScript, m_requestCallback.copyRef(), m_skipCount, m_pageSize);
</span><span class="cx">
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> RefPtr<IDBRequest> idbRequest;
</span><span class="cx"> if (!m_indexName.isEmpty()) {
</span><span class="cx"> RefPtr<IDBIndex> idbIndex = indexForObjectStore(idbObjectStore.get(), m_indexName);
</span><span class="lines">@@ -748,11 +749,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ExceptionCode ec = 0;
</del><ins>+ ExceptionCodeWithMessage ec;
</ins><span class="cx"> RefPtr<IDBRequest> idbRequest = idbObjectStore->clear(context(), ec);
</span><del>- ASSERT(!ec);
- if (ec) {
- m_requestCallback->sendFailure(String::format("Could not clear object store '%s': %d", m_objectStoreName.utf8().data(), ec));
</del><ins>+ ASSERT(!ec.code);
+ if (ec.code) {
+ m_requestCallback->sendFailure(String::format("Could not clear object store '%s': %d", m_objectStoreName.utf8().data(), ec.code));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> idbTransaction->addEventListener(eventNames().completeEvent, ClearObjectStoreListener::create(m_requestCallback.copyRef()), false);
</span></span></pre>
</div>
</div>
</body>
</html>