<!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>[192749] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/192749">192749</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-11-23 11:48:50 -0800 (Mon, 23 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: When a transaction is aborted, call onerror handlers for all in-progress requests.
https://bugs.webkit.org/show_bug.cgi?id=151550

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/abort-requests-cancelled.html
      storage/indexeddb/modern/idbtransaction-objectstore-failures.html (with changes)
      storage/indexeddb/modern/index-5.html (with changes)
      Various (currently skipped) legacy IDB tests.

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::transaction):
(WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
(WebCore::IDBClient::IDBDatabase::didStartTransaction):
(WebCore::IDBClient::IDBDatabase::willCommitTransaction):
(WebCore::IDBClient::IDBDatabase::didCommitTransaction):
(WebCore::IDBClient::IDBDatabase::willAbortTransaction):
(WebCore::IDBClient::IDBDatabase::didAbortTransaction):
(WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
(WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
(WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
(WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
(WebCore::IDBClient::IDBTransaction::didDeleteIndexOnServer):
(WebCore::IDBClient::IDBTransaction::immediateAbort): Deleted.
(WebCore::IDBClient::IDBTransaction::abortOnServer): Deleted.
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):

* Modules/indexeddb/shared/IDBError.cpp:
(WebCore::idbErrorName):
(WebCore::idbErrorDescription):
* Modules/indexeddb/shared/IDBError.h:

* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::loggingString):
* Modules/indexeddb/shared/IDBResourceIdentifier.h:

LayoutTests:

* storage/indexeddb/modern/abort-requests-cancelled-expected.txt: Added.
* storage/indexeddb/modern/abort-requests-cancelled.html: Added.
* storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt:
* storage/indexeddb/modern/idbtransaction-objectstore-failures.html:
* storage/indexeddb/modern/index-5-expected.txt:
* storage/indexeddb/modern/index-5.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstorefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstorefailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex5expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-5-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex5html">trunk/LayoutTests/storage/indexeddb/modern/index-5.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.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>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifiercpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifierh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledhtml">trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/LayoutTests/ChangeLog        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2015-11-23  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Modern IDB: When a transaction is aborted, call onerror handlers for all in-progress requests.
+        https://bugs.webkit.org/show_bug.cgi?id=151550
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/abort-requests-cancelled-expected.txt: Added.
+        * storage/indexeddb/modern/abort-requests-cancelled.html: Added.
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt:
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures.html:
+        * storage/indexeddb/modern/index-5-expected.txt:
+        * storage/indexeddb/modern/index-5.html:
+
+2015-11-23  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=151557
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt (0 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+This test makes sure that un-handled requests in a transaction receive onerror callbacks when the transaction is aborted.
+Initial upgrade needed: Old version - 0 New version - 1
+Error handling: &quot;objectStore.put({ bar: 'A' }, 1);&quot; (error)
+Error handling: &quot;objectStore.put({ bar: 'B' }, 2);&quot; (error)
+Error handling: &quot;objectStore.put({ bar: 'C' }, 3);&quot; (error)
+Initial upgrade versionchange transaction aborted
+Second upgrade needed: Old version - 0 New version - 1
+Success handling: &quot;objectStore.put({ bar: 'A' }, 1);&quot;
+Success handling: &quot;objectStore.put({ bar: 'B' }, 2);&quot;
+Success handling: &quot;objectStore.put({ bar: 'C' }, 3);&quot;
+Second upgrade versionchange transaction completed
+Error handling: &quot;objectStore.get(1);&quot; (error)
+Error handling: &quot;objectStore.get(2);&quot; (error)
+Error handling: &quot;objectStore.get(3);&quot; (error)
+Error handling: &quot;objectStore.put({ bar: 'D' }, 4);&quot; (error)
+Error handling: &quot;objectStore.put({ bar: 'E' }, 5);&quot; (error)
+Error handling: &quot;objectStore.put({ bar: 'F' }, 6);&quot; (error)
+readwrite transaction aborted
+Error handling: &quot;objectStore.get(1);&quot; (error)
+Error handling: &quot;objectStore.get(2);&quot; (error)
+Error handling: &quot;objectStore.get(3);&quot; (error)
+readonly transaction aborted
+Done
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html (0 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -0,0 +1,157 @@
</span><ins>+This test makes sure that un-handled requests in a transaction receive onerror callbacks when the transaction is aborted.&lt;br&gt;
+&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    log(&quot;Done&quot;);
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+function log(message)
+{
+    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
+}
+
+var database;
+var objectStore;
+
+function setupRequest(code)
+{
+    var request = eval(code);
+    request.onsuccess = function()
+    {
+        log (&quot;Success handling: \&quot;&quot; + code + &quot;\&quot;&quot;);
+    }
+    request.onerror = function(e)
+    {
+        log (&quot;Error handling: \&quot;&quot; + code + &quot;\&quot; (&quot; + e.type + &quot;)&quot;);
+        e.stopPropagation();
+    }   
+}
+
+startTest();
+
+function startTest() {
+    var createRequest = window.indexedDB.open(&quot;AbortRequestsCancelledDatabase&quot;, 1);
+    createRequest.onupgradeneeded = function(event) {
+        log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        var database = event.target.result;
+        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'A' }, 1);&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'B' }, 2);&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'C' }, 3);&quot;);
+
+        versionTransaction.abort();
+
+        versionTransaction.onabort = function(event) {
+            log(&quot;Initial upgrade versionchange transaction aborted&quot;);
+            database.close();
+            continueTest1();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            log(&quot;Initial upgrade versionchange transaction unexpected complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+            done();
+        }
+    }
+}
+
+function continueTest1() {
+    var createRequest = window.indexedDB.open(&quot;AbortRequestsCancelledDatabase&quot;, 1);
+    createRequest.onupgradeneeded = function(event) {
+        log(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        database = event.target.result;
+        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    
+        setupRequest(&quot;objectStore.put({ bar: 'A' }, 1);&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'B' }, 2);&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'C' }, 3);&quot;);
+    
+        versionTransaction.onabort = function(event) {
+            log(&quot;Second upgrade versionchange transaction unexpected abort&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            log(&quot;Second upgrade versionchange transaction completed&quot;);
+            continueTest2();
+        }
+
+        versionTransaction.onerror = function(event) {
+            log(&quot;Second upgrade versionchange transaction unexpected error&quot; + event);
+            done();
+        }
+    }
+}
+
+function continueTest2() {
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    setupRequest(&quot;objectStore.get(1);&quot;);
+    setupRequest(&quot;objectStore.get(2);&quot;);
+    setupRequest(&quot;objectStore.get(3);&quot;);
+    setupRequest(&quot;objectStore.put({ bar: 'D' }, 4);&quot;);
+    setupRequest(&quot;objectStore.put({ bar: 'E' }, 5);&quot;);
+    setupRequest(&quot;objectStore.put({ bar: 'F' }, 6);&quot;);
+
+    transaction.abort();
+
+    transaction.onabort = function(event) {
+        log(&quot;readwrite transaction aborted&quot;);
+        continueTest3();
+    }
+
+    transaction.oncomplete = function(event) {
+        log(&quot;readwrite transaction unexpected complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        log(&quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest3() {
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    setupRequest(&quot;objectStore.get(1);&quot;);
+    setupRequest(&quot;objectStore.get(2);&quot;);
+    setupRequest(&quot;objectStore.get(3);&quot;);
+
+    transaction.abort();
+
+    transaction.onabort = function(event) {
+        log(&quot;readonly transaction aborted&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        log(&quot;readwrite transaction unexpected complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        log(&quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstorefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -5,7 +5,8 @@
</span><span class="cx"> ALERT: Caught attempt to access null-named object store on the transaction
</span><span class="cx"> ALERT: Caught attempt to access non-existant object store on the transaction
</span><span class="cx"> ALERT: Caught attempt to access valid object store on a transaction that is already finishing
</span><del>-ALERT: First version change transaction abort
</del><ins>+ALERT: put failed (because transaction was aborted)
+ALERT: First version change transaction unexpected error - [object Event]
</ins><span class="cx"> ALERT: Done
</span><span class="cx"> This tests some obvious failures that can happen while calling transaction.objectStore()
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstorefailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -30,9 +30,8 @@
</span><span class="cx"> 
</span><span class="cx">     var putRequest = os1.put(&quot;bar&quot;, &quot;foo&quot;);
</span><span class="cx">     
</span><del>-    putRequest.onerror = function(event) {
-        alert(&quot;put unexpectedly failed - &quot; + event);
-        done();
</del><ins>+    putRequest.onerror = function() {
+        alert(&quot;put failed (because transaction was aborted)&quot;);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     try {
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex5expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-5-expected.txt (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-5-expected.txt        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-5-expected.txt        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -1,6 +1,8 @@
</span><span class="cx"> This tests creating an index on an object store that already has records, and those records would violate the unique constraint of the index.
</span><span class="cx"> (The index creation should fail).
</span><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><ins>+Error getting cursor count
+Error opening or iterating cursor
</ins><span class="cx"> Initial upgrade versionchange transaction aborted (expected because index creation failed, and that should've caused transaction abort)
</span><span class="cx"> Done
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex5html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-5.html (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-5.html        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-5.html        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -29,6 +29,10 @@
</span><span class="cx">     countRequest.onsuccess = function() {
</span><span class="cx">         log(&quot;Count is: &quot; + countRequest.result);
</span><span class="cx">     }
</span><ins>+    countRequest.onerror = function(e) {
+        log(&quot;Error getting cursor count&quot;);
+        e.stopPropagation();
+    }
</ins><span class="cx"> 
</span><span class="cx">     var cursorRequest = index.openCursor();
</span><span class="cx">     cursorRequest.onsuccess = function() {
</span><span class="lines">@@ -41,9 +45,8 @@
</span><span class="cx">             done();
</span><span class="cx">     }
</span><span class="cx">     cursorRequest.onerror = function(e) {
</span><del>-        log(&quot;Unexpected error opening or iterating cursor&quot;);
-        logCursor(cursorRequest.result);
-        done();
</del><ins>+        log(&quot;Error opening or iterating cursor&quot;);
+        e.stopPropagation();
</ins><span class="cx">     } 
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/ChangeLog        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -1,5 +1,52 @@
</span><span class="cx"> 2015-11-23  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Modern IDB: When a transaction is aborted, call onerror handlers for all in-progress requests.
+        https://bugs.webkit.org/show_bug.cgi?id=151550
+
+        Reviewed by Alex Christensen.
+
+        Test: storage/indexeddb/modern/abort-requests-cancelled.html
+              storage/indexeddb/modern/idbtransaction-objectstore-failures.html (with changes)
+              storage/indexeddb/modern/index-5.html (with changes)
+              Various (currently skipped) legacy IDB tests.
+
+        * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
+        (WebCore::IDBClient::IDBDatabase::transaction):
+        (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
+        (WebCore::IDBClient::IDBDatabase::didStartTransaction):
+        (WebCore::IDBClient::IDBDatabase::willCommitTransaction):
+        (WebCore::IDBClient::IDBDatabase::didCommitTransaction):
+        (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
+        (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
+        (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
+        
+        * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+        (WebCore::IDBClient::IDBTransaction::abort):
+        (WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
+        (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
+        (WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
+        (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
+        (WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
+        (WebCore::IDBClient::IDBTransaction::didDeleteIndexOnServer):
+        (WebCore::IDBClient::IDBTransaction::immediateAbort): Deleted.
+        (WebCore::IDBClient::IDBTransaction::abortOnServer): Deleted.
+        * Modules/indexeddb/client/IDBTransactionImpl.h:
+        
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
+        (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
+        
+        * Modules/indexeddb/shared/IDBError.cpp:
+        (WebCore::idbErrorName):
+        (WebCore::idbErrorDescription):
+        * Modules/indexeddb/shared/IDBError.h:
+        
+        * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
+        (WebCore::IDBResourceIdentifier::loggingString):
+        * Modules/indexeddb/shared/IDBResourceIdentifier.h:
+
+2015-11-23  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=151557
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -171,6 +171,8 @@
</span><span class="cx">     auto info = IDBTransactionInfo::clientTransaction(m_serverConnection.get(), objectStores, mode);
</span><span class="cx">     auto transaction = IDBTransaction::create(*this, info);
</span><span class="cx"> 
</span><ins>+    LOG(IndexedDB, &quot;IDBDatabase::transaction - Added active transaction %s&quot;, info.identifier().loggingString().utf8().data());
+
</ins><span class="cx">     m_activeTransactions.set(info.identifier(), &amp;transaction.get());
</span><span class="cx"> 
</span><span class="cx">     return adoptRef(&amp;transaction.leakRef());
</span><span class="lines">@@ -241,7 +243,7 @@
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;IDBTransaction&gt; IDBDatabase::startVersionChangeTransaction(const IDBTransactionInfo&amp; info, IDBOpenDBRequest&amp; request)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::startVersionChangeTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::startVersionChangeTransaction %s&quot;, info.identifier().loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(!m_versionChangeTransaction);
</span><span class="cx">     ASSERT(info.mode() == IndexedDB::TransactionMode::VersionChange);
</span><span class="lines">@@ -256,15 +258,19 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::didStartTransaction(IDBTransaction&amp; transaction)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::didStartTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::didStartTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
</ins><span class="cx">     ASSERT(!m_versionChangeTransaction);
</span><span class="cx"> 
</span><ins>+    // It is possible for the client to have aborted a transaction before the server replies back that it has started.
+    if (m_abortingTransactions.contains(transaction.info().identifier()))
+        return;
+
</ins><span class="cx">     m_activeTransactions.set(transaction.info().identifier(), &amp;transaction);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::willCommitTransaction(IDBTransaction&amp; transaction)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::willCommitTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::willCommitTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
</span><span class="cx">     ASSERT(refTransaction);
</span><span class="lines">@@ -273,7 +279,7 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::didCommitTransaction(IDBTransaction&amp; transaction)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::didCommitTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::didCommitTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     if (m_versionChangeTransaction == &amp;transaction)
</span><span class="cx">         m_info.setVersion(transaction.info().newVersion());
</span><span class="lines">@@ -283,7 +289,7 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::willAbortTransaction(IDBTransaction&amp; transaction)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::willAbortTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::willAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
</span><span class="cx">     ASSERT(refTransaction);
</span><span class="lines">@@ -292,7 +298,7 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::didAbortTransaction(IDBTransaction&amp; transaction)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::didAbortTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::didAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     if (transaction.isVersionChange()) {
</span><span class="cx">         ASSERT(transaction.originalDatabaseInfo());
</span><span class="lines">@@ -304,7 +310,7 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::didCommitOrAbortTransaction(IDBTransaction&amp; transaction)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::didCommitOrAbortTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::didCommitOrAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     if (m_versionChangeTransaction == &amp;transaction)
</span><span class="cx">         m_versionChangeTransaction = nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -165,20 +165,6 @@
</span><span class="cx">     return adoptRef(&amp;objectStore.leakRef());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBTransaction::immediateAbort()
-{
-    LOG(IndexedDB, &quot;IDBTransaction::immediateAbort&quot;);
-
-    if (isFinishedOrFinishing())
-        return;
-
-    m_state = IndexedDB::TransactionState::Aborting;
-    m_database-&gt;willAbortTransaction(*this);
-
-    auto operation = createTransactionOperation(*this, nullptr, &amp;IDBTransaction::abortOnServer);
-    abortOnServer(*operation);
-}
-
</del><span class="cx"> void IDBTransaction::abort(ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::abort&quot;);
</span><span class="lines">@@ -191,14 +177,28 @@
</span><span class="cx">     m_state = IndexedDB::TransactionState::Aborting;
</span><span class="cx">     m_database-&gt;willAbortTransaction(*this);
</span><span class="cx"> 
</span><del>-    auto operation = createTransactionOperation(*this, nullptr, &amp;IDBTransaction::abortOnServer);
</del><ins>+    m_abortQueue.swap(m_transactionOperationQueue);
+
+    auto operation = createTransactionOperation(*this, nullptr, &amp;IDBTransaction::abortOnServerAndCancelRequests);
</ins><span class="cx">     scheduleOperation(WTF::move(operation));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBTransaction::abortOnServer(TransactionOperation&amp;)
</del><ins>+void IDBTransaction::abortOnServerAndCancelRequests(TransactionOperation&amp;)
</ins><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBTransaction::abortOnServer&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBTransaction::abortOnServerAndCancelRequests&quot;);
+
+    ASSERT(m_transactionOperationQueue.isEmpty());
+
</ins><span class="cx">     serverConnection().abortTransaction(*this);
</span><ins>+
+    IDBError error(IDBExceptionCode::AbortError);
+    for (auto&amp; operation : m_abortQueue)
+        operation-&gt;completed(IDBResultData::error(operation-&gt;identifier(), error));
+
+    // Since we're aborting, this abortOnServerAndCancelRequests() operation should be the only
+    // in-progress operation, and it should be impossible to have queued any further operations.
+    ASSERT(m_transactionOperationMap.size() == 1);
+    ASSERT(m_transactionOperationQueue.isEmpty());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const char* IDBTransaction::activeDOMObjectName() const
</span><span class="lines">@@ -426,7 +426,7 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::didCreateObjectStoreOnServer&quot;);
</span><span class="cx"> 
</span><del>-    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::CreateObjectStoreSuccess);
</del><ins>+    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::CreateObjectStoreSuccess || resultData.type() == IDBResultType::Error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;IDBIndex&gt; IDBTransaction::createIndex(IDBObjectStore&amp; objectStore, const IDBIndexInfo&amp; info)
</span><span class="lines">@@ -458,8 +458,15 @@
</span><span class="cx">     if (resultData.type() == IDBResultType::CreateIndexSuccess)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    // If index creation failed, the transaction is aborted.
-    immediateAbort();
</del><ins>+    ASSERT(resultData.type() == IDBResultType::Error);
+
+    // This operation might have failed because the transaction is already aborting.
+    if (m_state == IndexedDB::TransactionState::Aborting)
+        return;
+
+    // Otherwise, failure to create an index forced abortion of the transaction.
+    ExceptionCode ec;
+    abort(ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
</span><span class="lines">@@ -585,6 +592,13 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::didGetRecordOnServer&quot;);
</span><span class="cx"> 
</span><ins>+    if (resultData.type() == IDBResultType::Error) {
+        request.requestCompleted(resultData);
+        return;
+    }
+
+    ASSERT(resultData.type() == IDBResultType::GetRecordSuccess);
+
</ins><span class="cx">     const IDBGetResult&amp; result = resultData.getResult();
</span><span class="cx"> 
</span><span class="cx">     if (request.sourceIndexIdentifier() &amp;&amp; request.requestedIndexRecordType() == IndexedDB::IndexRecordType::Key) {
</span><span class="lines">@@ -760,7 +774,7 @@
</span><span class="cx"> void IDBTransaction::didDeleteObjectStoreOnServer(const IDBResultData&amp; resultData)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::didDeleteObjectStoreOnServer&quot;);
</span><del>-    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteObjectStoreSuccess);
</del><ins>+    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteObjectStoreSuccess || resultData.type() == IDBResultType::Error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBTransaction::deleteIndex(uint64_t objectStoreIdentifier, const String&amp; indexName)
</span><span class="lines">@@ -784,7 +798,7 @@
</span><span class="cx"> void IDBTransaction::didDeleteIndexOnServer(const IDBResultData&amp; resultData)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::didDeleteIndexOnServer&quot;);
</span><del>-    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteIndexSuccess);
</del><ins>+    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteIndexSuccess || resultData.type() == IDBResultType::Error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBTransaction::operationDidComplete(TransactionOperation&amp; operation)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx">     Ref&lt;IDBRequest&gt; requestIndexRecord(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;);
</span><span class="cx"> 
</span><span class="cx">     void commitOnServer(TransactionOperation&amp;);
</span><del>-    void abortOnServer(TransactionOperation&amp;);
</del><ins>+    void abortOnServerAndCancelRequests(TransactionOperation&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void createObjectStoreOnServer(TransactionOperation&amp;, const IDBObjectStoreInfo&amp;);
</span><span class="cx">     void didCreateObjectStoreOnServer(const IDBResultData&amp;);
</span><span class="lines">@@ -182,8 +182,6 @@
</span><span class="cx"> 
</span><span class="cx">     void scheduleOperationTimer();
</span><span class="cx"> 
</span><del>-    void immediateAbort();
-
</del><span class="cx">     Ref&lt;IDBDatabase&gt; m_database;
</span><span class="cx">     IDBTransactionInfo m_info;
</span><span class="cx">     std::unique_ptr&lt;IDBDatabaseInfo&gt; m_originalDatabaseInfo;
</span><span class="lines">@@ -199,6 +197,7 @@
</span><span class="cx">     RefPtr&lt;IDBOpenDBRequest&gt; m_openDBRequest;
</span><span class="cx"> 
</span><span class="cx">     Deque&lt;RefPtr&lt;TransactionOperation&gt;&gt; m_transactionOperationQueue;
</span><ins>+    Deque&lt;RefPtr&lt;TransactionOperation&gt;&gt; m_abortQueue;
</ins><span class="cx">     HashMap&lt;IDBResourceIdentifier, RefPtr&lt;TransactionOperation&gt;&gt; m_transactionOperationMap;
</span><span class="cx"> 
</span><span class="cx">     HashMap&lt;String, RefPtr&lt;IDBObjectStore&gt;&gt; m_referencedObjectStores;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> 
</span><span class="cx"> IDBError MemoryIDBBackingStore::abortTransaction(const IDBResourceIdentifier&amp; transactionIdentifier)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;MemoryIDBBackingStore::abortTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;MemoryIDBBackingStore::abortTransaction - %s&quot;, transactionIdentifier.loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     auto transaction = m_transactions.take(transactionIdentifier);
</span><span class="cx">     if (!transaction)
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> 
</span><span class="cx"> IDBError MemoryIDBBackingStore::commitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;MemoryIDBBackingStore::commitTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;MemoryIDBBackingStore::commitTransaction - %s&quot;, transactionIdentifier.loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     auto transaction = m_transactions.take(transactionIdentifier);
</span><span class="cx">     if (!transaction)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBErrorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.cpp (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.cpp        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.cpp        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -67,6 +67,10 @@
</span><span class="cx">         static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;DataCloneError&quot;);
</span><span class="cx">         return entry;
</span><span class="cx">     }
</span><ins>+    case IDBExceptionCode::AbortError: {
+        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;AbortError&quot;);
+        return entry;
+    }
</ins><span class="cx">     case IDBExceptionCode::None:
</span><span class="cx">         RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx">     }
</span><span class="lines">@@ -109,6 +113,10 @@
</span><span class="cx">         static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Data being stored could not be cloned by the structured cloning algorithm.&quot;);
</span><span class="cx">         return entry;
</span><span class="cx">     }
</span><ins>+    case IDBExceptionCode::AbortError: {
+        static NeverDestroyed&lt;String&gt; entry = ASCIILiteral(&quot;Transaction was aborted&quot;);
+        return entry;
+    }
</ins><span class="cx">     case IDBExceptionCode::None:
</span><span class="cx">         RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBError.h        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx">     // Indexed DB existing exception codes with IDB-specific error messages:
</span><span class="cx">     InvalidStateError,
</span><span class="cx">     DataCloneError,
</span><ins>+    AbortError,
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class IDBError {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -94,6 +94,12 @@
</span><span class="cx">         &amp;&amp; m_resourceNumber == std::numeric_limits&lt;uint64_t&gt;::max();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#ifndef NDEBUG
+String IDBResourceIdentifier::loggingString() const
+{
+    return String::format(&quot;&lt;%&quot; PRIu64&quot;, %&quot; PRIu64&quot;&gt;&quot;, m_idbConnectionIdentifier, m_resourceNumber);
+}
+#endif
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h (192748 => 192749)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h        2015-11-23 19:41:05 UTC (rev 192748)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h        2015-11-23 19:48:50 UTC (rev 192749)
</span><span class="lines">@@ -72,6 +72,10 @@
</span><span class="cx"> 
</span><span class="cx">     IDBResourceIdentifier isolatedCopy() const;
</span><span class="cx"> 
</span><ins>+#ifndef NDEBUG
+    String loggingString() const;
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     IDBResourceIdentifier() = delete;
</span><span class="cx">     IDBResourceIdentifier(uint64_t connectionIdentifier, uint64_t resourceIdentifier);
</span></span></pre>
</div>
</div>

</body>
</html>