<!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>[208405] 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/208405">208405</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-11-04 16:27:19 -0700 (Fri, 04 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>IndexedDB 2.0: Clean up more transaction abort and exception throwing behavior from IDBObjectStore.
https://bugs.webkit.org/show_bug.cgi?id=164424

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

This patch actually turns a handful of PASS to FAIL in the imported tests, but those are parts of the
spec in flux/under discussion.

We'll update either source or the tests as things are resolved.

* IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt:
* IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt:
* IndexedDB-private-browsing/idbindex_get7-expected.txt:
* IndexedDB-private-browsing/idbindex_getKey7-expected.txt:
* IndexedDB-private-browsing/idbindex_openCursor2-expected.txt:
* IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt:
* web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt:
* web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt:
* web-platform-tests/IndexedDB/idbindex_get8-expected.txt:
* web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt:
* web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt:
* web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt:
* web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt:
* web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt:
* web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

This patch actually turns a handful of PASS to FAIL in the imported tests, but those are parts of the
spec in flux/under discussion.

We'll update either source or the tests as things are resolved.

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::rollbackInfoForVersionChangeAbort):

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

LayoutTests:

* storage/indexeddb/resources/transaction-basics.js:
* storage/indexeddb/transaction-basics-expected.txt:
* storage/indexeddb/transaction-basics-private-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbcursor_advance_index7expectedtxt">trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbcursor_continue_index7expectedtxt">trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbindex_get7expectedtxt">trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_get7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbindex_getKey7expectedtxt">trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_getKey7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbindex_openCursor2expectedtxt">trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openCursor2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbindex_openKeyCursor3expectedtxt">trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbcursor_advance_index7expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbcursor_continue_index7expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbindex_get8expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_get8-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbindex_getKey8expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbindex_openCursor3expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbindex_openKeyCursor4expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortindexmetadatarevertexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortmultiplemetadatarevertexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortobjectstoremetadatarevertexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbresourcestransactionbasicsjs">trunk/LayoutTests/storage/indexeddb/resources/transaction-basics.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbtransactionbasicsexpectedtxt">trunk/LayoutTests/storage/indexeddb/transaction-basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbtransactionbasicsprivateexpectedtxt">trunk/LayoutTests/storage/indexeddb/transaction-basics-private-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexcpp">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/ChangeLog        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-11-04  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Clean up more transaction abort and exception throwing behavior from IDBObjectStore.
+        https://bugs.webkit.org/show_bug.cgi?id=164424
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/resources/transaction-basics.js:
+        * storage/indexeddb/transaction-basics-expected.txt:
+        * storage/indexeddb/transaction-basics-private-expected.txt:
+
</ins><span class="cx"> 2016-11-04  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Load stylesheets in link elements inside a connected shadow tree
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2016-11-04  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        IndexedDB 2.0: Clean up more transaction abort and exception throwing behavior from IDBObjectStore.
+        https://bugs.webkit.org/show_bug.cgi?id=164424
+
+        Reviewed by Alex Christensen.
+
+        This patch actually turns a handful of PASS to FAIL in the imported tests, but those are parts of the
+        spec in flux/under discussion.
+
+        We'll update either source or the tests as things are resolved.
+
+        * IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt:
+        * IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt:
+        * IndexedDB-private-browsing/idbindex_get7-expected.txt:
+        * IndexedDB-private-browsing/idbindex_getKey7-expected.txt:
+        * IndexedDB-private-browsing/idbindex_openCursor2-expected.txt:
+        * IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt:
+        * web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt:
+        * web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt:
+        * web-platform-tests/IndexedDB/idbindex_get8-expected.txt:
+        * web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt:
+        * web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt:
+        * web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt:
+        * web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt:
+        * web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt:
+        * web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt:
+
+2016-11-04  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         IndexedDB 2.0: Handle IDBObjectStore rename behavior properly when version change transaction aborts.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=164416
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbcursor_advance_index7expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><span class="cx"> 
</span><del>-PASS IDBCursor.advance() - index - throw TransactionInactiveError 
</del><ins>+FAIL IDBCursor.advance() - index - throw TransactionInactiveError assert_throws: Calling advance() should throws an exception TransactionInactiveError when the transaction is not active. function &quot;function () {
+                cursor.advance(1);
+        ...&quot; threw object &quot;InvalidStateError (DOM IDBDatabase Exception 11): Failed ...&quot; that is not a DOMException TransactionInactiveError: property &quot;code&quot; is equal to 11, expected 0
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbcursor_continue_index7expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><span class="cx"> 
</span><del>-PASS IDBCursor.continue() - index - throw TransactionInactiveError 
</del><ins>+FAIL IDBCursor.continue() - index - throw TransactionInactiveError assert_throws: Calling continue() should throws an exception TransactionInactiveError when the transaction is not active. function &quot;function () {
+                cursor.continue();
+        ...&quot; threw object &quot;InvalidStateError (DOM IDBDatabase Exception 11): Failed ...&quot; that is not a DOMException TransactionInactiveError: property &quot;code&quot; is equal to 11, expected 0
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbindex_get7expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_get7-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_get7-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_get7-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL IDBIndex.get() - throw TransactionInactiveError on aborted transaction assert_throws: function &quot;function (){
-            index.get(&quot;data&quot;);
-        }&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS IDBIndex.get() - throw TransactionInactiveError on aborted transaction 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbindex_getKey7expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_getKey7-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_getKey7-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_getKey7-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL IDBIndex.getKey() - throw TransactionInactiveError on aborted transaction assert_throws: function &quot;function (){
-            index.getKey(&quot;data&quot;);
-        }&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS IDBIndex.getKey() - throw TransactionInactiveError on aborted transaction 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbindex_openCursor2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openCursor2-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openCursor2-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openCursor2-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL IDBIndex.openCursor() - throw TransactionInactiveError on aborted transaction assert_throws: function &quot;function (){
-            index.openCursor();
-        }&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS IDBIndex.openCursor() - throw TransactionInactiveError on aborted transaction 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbindex_openKeyCursor3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL IDBIndex.openKeyCursor() - throw TransactionInactiveError on aborted transaction assert_throws: function &quot;function (){
-            index.openKeyCursor();
-        }&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS IDBIndex.openKeyCursor() - throw TransactionInactiveError on aborted transaction 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbcursor_advance_index7expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><span class="cx"> 
</span><del>-PASS IDBCursor.advance() - index - throw TransactionInactiveError 
</del><ins>+FAIL IDBCursor.advance() - index - throw TransactionInactiveError assert_throws: Calling advance() should throws an exception TransactionInactiveError when the transaction is not active. function &quot;function () {
+                cursor.advance(1);
+        ...&quot; threw object &quot;InvalidStateError (DOM IDBDatabase Exception 11): Failed ...&quot; that is not a DOMException TransactionInactiveError: property &quot;code&quot; is equal to 11, expected 0
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbcursor_continue_index7expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><span class="cx"> 
</span><del>-PASS IDBCursor.continue() - index - throw TransactionInactiveError 
</del><ins>+FAIL IDBCursor.continue() - index - throw TransactionInactiveError assert_throws: Calling continue() should throws an exception TransactionInactiveError when the transaction is not active. function &quot;function () {
+                cursor.continue();
+        ...&quot; threw object &quot;InvalidStateError (DOM IDBDatabase Exception 11): Failed ...&quot; that is not a DOMException TransactionInactiveError: property &quot;code&quot; is equal to 11, expected 0
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbindex_get8expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_get8-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_get8-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_get8-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL IDBIndex.get() - throw InvalidStateError on index deleted by aborted upgrade assert_throws: function &quot;function (){
-            index.get(&quot;data&quot;);
-        }&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS IDBIndex.get() - throw InvalidStateError on index deleted by aborted upgrade 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbindex_getKey8expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL IDBIndex.getKey() - throw InvalidStateError on index deleted by aborted upgrade assert_throws: function &quot;function (){
-            index.getKey(&quot;data&quot;);
-        }&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS IDBIndex.getKey() - throw InvalidStateError on index deleted by aborted upgrade 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbindex_openCursor3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL IDBIndex.openCursor() - throw InvalidStateError on index deleted by aborted upgrade assert_throws: function &quot;function (){
-            index.openCursor();
-        }&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS IDBIndex.openCursor() - throw InvalidStateError on index deleted by aborted upgrade 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbindex_openKeyCursor4expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL IDBIndex.openKeyCursor() - throw InvalidStateError on index deleted by aborted upgrade assert_throws: function &quot;function (){
-            index.openKeyCursor();
-        }&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS IDBIndex.openKeyCursor() - throw InvalidStateError on index deleted by aborted upgrade 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortindexmetadatarevertexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><span class="cx"> 
</span><del>-FAIL Created stores get their indexes marked as deleted after the transaction that created them aborts assert_throws: IDBIndex.get should throw InvalidStateError, indicating that the index is marked for deletion, immediately after IDBTransaction.abort() returns function &quot;() =&gt; index.get('query')&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS Created stores get their indexes marked as deleted after the transaction that created them aborts 
</ins><span class="cx"> FAIL Deleted stores get their indexes marked as not-deleted after the transaction that deleted them aborts assert_array_equals: IDBObjectStore.indexNames should be empty immediately after IDBDatabase.deleteObjectStore() returns lengths differ, expected 0 got 2
</span><span class="cx"> FAIL Created+deleted stores still have their indexes marked as deleted after the transaction aborts assert_array_equals: IDBObjectStore.indexNames should be empty immediately after IDBDatabase.deleteObjectStore() returns lengths differ, expected 0 got 2
</span><del>-FAIL Created indexes get marked as deleted after their transaction aborts assert_throws: IDBIndex.get should throw InvalidStateError, indicating that the index is marked for deletion, immediately after IDBTransaction.abort() returns function &quot;() =&gt; index.get('query')&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS Created indexes get marked as deleted after their transaction aborts 
</ins><span class="cx"> FAIL Deleted indexes get marked as not-deleted after the transaction aborts assert_throws: IDBIndex.get should throw TransactionInactiveError, indicating that the index is no longer marked for deletion, immediately after IDBTransaction.abort() returns function &quot;() =&gt; index.get('query')&quot; threw object &quot;InvalidStateError (DOM IDBDatabase Exception 11): Failed ...&quot; that is not a DOMException TransactionInactiveError: property &quot;code&quot; is equal to 11, expected 0
</span><span class="cx"> PASS Created+deleted indexes are still marked as deleted after their transaction aborts 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortmultiplemetadatarevertexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-FAIL Deleted indexes in newly created stores are still marked as deleted after the transaction aborts assert_throws: IDBObjectStore.get should throw InvalidStateError, indicating that the store is marked for deletion, immediately after IDBTransaction.abort() returns function &quot;() =&gt; store.get('query')&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS Deleted indexes in newly created stores are still marked as deleted after the transaction aborts 
</ins><span class="cx"> FAIL Deleted indexes in deleted stores are still marked as not-deleted after the transaction aborts assert_array_equals: IDBObjectStore.indexNames for the deleted store should be empty immediately after IDBDatabase.deleteObjectStore() returns lengths differ, expected 0 got 1
</span><span class="cx"> FAIL Deleted indexes in created+deleted stores are still marked as deleted after their transaction aborts assert_array_equals: IDBObjectStore.indexNames should be empty immediately after IDBDatabase.deleteObjectStore() returns lengths differ, expected 0 got 1
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBtransactionabortobjectstoremetadatarevertexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> 
</span><del>-FAIL Created stores get marked as deleted after their transaction aborts assert_throws: IDBObjectStore.get should throw InvalidStateError, indicating that the store is marked for deletion, immediately after IDBTransaction.abort() returns function &quot;() =&gt; store.get('query')&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
-PASS Deleted stores get marked as not-deleted after the transaction aborts 
-FAIL Created+deleted stores are still marked as deleted after their transaction aborts assert_throws: IDBObjectStore.get should throw InvalidStateError, indicating that the store is still marked for deletion, immediately after IDBTransaction.abort() returns function &quot;() =&gt; store.get('query')&quot; threw object &quot;TransactionInactiveError (DOM IDBDatabase Exception): Fai...&quot; that is not a DOMException InvalidStateError: property &quot;code&quot; is equal to 0, expected 11
</del><ins>+PASS Created stores get marked as deleted after their transaction aborts 
+FAIL Deleted stores get marked as not-deleted after the transaction aborts assert_throws: IDBObjectStore.get should throw TransactionInactiveError, indicating that the store is no longer marked for deletion, immediately after IDBTransaction.abort() returns function &quot;() =&gt; store.get('query')&quot; threw object &quot;InvalidStateError (DOM IDBDatabase Exception 11): Failed ...&quot; that is not a DOMException TransactionInactiveError: property &quot;code&quot; is equal to 11, expected 0
+PASS Created+deleted stores are still marked as deleted after their transaction aborts 
</ins><span class="cx"> PASS Un-instantiated deleted stores get marked as not-deleted after the transaction aborts 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbresourcestransactionbasicsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/resources/transaction-basics.js (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/resources/transaction-basics.js        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/storage/indexeddb/resources/transaction-basics.js        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -100,18 +100,18 @@
</span><span class="cx"> {
</span><span class="cx">     debug(&quot;&quot;);
</span><span class="cx">     debug(&quot;testInactiveAbortedTransaction():&quot;);
</span><del>-    evalAndExpectException(&quot;index.openCursor()&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;index.openKeyCursor()&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;index.get(0)&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;index.getKey(0)&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;index.count()&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
</del><ins>+    evalAndExpectException(&quot;index.openCursor()&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;index.openKeyCursor()&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;index.get(0)&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;index.getKey(0)&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;index.count()&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
</ins><span class="cx"> 
</span><del>-    evalAndExpectException(&quot;store.put(0, 0)&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;store.add(0, 0)&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;store.delete(0)&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;store.clear()&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;store.get(0)&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
-    evalAndExpectException(&quot;store.openCursor()&quot;, &quot;0&quot;, &quot;'TransactionInactiveError'&quot;);
</del><ins>+    evalAndExpectException(&quot;store.put(0, 0)&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;store.add(0, 0)&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;store.delete(0)&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;store.clear()&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;store.get(0)&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
+    evalAndExpectException(&quot;store.openCursor()&quot;, &quot;11&quot;, &quot;'InvalidStateError'&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function testSetVersionAbort4()
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbtransactionbasicsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/transaction-basics-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/transaction-basics-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/storage/indexeddb/transaction-basics-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -61,59 +61,59 @@
</span><span class="cx"> testInactiveAbortedTransaction():
</span><span class="cx"> Expecting exception from index.openCursor()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from index.openKeyCursor()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from index.get(0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from index.getKey(0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from index.count()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from store.put(0, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to store record in an IDBObjectStore: The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.add(0, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to store record in an IDBObjectStore: The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.delete(0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.clear()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'clear' on 'IDBObjectStore': The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.get(0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.openCursor()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.
</ins><span class="cx"> 
</span><span class="cx"> testSetVersionAbort4():
</span><span class="cx"> PASS self.db.objectStoreNames is []
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbtransactionbasicsprivateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/transaction-basics-private-expected.txt (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/transaction-basics-private-expected.txt        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/LayoutTests/storage/indexeddb/transaction-basics-private-expected.txt        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -61,59 +61,59 @@
</span><span class="cx"> testInactiveAbortedTransaction():
</span><span class="cx"> Expecting exception from index.openCursor()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from index.openKeyCursor()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from index.get(0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from index.getKey(0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from index.count()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.
</ins><span class="cx"> Expecting exception from store.put(0, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to store record in an IDBObjectStore: The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.add(0, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to store record in an IDBObjectStore: The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.delete(0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.clear()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'clear' on 'IDBObjectStore': The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.get(0)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.
</ins><span class="cx"> Expecting exception from store.openCursor()
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS code is 0
-PASS ename is 'TransactionInactiveError'
-Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished.
</del><ins>+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.
</ins><span class="cx"> 
</span><span class="cx"> testSetVersionAbort4():
</span><span class="cx"> PASS self.db.objectStoreNames is []
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/Source/WebCore/ChangeLog        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-11-04  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Clean up more transaction abort and exception throwing behavior from IDBObjectStore.
+        https://bugs.webkit.org/show_bug.cgi?id=164424
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Covered by existing tests).
+
+        This patch actually turns a handful of PASS to FAIL in the imported tests, but those are parts of the
+        spec in flux/under discussion.
+
+        We'll update either source or the tests as things are resolved.
+
+        * Modules/indexeddb/IDBIndex.cpp:
+        (WebCore::IDBIndex::rollbackInfoForVersionChangeAbort):
+
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::get):
+        (WebCore::IDBObjectStore::putOrAdd):
+        (WebCore::IDBObjectStore::rollbackForVersionChangeAbort):
+
</ins><span class="cx"> 2016-11-04  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Load stylesheets in link elements inside a connected shadow tree
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -140,8 +140,10 @@
</span><span class="cx">     if (!objectStoreInfo)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (!objectStoreInfo-&gt;hasIndex(m_info.identifier()))
</del><ins>+    if (!objectStoreInfo-&gt;hasIndex(m_info.identifier())) {
+        m_deleted = true;
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     m_info = m_originalInfo;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (208404 => 208405)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-11-04 23:02:19 UTC (rev 208404)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-11-04 23:27:19 UTC (rev 208405)
</span><span class="lines">@@ -211,12 +211,12 @@
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="cx"> 
</span><ins>+    if (m_deleted)
+        return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.&quot;) };
+
</ins><span class="cx">     if (!m_transaction-&gt;isActive())
</span><span class="cx">         return Exception { IDBDatabaseException::TransactionInactiveError, ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.&quot;) };
</span><span class="cx"> 
</span><del>-    if (m_deleted)
-        return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.&quot;) };
-
</del><span class="cx">     auto idbKey = scriptValueToIDBKey(execState, key);
</span><span class="cx">     if (!idbKey-&gt;isValid())
</span><span class="cx">         return Exception { IDBDatabaseException::DataError, ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.&quot;) };
</span><span class="lines">@@ -229,12 +229,12 @@
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="cx"> 
</span><ins>+    if (m_deleted)
+        return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.&quot;) };
+
</ins><span class="cx">     if (!m_transaction-&gt;isActive())
</span><span class="cx">         return Exception { IDBDatabaseException::TransactionInactiveError };
</span><span class="cx"> 
</span><del>-    if (m_deleted)
-        return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.&quot;) };
-
</del><span class="cx">     IDBKeyRangeData keyRangeData(keyRange);
</span><span class="cx">     if (!keyRangeData.isValid())
</span><span class="cx">         return Exception { IDBDatabaseException::DataError };
</span><span class="lines">@@ -275,11 +275,6 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return Exception { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Unable to store record in object store because it does not have a valid script execution context&quot;) };
</span><span class="cx"> 
</span><del>-    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
-    // the exception for an object store being deleted.
-    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
-    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
-    // Until this is sorted out, we'll agree with the test and the majority share browsers.
</del><span class="cx">     if (m_deleted)
</span><span class="cx">         return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The object store has been deleted.&quot;) };
</span><span class="cx"> 
</span><span class="lines">@@ -607,9 +602,22 @@
</span><span class="cx">     String currentName = m_info.name();
</span><span class="cx">     m_info = m_originalInfo;
</span><span class="cx"> 
</span><del>-    if (!transaction().database().info().infoForExistingObjectStore(m_info.identifier()))
</del><ins>+    auto&amp; databaseInfo = transaction().database().info();
+    auto* objectStoreInfo = databaseInfo.infoForExistingObjectStore(m_info.identifier());
+    if (!objectStoreInfo) {
</ins><span class="cx">         m_info.rename(currentName);
</span><ins>+        m_deleted = true;
+    } else {
+        HashSet&lt;uint64_t&gt; indexesToRemove;
+        for (auto indexIdentifier : objectStoreInfo-&gt;indexMap().keys()) {
+            if (!objectStoreInfo-&gt;hasIndex(indexIdentifier))
+                indexesToRemove.add(indexIdentifier);
+        }
</ins><span class="cx"> 
</span><ins>+        for (auto indexIdentifier : indexesToRemove)
+            m_info.deleteIndex(indexIdentifier);
+    }
+
</ins><span class="cx">     Locker&lt;Lock&gt; locker(m_referencedIndexLock);
</span><span class="cx">     for (auto&amp; index : m_referencedIndexes.values())
</span><span class="cx">         index-&gt;rollbackInfoForVersionChangeAbort();
</span></span></pre>
</div>
</div>

</body>
</html>