<!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>[192948] trunk/Source/WebCore</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/192948">192948</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-02 11:13:02 -0800 (Wed, 02 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modern IDB: Get rid of IDBExceptionCode.
https://bugs.webkit.org/show_bug.cgi?id=151753
Reviewed by Alex Christensen.
No new tests (No change in behavior).
* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::count):
(WebCore::IDBClient::IDBIndex::doCount):
(WebCore::IDBClient::IDBIndex::get):
(WebCore::IDBClient::IDBIndex::doGet):
(WebCore::IDBClient::IDBIndex::getKey):
(WebCore::IDBClient::IDBIndex::doGetKey):
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::get):
(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/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort):
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::addRecord):
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getCount):
(WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
(WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::putIndexKey):
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
* Modules/indexeddb/shared/IDBError.cpp:
(WebCore::IDBError::IDBError):
(WebCore::IDBError::name):
(WebCore::IDBError::message):
(WebCore::idbErrorName): Deleted.
(WebCore::idbErrorDescription): Deleted.
* Modules/indexeddb/shared/IDBError.h:
(WebCore::IDBError::code):
(WebCore::IDBError::isNull):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBIndexImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIndexValueStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIndexcpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBErrorcpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBErrorh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/ChangeLog        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -1,3 +1,78 @@
</span><ins>+2015-12-02 Brady Eidson <beidson@apple.com>
+
+ Modern IDB: Get rid of IDBExceptionCode.
+ https://bugs.webkit.org/show_bug.cgi?id=151753
+
+ Reviewed by Alex Christensen.
+
+ No new tests (No change in behavior).
+
+ * Modules/indexeddb/client/IDBIndexImpl.cpp:
+ (WebCore::IDBClient::IDBIndex::count):
+ (WebCore::IDBClient::IDBIndex::doCount):
+ (WebCore::IDBClient::IDBIndex::get):
+ (WebCore::IDBClient::IDBIndex::doGet):
+ (WebCore::IDBClient::IDBIndex::getKey):
+ (WebCore::IDBClient::IDBIndex::doGetKey):
+
+ * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
+ (WebCore::IDBClient::IDBObjectStore::get):
+ (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/IDBOpenDBRequestImpl.cpp:
+ (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort):
+
+ * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+ (WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
+
+ * Modules/indexeddb/server/IndexValueStore.cpp:
+ (WebCore::IDBServer::IndexValueStore::addRecord):
+
+ * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+ (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
+ (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
+ (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
+ (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
+ (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
+ (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
+ (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
+ (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
+ (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
+ (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
+ (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
+ (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
+ (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
+ (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
+ (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
+
+ * Modules/indexeddb/server/MemoryIndex.cpp:
+ (WebCore::IDBServer::MemoryIndex::putIndexKey):
+
+ * Modules/indexeddb/server/MemoryObjectStore.cpp:
+ (WebCore::IDBServer::MemoryObjectStore::createIndex):
+ (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
+ (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
+
+ * Modules/indexeddb/shared/IDBError.cpp:
+ (WebCore::IDBError::IDBError):
+ (WebCore::IDBError::name):
+ (WebCore::IDBError::message):
+ (WebCore::idbErrorName): Deleted.
+ (WebCore::idbErrorDescription): Deleted.
+
+ * Modules/indexeddb/shared/IDBError.h:
+ (WebCore::IDBError::code):
+ (WebCore::IDBError::isNull):
+
</ins><span class="cx"> 2015-12-02 Jiewen Tan <jiewen_tan@apple.com>
</span><span class="cx">
</span><span class="cx"> Null dereference loading Blink layout test fast/loader/unload-mutation-crash.html
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBIndexImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -162,7 +162,7 @@
</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>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -177,13 +177,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (range.isNull) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(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>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -247,7 +247,7 @@
</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>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -262,13 +262,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (range.isNull) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(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>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -299,7 +299,7 @@
</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>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -314,13 +314,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (range.isNull) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(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>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -164,7 +164,7 @@
</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>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx">
</span><span class="cx"> IDBKeyRangeData keyRangeData(keyRange);
</span><span class="cx"> if (!keyRangeData.isValid()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -315,12 +315,12 @@
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::deleteFunction");
</span><span class="cx">
</span><span class="cx"> if (m_transaction->isReadOnly()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::ReadOnlyError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::ReadOnlyError);
</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>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx">
</span><span class="cx"> IDBKeyRangeData keyRangeData(keyRange);
</span><span class="cx"> if (!keyRangeData.isValid()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -349,7 +349,7 @@
</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>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -361,17 +361,17 @@
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::clear");
</span><span class="cx">
</span><span class="cx"> if (m_transaction->isReadOnly()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::ReadOnlyError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::ReadOnlyError);
</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>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(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 = static_cast<ExceptionCode>(IDBExceptionCode::InvalidStateError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::InvalidStateError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -389,17 +389,17 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_deleted) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::InvalidStateError);
</del><ins>+ ec = static_cast<ExceptionCode>(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>(IDBExceptionCode::InvalidStateError);
</del><ins>+ ec = static_cast<ExceptionCode>(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>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -449,7 +449,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -474,17 +474,17 @@
</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>(IDBExceptionCode::InvalidStateError);
</del><ins>+ ec = static_cast<ExceptionCode>(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>(IDBExceptionCode::InvalidStateError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::InvalidStateError);
</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>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -531,7 +531,7 @@
</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>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -553,7 +553,7 @@
</span><span class="cx"> RefPtr<WebCore::IDBRequest> IDBObjectStore::doCount(ScriptExecutionContext& context, const IDBKeyRangeData& range, ExceptionCode& ec)
</span><span class="cx"> {
</span><span class="cx"> if (!m_transaction->isActive()) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::TransactionInactiveError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::TransactionInactiveError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -563,7 +563,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (range.isNull) {
</span><del>- ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);
</del><ins>+ ec = static_cast<ExceptionCode>(IDBDatabaseException::DataError);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(hasPendingActivity());
</span><span class="cx">
</span><del>- IDBError idbError(IDBExceptionCode::AbortError);
</del><ins>+ IDBError idbError(IDBDatabaseException::AbortError);
</ins><span class="cx"> m_domError = DOMError::create(idbError.name());
</span><span class="cx">
</span><span class="cx"> m_transaction->addRequest(*this);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">
</span><span class="cx"> serverConnection().abortTransaction(*this);
</span><span class="cx">
</span><del>- IDBError error(IDBExceptionCode::AbortError);
</del><ins>+ IDBError error(IDBDatabaseException::AbortError);
</ins><span class="cx"> for (auto& operation : m_abortQueue)
</span><span class="cx"> operation->completed(IDBResultData::error(operation->identifier(), error));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIndexValueStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> auto result = m_records.add(indexKey, nullptr);
</span><span class="cx">
</span><span class="cx"> if (!result.isNewEntry && m_unique)
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> if (result.isNewEntry)
</span><span class="cx"> result.iterator->value = std::make_unique<IndexValueEntry>(m_unique);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> LOG(IndexedDB, "MemoryIDBBackingStore::beginTransaction");
</span><span class="cx">
</span><span class="cx"> if (m_transactions.contains(info.identifier()))
</span><del>- return IDBError(IDBExceptionCode::InvalidStateError, "Backing store asked to create transaction it already has a record of");
</del><ins>+ return IDBError(IDBDatabaseException::InvalidStateError, "Backing store asked to create transaction it already has a record of");
</ins><span class="cx">
</span><span class="cx"> auto transaction = MemoryBackingStoreTransaction::create(*this, info);
</span><span class="cx">
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">
</span><span class="cx"> auto transaction = m_transactions.take(transactionIdentifier);
</span><span class="cx"> if (!transaction)
</span><del>- return IDBError(IDBExceptionCode::InvalidStateError, "Backing store asked to abort transaction it didn't have record of");
</del><ins>+ return IDBError(IDBDatabaseException::InvalidStateError, "Backing store asked to abort transaction it didn't have record of");
</ins><span class="cx">
</span><span class="cx"> transaction->abort();
</span><span class="cx">
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx">
</span><span class="cx"> auto transaction = m_transactions.take(transactionIdentifier);
</span><span class="cx"> if (!transaction)
</span><del>- return IDBError(IDBExceptionCode::InvalidStateError, "Backing store asked to commit transaction it didn't have record of");
</del><ins>+ return IDBError(IDBDatabaseException::InvalidStateError, "Backing store asked to commit transaction it didn't have record of");
</ins><span class="cx">
</span><span class="cx"> transaction->commit();
</span><span class="cx">
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(m_databaseInfo);
</span><span class="cx"> if (m_databaseInfo->hasObjectStore(info.name()))
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> ASSERT(!m_objectStoresByIdentifier.contains(info.identifier()));
</span><span class="cx"> auto objectStore = MemoryObjectStore::create(info);
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(m_databaseInfo);
</span><span class="cx"> if (!m_databaseInfo->hasObjectStore(objectStoreName))
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> auto transaction = m_transactions.get(transactionIdentifier);
</span><span class="cx"> ASSERT(transaction);
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx"> auto objectStore = takeObjectStoreByName(objectStoreName);
</span><span class="cx"> ASSERT(objectStore);
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> m_databaseInfo->deleteObjectStore(objectStoreName);
</span><span class="cx"> transaction->objectStoreDeleted(WTF::move(objectStore));
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">
</span><span class="cx"> auto objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> objectStore->clear();
</span><span class="cx">
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">
</span><span class="cx"> auto* objectStore = m_objectStoresByIdentifier.get(info.objectStoreIdentifier());
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> return objectStore->createIndex(*rawTransaction, info);
</span><span class="cx"> }
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx">
</span><span class="cx"> auto* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> return objectStore->deleteIndex(*rawTransaction, indexName);
</span><span class="cx"> }
</span><span class="lines">@@ -251,11 +251,11 @@
</span><span class="cx"> ASSERT(objectStoreIdentifier);
</span><span class="cx">
</span><span class="cx"> if (!m_transactions.contains(transactionIdentifier))
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store transaction found to delete from"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store transaction found to delete from"));
</ins><span class="cx">
</span><span class="cx"> MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store object store found"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store object store found"));
</ins><span class="cx">
</span><span class="cx"> objectStore->deleteRange(range);
</span><span class="cx"> return IDBError();
</span><span class="lines">@@ -269,11 +269,11 @@
</span><span class="cx">
</span><span class="cx"> auto transaction = m_transactions.get(transactionIdentifier);
</span><span class="cx"> if (!transaction)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store transaction found to put record"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store transaction found to put record"));
</ins><span class="cx">
</span><span class="cx"> MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store object store found to put record"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store object store found to put record"));
</ins><span class="cx">
</span><span class="cx"> return objectStore->addRecord(*transaction, keyData, value);
</span><span class="cx"> }
</span><span class="lines">@@ -285,11 +285,11 @@
</span><span class="cx"> ASSERT(objectStoreIdentifier);
</span><span class="cx">
</span><span class="cx"> if (!m_transactions.contains(transactionIdentifier))
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store transaction found to get record"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store transaction found to get record"));
</ins><span class="cx">
</span><span class="cx"> MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store object store found"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store object store found"));
</ins><span class="cx">
</span><span class="cx"> outValue = objectStore->valueForKeyRange(range);
</span><span class="cx"> return IDBError();
</span><span class="lines">@@ -302,11 +302,11 @@
</span><span class="cx"> ASSERT(objectStoreIdentifier);
</span><span class="cx">
</span><span class="cx"> if (!m_transactions.contains(transactionIdentifier))
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store transaction found to get record"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store transaction found to get record"));
</ins><span class="cx">
</span><span class="cx"> MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store object store found"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store object store found"));
</ins><span class="cx">
</span><span class="cx"> outValue = objectStore->indexValueForKeyRange(indexIdentifier, recordType, range);
</span><span class="cx"> return IDBError();
</span><span class="lines">@@ -319,11 +319,11 @@
</span><span class="cx"> ASSERT(objectStoreIdentifier);
</span><span class="cx">
</span><span class="cx"> if (!m_transactions.contains(transactionIdentifier))
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store transaction found to get count"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store transaction found to get count"));
</ins><span class="cx">
</span><span class="cx"> MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store object store found"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store object store found"));
</ins><span class="cx">
</span><span class="cx"> outCount = objectStore->countForKeyRange(indexIdentifier, range);
</span><span class="cx">
</span><span class="lines">@@ -353,17 +353,17 @@
</span><span class="cx"> ASSERT(!MemoryCursor::cursorForIdentifier(info.identifier()));
</span><span class="cx">
</span><span class="cx"> if (!m_transactions.contains(transactionIdentifier))
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store transaction found in which to open a cursor"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store transaction found in which to open a cursor"));
</ins><span class="cx">
</span><span class="cx"> switch (info.cursorSource()) {
</span><span class="cx"> case IndexedDB::CursorSource::ObjectStore: {
</span><span class="cx"> auto* objectStore = m_objectStoresByIdentifier.get(info.sourceIdentifier());
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store object store found"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store object store found"));
</ins><span class="cx">
</span><span class="cx"> MemoryCursor* cursor = objectStore->maybeOpenCursor(info);
</span><span class="cx"> if (!cursor)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("Could not create object store cursor in backing store"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("Could not create object store cursor in backing store"));
</ins><span class="cx">
</span><span class="cx"> cursor->currentData(outData);
</span><span class="cx"> break;
</span><span class="lines">@@ -371,15 +371,15 @@
</span><span class="cx"> case IndexedDB::CursorSource::Index:
</span><span class="cx"> auto* objectStore = m_objectStoresByIdentifier.get(info.objectStoreIdentifier());
</span><span class="cx"> if (!objectStore)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store object store found"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store object store found"));
</ins><span class="cx">
</span><span class="cx"> auto* index = objectStore->indexForIdentifier(info.sourceIdentifier());
</span><span class="cx"> if (!index)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store index found"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store index found"));
</ins><span class="cx">
</span><span class="cx"> MemoryCursor* cursor = index->maybeOpenCursor(info);
</span><span class="cx"> if (!cursor)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("Could not create index cursor in backing store"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("Could not create index cursor in backing store"));
</ins><span class="cx">
</span><span class="cx"> cursor->currentData(outData);
</span><span class="cx"> break;
</span><span class="lines">@@ -393,11 +393,11 @@
</span><span class="cx"> LOG(IndexedDB, "MemoryIDBBackingStore::iterateCursor");
</span><span class="cx">
</span><span class="cx"> if (!m_transactions.contains(transactionIdentifier))
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store transaction found in which to iterate cursor"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store transaction found in which to iterate cursor"));
</ins><span class="cx">
</span><span class="cx"> auto* cursor = MemoryCursor::cursorForIdentifier(cursorIdentifier);
</span><span class="cx"> if (!cursor)
</span><del>- return IDBError(IDBExceptionCode::Unknown, ASCIILiteral("No backing store cursor found in which to iterate cursor"));
</del><ins>+ return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral("No backing store cursor found in which to iterate cursor"));
</ins><span class="cx">
</span><span class="cx"> cursor->iterate(key, count, outData);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx"> if (m_info.unique()) {
</span><span class="cx"> for (auto& key : keys) {
</span><span class="cx"> if (m_records->contains(key))
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> LOG(IndexedDB, "MemoryObjectStore::createIndex");
</span><span class="cx">
</span><span class="cx"> if (!m_writeTransaction || !m_writeTransaction->isVersionChange() || m_writeTransaction != &transaction)
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> ASSERT(!m_indexesByIdentifier.contains(info.identifier()));
</span><span class="cx"> auto index = MemoryIndex::create(info, *this);
</span><span class="lines">@@ -143,12 +143,12 @@
</span><span class="cx"> LOG(IndexedDB, "MemoryObjectStore::deleteIndex");
</span><span class="cx">
</span><span class="cx"> if (!m_writeTransaction || !m_writeTransaction->isVersionChange() || m_writeTransaction != &transaction)
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> auto index = takeIndexByName(indexName);
</span><span class="cx"> ASSERT(index);
</span><span class="cx"> if (!index)
</span><del>- return IDBError(IDBExceptionCode::ConstraintError);
</del><ins>+ return IDBError(IDBDatabaseException::ConstraintError);
</ins><span class="cx">
</span><span class="cx"> m_info.deleteIndex(indexName);
</span><span class="cx"> transaction.indexDeleted(WTF::move(index));
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> // 3.3.1 Opening a database
</span><span class="cx"> // If the database version higher than the requested version, abort these steps and return a VersionError.
</span><span class="cx"> if (requestedVersion < m_databaseInfo->version()) {
</span><del>- auto result = IDBResultData::error(operation->requestData().requestIdentifier(), IDBError(IDBExceptionCode::VersionError));
</del><ins>+ auto result = IDBResultData::error(operation->requestData().requestIdentifier(), IDBError(IDBDatabaseException::VersionError));
</ins><span class="cx"> operation->connection().didOpenDatabase(result);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -512,7 +512,7 @@
</span><span class="cx">
</span><span class="cx"> auto objectStoreInfo = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier);
</span><span class="cx"> if (!objectStoreInfo) {
</span><del>- error = IDBError(IDBExceptionCode::InvalidStateError, ASCIILiteral("Object store cannot be found in the backing store"));
</del><ins>+ error = IDBError(IDBDatabaseException::InvalidStateError, ASCIILiteral("Object store cannot be found in the backing store"));
</ins><span class="cx"> m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, error, usedKey));
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -535,7 +535,7 @@
</span><span class="cx"> bool keyExists;
</span><span class="cx"> error = m_backingStore->keyExistsInObjectStore(transactionIdentifier, objectStoreIdentifier, usedKey, keyExists);
</span><span class="cx"> if (error.isNull() && keyExists)
</span><del>- error = IDBError(IDBExceptionCode::ConstraintError, ASCIILiteral("Key already exists in the object store"));
</del><ins>+ error = IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral("Key already exists in the object store"));
</ins><span class="cx">
</span><span class="cx"> if (!error.isNull()) {
</span><span class="cx"> m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, error, usedKey));
</span><span class="lines">@@ -552,18 +552,18 @@
</span><span class="cx">
</span><span class="cx"> JSValue value = deserializeIDBValueDataToJSValue(databaseThreadExecState(), originalRecordValue);
</span><span class="cx"> if (value.isUndefined()) {
</span><del>- m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBExceptionCode::ConstraintError, ASCIILiteral("Unable to deserialize record value for record key injection")), usedKey));
</del><ins>+ m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral("Unable to deserialize record value for record key injection")), usedKey));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!injectIDBKeyIntoScriptValue(databaseThreadExecState(), usedKey, value, objectStoreInfo->keyPath())) {
</span><del>- m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBExceptionCode::ConstraintError, ASCIILiteral("Unable to inject record key into record value")), usedKey));
</del><ins>+ m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral("Unable to inject record key into record value")), usedKey));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto serializedValue = SerializedScriptValue::create(&databaseThreadExecState(), value, nullptr, nullptr);
</span><span class="cx"> if (databaseThreadExecState().hadException()) {
</span><del>- m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBExceptionCode::ConstraintError, ASCIILiteral("Unable to serialize record value after injecting record key")), usedKey));
</del><ins>+ m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral("Unable to serialize record value after injecting record key")), usedKey));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBErrorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.cpp (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.cpp        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.cpp        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -32,104 +32,12 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-static const String& idbErrorName(IDBExceptionCode code)
-{
- switch (code) {
- case IDBExceptionCode::Unknown: {
- static NeverDestroyed<String> entry = ASCIILiteral("UnknownError");
- return entry;
- }
- case IDBExceptionCode::ConstraintError: {
- static NeverDestroyed<String> entry = ASCIILiteral("ConstraintError");
- return entry;
- }
- case IDBExceptionCode::VersionError: {
- static NeverDestroyed<String> entry = ASCIILiteral("VersionError");
- return entry;
- }
- case IDBExceptionCode::InvalidStateError: {
- static NeverDestroyed<String> entry = ASCIILiteral("InvalidStateError");
- return entry;
- }
- case IDBExceptionCode::DataError: {
- static NeverDestroyed<String> entry = ASCIILiteral("DataError");
- return entry;
- }
- case IDBExceptionCode::TransactionInactiveError: {
- static NeverDestroyed<String> entry = ASCIILiteral("TransactionInactiveError");
- return entry;
- }
- case IDBExceptionCode::ReadOnlyError: {
- static NeverDestroyed<String> entry = ASCIILiteral("ReadOnlyError");
- return entry;
- }
- case IDBExceptionCode::DataCloneError: {
- static NeverDestroyed<String> entry = ASCIILiteral("DataCloneError");
- return entry;
- }
- case IDBExceptionCode::AbortError: {
- static NeverDestroyed<String> entry = ASCIILiteral("AbortError");
- return entry;
- }
- case IDBExceptionCode::None:
- RELEASE_ASSERT_NOT_REACHED();
- }
-
- RELEASE_ASSERT_NOT_REACHED();
-}
-
-static const String& idbErrorDescription(IDBExceptionCode code)
-{
- switch (code) {
- case IDBExceptionCode::Unknown: {
- static NeverDestroyed<String> entry = ASCIILiteral("Operation failed for reasons unrelated to the database itself and not covered by any other errors.");
- return entry.get();
- }
- case IDBExceptionCode::ConstraintError: {
- static NeverDestroyed<String> entry = ASCIILiteral("Mutation operation in the transaction failed because a constraint was not satisfied.");
- return entry.get();
- }
- case IDBExceptionCode::VersionError: {
- static NeverDestroyed<String> entry = ASCIILiteral("An attempt was made to open a database using a lower version than the existing version.");
- return entry.get();
- }
- case IDBExceptionCode::InvalidStateError: {
- static NeverDestroyed<String> entry = ASCIILiteral("Operation was called on an object on which it is not allowed or at a time when it is not allowed.");
- return entry;
- }
- case IDBExceptionCode::DataError: {
- static NeverDestroyed<String> entry = ASCIILiteral("Data provided to an operation does not meet requirements.");
- return entry;
- }
- case IDBExceptionCode::TransactionInactiveError: {
- static NeverDestroyed<String> entry = ASCIILiteral("Request was placed against a transaction which is currently not active, or which is finished.");
- return entry;
- }
- case IDBExceptionCode::ReadOnlyError: {
- static NeverDestroyed<String> entry = ASCIILiteral("A mutating operation was attempted in a \"readonly\" transaction.");
- return entry;
- }
- case IDBExceptionCode::DataCloneError: {
- static NeverDestroyed<String> entry = ASCIILiteral("Data being stored could not be cloned by the structured cloning algorithm.");
- return entry;
- }
- case IDBExceptionCode::AbortError: {
- static NeverDestroyed<String> entry = ASCIILiteral("Transaction was aborted");
- return entry;
- }
- case IDBExceptionCode::None:
- RELEASE_ASSERT_NOT_REACHED();
- }
-
- RELEASE_ASSERT_NOT_REACHED();
-}
-
-IDBError::IDBError(IDBExceptionCode code)
</del><ins>+IDBError::IDBError(ExceptionCode code)
</ins><span class="cx"> : IDBError(code, emptyString())
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-IDBError::IDBError(IDBExceptionCode code, const String& message)
</del><ins>+IDBError::IDBError(ExceptionCode code, const String& message)
</ins><span class="cx"> : m_code(code)
</span><span class="cx"> , m_message(message)
</span><span class="cx"> {
</span><span class="lines">@@ -147,17 +55,14 @@
</span><span class="cx"> return *this;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const String& IDBError::name() const
</del><ins>+String IDBError::name() const
</ins><span class="cx"> {
</span><del>- return idbErrorName(m_code);
</del><ins>+ return IDBDatabaseException::getErrorName(m_code);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-const String& IDBError::message() const
</del><ins>+String IDBError::message() const
</ins><span class="cx"> {
</span><del>- if (!m_message.isEmpty())
- return m_message;
-
- return idbErrorDescription(m_code);
</del><ins>+ return IDBDatabaseException::getErrorDescription(m_code);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h (192947 => 192948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h        2015-12-02 19:04:07 UTC (rev 192947)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h        2015-12-02 19:13:02 UTC (rev 192948)
</span><span class="lines">@@ -28,44 +28,29 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><ins>+#include "IDBDatabaseException.h"
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-static const int IDBExceptionCodeOffset = 1200;
-
-enum class IDBExceptionCode {
- None = IDBExceptionCodeOffset,
- Unknown,
- ConstraintError,
- DataError,
- TransactionInactiveError,
- ReadOnlyError,
- VersionError,
-
- // Indexed DB existing exception codes with IDB-specific error messages:
- InvalidStateError,
- DataCloneError,
- AbortError,
-};
-
</del><span class="cx"> class IDBError {
</span><span class="cx"> public:
</span><span class="cx"> IDBError() { }
</span><del>- IDBError(IDBExceptionCode);
- IDBError(IDBExceptionCode, const String& message);
</del><ins>+ IDBError(ExceptionCode);
+ IDBError(ExceptionCode, const String& message);
</ins><span class="cx">
</span><span class="cx"> IDBError& operator=(const IDBError&);
</span><span class="cx">
</span><del>- const String& name() const;
- const String& message() const;
</del><ins>+ ExceptionCode code() const { return m_code; }
+ String name() const;
+ String message() const;
</ins><span class="cx">
</span><del>- bool isNull() const { return m_code == IDBExceptionCode::None; }
</del><ins>+ bool isNull() const { return m_code == IDBDatabaseException::NoError; }
</ins><span class="cx">
</span><span class="cx"> IDBError isolatedCopy() const;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- IDBExceptionCode m_code { IDBExceptionCode::None };
</del><ins>+ ExceptionCode m_code { IDBDatabaseException::NoError };
</ins><span class="cx"> String m_message;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>