<!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  &lt;beidson@apple.com&gt;
+
+        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  &lt;jiewen_tan@apple.com&gt;
</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&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</span><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::DataError);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto&amp; transaction = m_objectStore-&gt;modernTransaction();
</span><span class="cx">     if (!transaction.isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</span><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::DataError);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto&amp; transaction = m_objectStore-&gt;modernTransaction();
</span><span class="cx">     if (!transaction.isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</span><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::DataError);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto&amp; transaction = m_objectStore-&gt;modernTransaction();
</span><span class="cx">     if (!transaction.isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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-&gt;isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</span><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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-&gt;isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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, &quot;IDBObjectStore::deleteFunction&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (m_transaction-&gt;isReadOnly()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::ReadOnlyError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::ReadOnlyError);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_transaction-&gt;isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</span><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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, &quot;IDBObjectStore::clear&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (m_transaction-&gt;isReadOnly()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::ReadOnlyError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::ReadOnlyError);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_transaction-&gt;isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;ExceptionCode&gt;(IDBExceptionCode::InvalidStateError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;ExceptionCode&gt;(IDBExceptionCode::InvalidStateError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::InvalidStateError);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_transaction-&gt;isVersionChange()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::InvalidStateError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::InvalidStateError);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_transaction-&gt;isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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-&gt;isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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, &quot;IDBObjectStore::deleteIndex %s&quot;, name.utf8().data());
</span><span class="cx"> 
</span><span class="cx">     if (m_deleted) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::InvalidStateError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::InvalidStateError);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_transaction-&gt;isVersionChange()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::InvalidStateError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(IDBDatabaseException::InvalidStateError);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_transaction-&gt;isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</span><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;WebCore::IDBRequest&gt; IDBObjectStore::doCount(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     if (!m_transaction-&gt;isActive()) {
</span><del>-        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
</del><ins>+        ec = static_cast&lt;ExceptionCode&gt;(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-&gt;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&amp; operation : m_abortQueue)
</span><span class="cx">         operation-&gt;completed(IDBResultData::error(operation-&gt;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 &amp;&amp; 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-&gt;value = std::make_unique&lt;IndexValueEntry&gt;(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, &quot;MemoryIDBBackingStore::beginTransaction&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (m_transactions.contains(info.identifier()))
</span><del>-        return IDBError(IDBExceptionCode::InvalidStateError, &quot;Backing store asked to create transaction it already has a record of&quot;);
</del><ins>+        return IDBError(IDBDatabaseException::InvalidStateError, &quot;Backing store asked to create transaction it already has a record of&quot;);
</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, &quot;Backing store asked to abort transaction it didn't have record of&quot;);
</del><ins>+        return IDBError(IDBDatabaseException::InvalidStateError, &quot;Backing store asked to abort transaction it didn't have record of&quot;);
</ins><span class="cx"> 
</span><span class="cx">     transaction-&gt;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, &quot;Backing store asked to commit transaction it didn't have record of&quot;);
</del><ins>+        return IDBError(IDBDatabaseException::InvalidStateError, &quot;Backing store asked to commit transaction it didn't have record of&quot;);
</ins><span class="cx"> 
</span><span class="cx">     transaction-&gt;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-&gt;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-&gt;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-&gt;deleteObjectStore(objectStoreName);
</span><span class="cx">     transaction-&gt;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-&gt;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-&gt;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-&gt;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(&quot;No backing store transaction found to delete from&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store transaction found to delete from&quot;));
</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(&quot;No backing store object store found&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store object store found&quot;));
</ins><span class="cx"> 
</span><span class="cx">     objectStore-&gt;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(&quot;No backing store transaction found to put record&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store transaction found to put record&quot;));
</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(&quot;No backing store object store found to put record&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store object store found to put record&quot;));
</ins><span class="cx"> 
</span><span class="cx">     return objectStore-&gt;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(&quot;No backing store transaction found to get record&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store transaction found to get record&quot;));
</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(&quot;No backing store object store found&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store object store found&quot;));
</ins><span class="cx"> 
</span><span class="cx">     outValue = objectStore-&gt;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(&quot;No backing store transaction found to get record&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store transaction found to get record&quot;));
</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(&quot;No backing store object store found&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store object store found&quot;));
</ins><span class="cx"> 
</span><span class="cx">     outValue = objectStore-&gt;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(&quot;No backing store transaction found to get count&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store transaction found to get count&quot;));
</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(&quot;No backing store object store found&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store object store found&quot;));
</ins><span class="cx"> 
</span><span class="cx">     outCount = objectStore-&gt;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(&quot;No backing store transaction found in which to open a cursor&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store transaction found in which to open a cursor&quot;));
</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(&quot;No backing store object store found&quot;));
</del><ins>+            return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store object store found&quot;));
</ins><span class="cx"> 
</span><span class="cx">         MemoryCursor* cursor = objectStore-&gt;maybeOpenCursor(info);
</span><span class="cx">         if (!cursor)
</span><del>-            return IDBError(IDBExceptionCode::Unknown, ASCIILiteral(&quot;Could not create object store cursor in backing store&quot;));
</del><ins>+            return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not create object store cursor in backing store&quot;));
</ins><span class="cx"> 
</span><span class="cx">         cursor-&gt;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(&quot;No backing store object store found&quot;));
</del><ins>+            return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store object store found&quot;));
</ins><span class="cx"> 
</span><span class="cx">         auto* index = objectStore-&gt;indexForIdentifier(info.sourceIdentifier());
</span><span class="cx">         if (!index)
</span><del>-            return IDBError(IDBExceptionCode::Unknown, ASCIILiteral(&quot;No backing store index found&quot;));
</del><ins>+            return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store index found&quot;));
</ins><span class="cx"> 
</span><span class="cx">         MemoryCursor* cursor = index-&gt;maybeOpenCursor(info);
</span><span class="cx">         if (!cursor)
</span><del>-            return IDBError(IDBExceptionCode::Unknown, ASCIILiteral(&quot;Could not create index cursor in backing store&quot;));
</del><ins>+            return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not create index cursor in backing store&quot;));
</ins><span class="cx"> 
</span><span class="cx">         cursor-&gt;currentData(outData);
</span><span class="cx">         break;
</span><span class="lines">@@ -393,11 +393,11 @@
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::iterateCursor&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (!m_transactions.contains(transactionIdentifier))
</span><del>-        return IDBError(IDBExceptionCode::Unknown, ASCIILiteral(&quot;No backing store transaction found in which to iterate cursor&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store transaction found in which to iterate cursor&quot;));
</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(&quot;No backing store cursor found in which to iterate cursor&quot;));
</del><ins>+        return IDBError(IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store cursor found in which to iterate cursor&quot;));
</ins><span class="cx"> 
</span><span class="cx">     cursor-&gt;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&amp; key : keys) {
</span><span class="cx">             if (m_records-&gt;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, &quot;MemoryObjectStore::createIndex&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (!m_writeTransaction || !m_writeTransaction-&gt;isVersionChange() || m_writeTransaction != &amp;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, &quot;MemoryObjectStore::deleteIndex&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (!m_writeTransaction || !m_writeTransaction-&gt;isVersionChange() || m_writeTransaction != &amp;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 &lt; m_databaseInfo-&gt;version()) {
</span><del>-        auto result = IDBResultData::error(operation-&gt;requestData().requestIdentifier(), IDBError(IDBExceptionCode::VersionError));
</del><ins>+        auto result = IDBResultData::error(operation-&gt;requestData().requestIdentifier(), IDBError(IDBDatabaseException::VersionError));
</ins><span class="cx">         operation-&gt;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-&gt;infoForExistingObjectStore(objectStoreIdentifier);
</span><span class="cx">     if (!objectStoreInfo) {
</span><del>-        error = IDBError(IDBExceptionCode::InvalidStateError, ASCIILiteral(&quot;Object store cannot be found in the backing store&quot;));
</del><ins>+        error = IDBError(IDBDatabaseException::InvalidStateError, ASCIILiteral(&quot;Object store cannot be found in the backing store&quot;));
</ins><span class="cx">         m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;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-&gt;keyExistsInObjectStore(transactionIdentifier, objectStoreIdentifier, usedKey, keyExists);
</span><span class="cx">         if (error.isNull() &amp;&amp; keyExists)
</span><del>-            error = IDBError(IDBExceptionCode::ConstraintError, ASCIILiteral(&quot;Key already exists in the object store&quot;));
</del><ins>+            error = IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral(&quot;Key already exists in the object store&quot;));
</ins><span class="cx"> 
</span><span class="cx">         if (!error.isNull()) {
</span><span class="cx">             m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;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, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBExceptionCode::ConstraintError, ASCIILiteral(&quot;Unable to deserialize record value for record key injection&quot;)), usedKey));
</del><ins>+            m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral(&quot;Unable to deserialize record value for record key injection&quot;)), usedKey));
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!injectIDBKeyIntoScriptValue(databaseThreadExecState(), usedKey, value, objectStoreInfo-&gt;keyPath())) {
</span><del>-            m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBExceptionCode::ConstraintError, ASCIILiteral(&quot;Unable to inject record key into record value&quot;)), usedKey));
</del><ins>+            m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral(&quot;Unable to inject record key into record value&quot;)), usedKey));
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         auto serializedValue = SerializedScriptValue::create(&amp;databaseThreadExecState(), value, nullptr, nullptr);
</span><span class="cx">         if (databaseThreadExecState().hadException()) {
</span><del>-            m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBExceptionCode::ConstraintError, ASCIILiteral(&quot;Unable to serialize record value after injecting record key&quot;)), usedKey));
</del><ins>+            m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral(&quot;Unable to serialize record value after injecting record key&quot;)), 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&amp; idbErrorName(IDBExceptionCode code)
-{
-    switch (code) {
-    case IDBExceptionCode::Unknown: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;UnknownError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::ConstraintError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;ConstraintError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::VersionError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;VersionError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::InvalidStateError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;InvalidStateError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::DataError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;DataError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::TransactionInactiveError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;TransactionInactiveError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::ReadOnlyError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;ReadOnlyError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::DataCloneError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;DataCloneError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::AbortError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;AbortError&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::None:
-        RELEASE_ASSERT_NOT_REACHED();
-    }
-
-    RELEASE_ASSERT_NOT_REACHED();
-}
-
-static const String&amp; idbErrorDescription(IDBExceptionCode code)
-{
-    switch (code) {
-    case IDBExceptionCode::Unknown: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Operation failed for reasons unrelated to the database itself and not covered by any other errors.&quot;);
-        return entry.get();
-    }
-    case IDBExceptionCode::ConstraintError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Mutation operation in the transaction failed because a constraint was not satisfied.&quot;);
-        return entry.get();
-    }
-    case IDBExceptionCode::VersionError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;An attempt was made to open a database using a lower version than the existing version.&quot;);
-        return entry.get();
-    }
-    case IDBExceptionCode::InvalidStateError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Operation was called on an object on which it is not allowed or at a time when it is not allowed.&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::DataError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Data provided to an operation does not meet requirements.&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::TransactionInactiveError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Request was placed against a transaction which is currently not active, or which is finished.&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::ReadOnlyError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;A mutating operation was attempted in a \&quot;readonly\&quot; transaction.&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::DataCloneError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Data being stored could not be cloned by the structured cloning algorithm.&quot;);
-        return entry;
-    }
-    case IDBExceptionCode::AbortError: {
-        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Transaction was aborted&quot;);
-        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&amp; message)
</del><ins>+IDBError::IDBError(ExceptionCode code, const String&amp; 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&amp; 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&amp; 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 &quot;IDBDatabaseException.h&quot;
</ins><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</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&amp; message);
</del><ins>+    IDBError(ExceptionCode);
+    IDBError(ExceptionCode, const String&amp; message);
</ins><span class="cx"> 
</span><span class="cx">     IDBError&amp; operator=(const IDBError&amp;);
</span><span class="cx"> 
</span><del>-    const String&amp; name() const;
-    const String&amp; 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>