<!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 <beidson@apple.com>
</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 <beidson@apple.com>
+
</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: "objectStore.put({ bar: 'A' }, 1);" (error)
+Error handling: "objectStore.put({ bar: 'B' }, 2);" (error)
+Error handling: "objectStore.put({ bar: 'C' }, 3);" (error)
+Initial upgrade versionchange transaction aborted
+Second upgrade needed: Old version - 0 New version - 1
+Success handling: "objectStore.put({ bar: 'A' }, 1);"
+Success handling: "objectStore.put({ bar: 'B' }, 2);"
+Success handling: "objectStore.put({ bar: 'C' }, 3);"
+Second upgrade versionchange transaction completed
+Error handling: "objectStore.get(1);" (error)
+Error handling: "objectStore.get(2);" (error)
+Error handling: "objectStore.get(3);" (error)
+Error handling: "objectStore.put({ bar: 'D' }, 4);" (error)
+Error handling: "objectStore.put({ bar: 'E' }, 5);" (error)
+Error handling: "objectStore.put({ bar: 'F' }, 6);" (error)
+readwrite transaction aborted
+Error handling: "objectStore.get(1);" (error)
+Error handling: "objectStore.get(2);" (error)
+Error handling: "objectStore.get(3);" (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.<br>
+<div id="logger"></div>
+<script>
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+
+function done()
+{
+ log("Done");
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+function log(message)
+{
+ document.getElementById("logger").innerHTML += message + "<br>";
+}
+
+var database;
+var objectStore;
+
+function setupRequest(code)
+{
+ var request = eval(code);
+ request.onsuccess = function()
+ {
+ log ("Success handling: \"" + code + "\"");
+ }
+ request.onerror = function(e)
+ {
+ log ("Error handling: \"" + code + "\" (" + e.type + ")");
+ e.stopPropagation();
+ }
+}
+
+startTest();
+
+function startTest() {
+ var createRequest = window.indexedDB.open("AbortRequestsCancelledDatabase", 1);
+ createRequest.onupgradeneeded = function(event) {
+ log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ var versionTransaction = createRequest.transaction;
+ var database = event.target.result;
+ objectStore = database.createObjectStore("TestObjectStore");
+ setupRequest("objectStore.put({ bar: 'A' }, 1);");
+ setupRequest("objectStore.put({ bar: 'B' }, 2);");
+ setupRequest("objectStore.put({ bar: 'C' }, 3);");
+
+ versionTransaction.abort();
+
+ versionTransaction.onabort = function(event) {
+ log("Initial upgrade versionchange transaction aborted");
+ database.close();
+ continueTest1();
+ }
+
+ versionTransaction.oncomplete = function(event) {
+ log("Initial upgrade versionchange transaction unexpected complete");
+ done();
+ }
+
+ versionTransaction.onerror = function(event) {
+ log("Initial upgrade versionchange transaction unexpected error" + event);
+ done();
+ }
+ }
+}
+
+function continueTest1() {
+ var createRequest = window.indexedDB.open("AbortRequestsCancelledDatabase", 1);
+ createRequest.onupgradeneeded = function(event) {
+ log("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ var versionTransaction = createRequest.transaction;
+ database = event.target.result;
+ objectStore = database.createObjectStore("TestObjectStore");
+
+ setupRequest("objectStore.put({ bar: 'A' }, 1);");
+ setupRequest("objectStore.put({ bar: 'B' }, 2);");
+ setupRequest("objectStore.put({ bar: 'C' }, 3);");
+
+ versionTransaction.onabort = function(event) {
+ log("Second upgrade versionchange transaction unexpected abort");
+ done();
+ }
+
+ versionTransaction.oncomplete = function(event) {
+ log("Second upgrade versionchange transaction completed");
+ continueTest2();
+ }
+
+ versionTransaction.onerror = function(event) {
+ log("Second upgrade versionchange transaction unexpected error" + event);
+ done();
+ }
+ }
+}
+
+function continueTest2() {
+ var transaction = database.transaction("TestObjectStore", "readwrite");
+ objectStore = transaction.objectStore("TestObjectStore");
+
+ setupRequest("objectStore.get(1);");
+ setupRequest("objectStore.get(2);");
+ setupRequest("objectStore.get(3);");
+ setupRequest("objectStore.put({ bar: 'D' }, 4);");
+ setupRequest("objectStore.put({ bar: 'E' }, 5);");
+ setupRequest("objectStore.put({ bar: 'F' }, 6);");
+
+ transaction.abort();
+
+ transaction.onabort = function(event) {
+ log("readwrite transaction aborted");
+ continueTest3();
+ }
+
+ transaction.oncomplete = function(event) {
+ log("readwrite transaction unexpected complete");
+ done();
+ }
+
+ transaction.onerror = function(event) {
+ log("readwrite transaction unexpected error" + event);
+ done();
+ }
+}
+
+function continueTest3() {
+ var transaction = database.transaction("TestObjectStore", "readonly");
+ objectStore = transaction.objectStore("TestObjectStore");
+
+ setupRequest("objectStore.get(1);");
+ setupRequest("objectStore.get(2);");
+ setupRequest("objectStore.get(3);");
+
+ transaction.abort();
+
+ transaction.onabort = function(event) {
+ log("readonly transaction aborted");
+ done();
+ }
+
+ transaction.oncomplete = function(event) {
+ log("readwrite transaction unexpected complete");
+ done();
+ }
+
+ transaction.onerror = function(event) {
+ log("readwrite transaction unexpected error" + event);
+ done();
+ }
+}
+</script>
</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("bar", "foo");
</span><span class="cx">
</span><del>- putRequest.onerror = function(event) {
- alert("put unexpectedly failed - " + event);
- done();
</del><ins>+ putRequest.onerror = function() {
+ alert("put failed (because transaction was aborted)");
</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("Count is: " + countRequest.result);
</span><span class="cx"> }
</span><ins>+ countRequest.onerror = function(e) {
+ log("Error getting cursor count");
+ 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("Unexpected error opening or iterating cursor");
- logCursor(cursorRequest.result);
- done();
</del><ins>+ log("Error opening or iterating cursor");
+ 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 <beidson@apple.com>
</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 <beidson@apple.com>
+
</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, "IDBDatabase::transaction - Added active transaction %s", info.identifier().loggingString().utf8().data());
+
</ins><span class="cx"> m_activeTransactions.set(info.identifier(), &transaction.get());
</span><span class="cx">
</span><span class="cx"> return adoptRef(&transaction.leakRef());
</span><span class="lines">@@ -241,7 +243,7 @@
</span><span class="cx">
</span><span class="cx"> Ref<IDBTransaction> IDBDatabase::startVersionChangeTransaction(const IDBTransactionInfo& info, IDBOpenDBRequest& request)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBDatabase::startVersionChangeTransaction");
</del><ins>+ LOG(IndexedDB, "IDBDatabase::startVersionChangeTransaction %s", 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& transaction)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBDatabase::didStartTransaction");
</del><ins>+ LOG(IndexedDB, "IDBDatabase::didStartTransaction %s", 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(), &transaction);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBDatabase::willCommitTransaction(IDBTransaction& transaction)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBDatabase::willCommitTransaction");
</del><ins>+ LOG(IndexedDB, "IDBDatabase::willCommitTransaction %s", 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& transaction)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBDatabase::didCommitTransaction");
</del><ins>+ LOG(IndexedDB, "IDBDatabase::didCommitTransaction %s", transaction.info().identifier().loggingString().utf8().data());
</ins><span class="cx">
</span><span class="cx"> if (m_versionChangeTransaction == &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& transaction)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBDatabase::willAbortTransaction");
</del><ins>+ LOG(IndexedDB, "IDBDatabase::willAbortTransaction %s", 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& transaction)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBDatabase::didAbortTransaction");
</del><ins>+ LOG(IndexedDB, "IDBDatabase::didAbortTransaction %s", 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& transaction)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBDatabase::didCommitOrAbortTransaction");
</del><ins>+ LOG(IndexedDB, "IDBDatabase::didCommitOrAbortTransaction %s", transaction.info().identifier().loggingString().utf8().data());
</ins><span class="cx">
</span><span class="cx"> if (m_versionChangeTransaction == &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(&objectStore.leakRef());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBTransaction::immediateAbort()
-{
- LOG(IndexedDB, "IDBTransaction::immediateAbort");
-
- if (isFinishedOrFinishing())
- return;
-
- m_state = IndexedDB::TransactionState::Aborting;
- m_database->willAbortTransaction(*this);
-
- auto operation = createTransactionOperation(*this, nullptr, &IDBTransaction::abortOnServer);
- abortOnServer(*operation);
-}
-
</del><span class="cx"> void IDBTransaction::abort(ExceptionCode& ec)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::abort");
</span><span class="lines">@@ -191,14 +177,28 @@
</span><span class="cx"> m_state = IndexedDB::TransactionState::Aborting;
</span><span class="cx"> m_database->willAbortTransaction(*this);
</span><span class="cx">
</span><del>- auto operation = createTransactionOperation(*this, nullptr, &IDBTransaction::abortOnServer);
</del><ins>+ m_abortQueue.swap(m_transactionOperationQueue);
+
+ auto operation = createTransactionOperation(*this, nullptr, &IDBTransaction::abortOnServerAndCancelRequests);
</ins><span class="cx"> scheduleOperation(WTF::move(operation));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBTransaction::abortOnServer(TransactionOperation&)
</del><ins>+void IDBTransaction::abortOnServerAndCancelRequests(TransactionOperation&)
</ins><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBTransaction::abortOnServer");
</del><ins>+ LOG(IndexedDB, "IDBTransaction::abortOnServerAndCancelRequests");
+
+ ASSERT(m_transactionOperationQueue.isEmpty());
+
</ins><span class="cx"> serverConnection().abortTransaction(*this);
</span><ins>+
+ IDBError error(IDBExceptionCode::AbortError);
+ for (auto& operation : m_abortQueue)
+ operation->completed(IDBResultData::error(operation->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, "IDBTransaction::didCreateObjectStoreOnServer");
</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<IDBIndex> IDBTransaction::createIndex(IDBObjectStore& objectStore, const IDBIndexInfo& 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<IDBRequest> IDBTransaction::requestOpenCursor(ScriptExecutionContext& context, IDBObjectStore& objectStore, const IDBCursorInfo& info)
</span><span class="lines">@@ -585,6 +592,13 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::didGetRecordOnServer");
</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& result = resultData.getResult();
</span><span class="cx">
</span><span class="cx"> if (request.sourceIndexIdentifier() && request.requestedIndexRecordType() == IndexedDB::IndexRecordType::Key) {
</span><span class="lines">@@ -760,7 +774,7 @@
</span><span class="cx"> void IDBTransaction::didDeleteObjectStoreOnServer(const IDBResultData& resultData)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::didDeleteObjectStoreOnServer");
</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& indexName)
</span><span class="lines">@@ -784,7 +798,7 @@
</span><span class="cx"> void IDBTransaction::didDeleteIndexOnServer(const IDBResultData& resultData)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::didDeleteIndexOnServer");
</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& 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<IDBRequest> requestIndexRecord(ScriptExecutionContext&, IDBIndex&, IndexedDB::IndexRecordType, const IDBKeyRangeData&);
</span><span class="cx">
</span><span class="cx"> void commitOnServer(TransactionOperation&);
</span><del>- void abortOnServer(TransactionOperation&);
</del><ins>+ void abortOnServerAndCancelRequests(TransactionOperation&);
</ins><span class="cx">
</span><span class="cx"> void createObjectStoreOnServer(TransactionOperation&, const IDBObjectStoreInfo&);
</span><span class="cx"> void didCreateObjectStoreOnServer(const IDBResultData&);
</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<IDBDatabase> m_database;
</span><span class="cx"> IDBTransactionInfo m_info;
</span><span class="cx"> std::unique_ptr<IDBDatabaseInfo> m_originalDatabaseInfo;
</span><span class="lines">@@ -199,6 +197,7 @@
</span><span class="cx"> RefPtr<IDBOpenDBRequest> m_openDBRequest;
</span><span class="cx">
</span><span class="cx"> Deque<RefPtr<TransactionOperation>> m_transactionOperationQueue;
</span><ins>+ Deque<RefPtr<TransactionOperation>> m_abortQueue;
</ins><span class="cx"> HashMap<IDBResourceIdentifier, RefPtr<TransactionOperation>> m_transactionOperationMap;
</span><span class="cx">
</span><span class="cx"> HashMap<String, RefPtr<IDBObjectStore>> 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& transactionIdentifier)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "MemoryIDBBackingStore::abortTransaction");
</del><ins>+ LOG(IndexedDB, "MemoryIDBBackingStore::abortTransaction - %s", 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& transactionIdentifier)
</span><span class="cx"> {
</span><del>- LOG(IndexedDB, "MemoryIDBBackingStore::commitTransaction");
</del><ins>+ LOG(IndexedDB, "MemoryIDBBackingStore::commitTransaction - %s", 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<String> entry = ASCIILiteral("DataCloneError");
</span><span class="cx"> return entry;
</span><span class="cx"> }
</span><ins>+ case IDBExceptionCode::AbortError: {
+ static NeverDestroyed<String> entry = ASCIILiteral("AbortError");
+ 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<String> entry = ASCIILiteral("Data being stored could not be cloned by the structured cloning algorithm.");
</span><span class="cx"> return entry;
</span><span class="cx"> }
</span><ins>+ case IDBExceptionCode::AbortError: {
+ static NeverDestroyed<String> entry = ASCIILiteral("Transaction was aborted");
+ 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"> && m_resourceNumber == std::numeric_limits<uint64_t>::max();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#ifndef NDEBUG
+String IDBResourceIdentifier::loggingString() const
+{
+ return String::format("<%" PRIu64", %" PRIu64">", 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>