<!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>[207641] 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/207641">207641</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-10-20 16:03:21 -0700 (Thu, 20 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>IndexedDB 2.0: Support IDBObjectStore name assignment.
&lt;rdar://problem/28806931&gt; and https://bugs.webkit.org/show_bug.cgi?id=163749

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:
* web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt:

Source/WebCore:

Tests: storage/indexeddb/modern/objectstore-rename-1-private.html
       storage/indexeddb/modern/objectstore-rename-1.html

Touches a *lot* of code sites, but none of them are particularly interesting.
They are all just getting the new name spread out to all of the various objects that need it.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::renameObjectStore):
* Modules/indexeddb/IDBDatabase.h:

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::setName):
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::renameObjectStore):
(WebCore::IDBTransaction::renameObjectStoreOnServer):
(WebCore::IDBTransaction::didRenameObjectStoreOnServer):
* Modules/indexeddb/IDBTransaction.h:

* Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::renameObjectStore):
* Modules/indexeddb/client/IDBConnectionProxy.h:

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::renameObjectStore):
(WebCore::IDBClient::IDBConnectionToServer::didRenameObjectStore):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
(WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::renameObjectStore):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryObjectStore.h:
(WebCore::IDBServer::MemoryObjectStore::rename):

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

* Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
(WebCore::IDBDatabaseInfo::renameObjectStore):
* Modules/indexeddb/shared/IDBDatabaseInfo.h:

* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
(WebCore::IDBObjectStoreInfo::rename):

* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::renameObjectStoreSuccess):
* Modules/indexeddb/shared/IDBResultData.h:

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didRenameObjectStore):
(WebCore::InProcessIDBServer::renameObjectStore):
* Modules/indexeddb/shared/InProcessIDBServer.h:

Source/WebKit2:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::didRenameObjectStore):
(WebKit::WebIDBConnectionToClient::renameObjectStore):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::renameObjectStore):
(WebKit::WebIDBConnectionToServer::didRenameObjectStore):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:

LayoutTests:

* storage/indexeddb/modern/objectstore-rename-1-expected.txt: Added.
* storage/indexeddb/modern/objectstore-rename-1-private-expected.txt: Added.
* storage/indexeddb/modern/objectstore-rename-1-private.html: Added.
* storage/indexeddb/modern/objectstore-rename-1.html: Added.
* storage/indexeddb/modern/resources/objectstore-rename-1.js: Added.

* storage/indexeddb/readonly-expected.txt:
* storage/indexeddb/readonly-private-expected.txt:
* storage/indexeddb/resources/readonly.js: Removed the test that verifies that object store names are
  readonly as they are no longer readonly.</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="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbobjectstorerenameerrorsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbobjectstorerenamestoreexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbreadonlyexpectedtxt">trunk/LayoutTests/storage/indexeddb/readonly-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbreadonlyprivateexpectedtxt">trunk/LayoutTests/storage/indexeddb/readonly-private-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbresourcesreadonlyjs">trunk/LayoutTests/storage/indexeddb/resources/readonly.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxycpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxyh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerh">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactionh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectioncpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectionh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactionh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResultDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResultDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientcpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClienth">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientmessagesin">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServerh">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServermessagesin">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstorerename1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstorerename1privateexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstorerename1privatehtml">trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstorerename1html">trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesobjectstorerename1js">trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-rename-1.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/LayoutTests/ChangeLog        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-10-20  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Support IDBObjectStore name assignment.
+        &lt;rdar://problem/28806931&gt; and https://bugs.webkit.org/show_bug.cgi?id=163749
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/objectstore-rename-1-expected.txt: Added.
+        * storage/indexeddb/modern/objectstore-rename-1-private-expected.txt: Added.
+        * storage/indexeddb/modern/objectstore-rename-1-private.html: Added.
+        * storage/indexeddb/modern/objectstore-rename-1.html: Added.
+        * storage/indexeddb/modern/resources/objectstore-rename-1.js: Added.
+
+        * storage/indexeddb/readonly-expected.txt:
+        * storage/indexeddb/readonly-private-expected.txt:
+        * storage/indexeddb/resources/readonly.js: Removed the test that verifies that object store names are
+          readonly as they are no longer readonly.
+
</ins><span class="cx"> 2016-10-20  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed gardening.
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-10-20  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Support IDBObjectStore name assignment.
+        &lt;rdar://problem/28806931&gt; and https://bugs.webkit.org/show_bug.cgi?id=163749
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:
+        * web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt:
+
</ins><span class="cx"> 2016-10-20  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make table.deleteRow(-1) a no-op when there are no rows
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbobjectstorerenameerrorsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -1,10 +1,8 @@
</span><span class="cx"> 
</span><del>-FAIL IndexedDB deleted object store rename throws assert_throws: function &quot;() =&gt; store.name = 'renamed_books'&quot; did not throw
-FAIL IndexedDB object store rename throws in a readonly transaction assert_throws: function &quot;() =&gt; store.name = 'renamed_books'&quot; did not throw
-FAIL IndexedDB object store rename throws in a readwrite transaction assert_throws: function &quot;() =&gt; store.name = 'renamed_books'&quot; did not throw
-FAIL IndexedDB object store rename throws in an inactive transaction assert_throws: function &quot;() =&gt; { bookStore.name = 'renamed_books'; }&quot; did not throw
-FAIL IndexedDB object store rename to the name of another store throws assert_throws: function &quot;() =&gt; store.name = 'not_books'&quot; did not throw
-FAIL IndexedDB object store rename handles exceptions when stringifying names assert_throws: IDBObjectStore rename should re-raise toString() exception function &quot;() =&gt; {
-              store.name = {
-                toSt...&quot; did not throw
</del><ins>+PASS IndexedDB deleted object store rename throws 
+PASS IndexedDB object store rename throws in a readonly transaction 
+PASS IndexedDB object store rename throws in a readwrite transaction 
+FAIL IndexedDB object store rename throws in an inactive transaction assert_throws: function &quot;() =&gt; { bookStore.name = 'renamed_books'; }&quot; threw object &quot;InvalidStateError (DOM Exception 11): Failed set property...&quot; that is not a DOMException TransactionInactiveError: property &quot;code&quot; is equal to 11, expected 0
+FAIL IndexedDB object store rename to the name of another store throws assert_throws: function &quot;() =&gt; store.name = 'not_books'&quot; threw object &quot;InvalidStateError (DOM Exception 11): Failed set property...&quot; that is not a DOMException ConstraintError: property &quot;code&quot; is equal to 11, expected 0
+PASS IndexedDB object store rename handles exceptions when stringifying names 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbobjectstorerenamestoreexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -1,13 +1,13 @@
</span><span class="cx"> 
</span><del>-FAIL IndexedDB object store rename in new transaction assert_equals: IDBObjectStore name should change immediately after a rename expected &quot;renamed_books&quot; but got &quot;books&quot;
-FAIL IndexedDB object store rename in the transaction where it is created assert_equals: IDBObjectStore name should change immediately after a rename expected &quot;renamed_books&quot; but got &quot;books&quot;
-FAIL IndexedDB object store rename covers index promise_test: Unhandled rejection with value: object &quot;NotFoundError (DOM IDBDatabase Exception 8): Failed to ex...&quot;
-FAIL IndexedDB object store rename covers key generator promise_test: Unhandled rejection with value: object &quot;NotFoundError (DOM IDBDatabase Exception 8): Failed to ex...&quot;
</del><ins>+FAIL IndexedDB object store rename in new transaction undefined is not an object (evaluating 'actual.length')
+FAIL IndexedDB object store rename in the transaction where it is created undefined is not an object (evaluating 'actual.length')
+PASS IndexedDB object store rename covers index 
+FAIL IndexedDB object store rename covers key generator assert_equals: Renaming an object store should not change the state of its key generator expected 345680 but got 345679
</ins><span class="cx"> PASS IndexedDB object store rename to the same name succeeds 
</span><del>-FAIL IndexedDB object store rename to the name of a deleted store succeeds assert_array_equals: IDBDatabase.objectStoreNames should immediately reflect the rename property 0, expected &quot;not_books&quot; but got &quot;books&quot;
-FAIL IndexedDB object store swapping via renames succeeds Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.
-FAIL IndexedDB object store rename stringifies non-string names assert_equals: IDBObjectStore name should change immediately after a rename to a number expected &quot;42&quot; but got &quot;books&quot;
-FAIL IndexedDB object store can be renamed to &quot;&quot; assert_equals: IDBObjectStore name should change immediately after the rename expected &quot;&quot; but got &quot;books&quot;
-FAIL IndexedDB object store can be renamed to &quot;\u0000&quot; assert_equals: IDBObjectStore name should change immediately after the rename expected &quot;\0&quot; but got &quot;books&quot;
-FAIL IndexedDB object store can be renamed to &quot;\uDC00\uD800&quot; assert_equals: IDBObjectStore name should change immediately after the rename expected &quot;í°€í €&quot; but got &quot;books&quot;
</del><ins>+PASS IndexedDB object store rename to the name of a deleted store succeeds 
+PASS IndexedDB object store swapping via renames succeeds 
+PASS IndexedDB object store rename stringifies non-string names 
+PASS IndexedDB object store can be renamed to &quot;&quot; 
+PASS IndexedDB object store can be renamed to &quot;\u0000&quot; 
+PASS IndexedDB object store can be renamed to &quot;\uDC00\uD800&quot; 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstorerename1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-expected.txt (0 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-expected.txt        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+This tests expectations with renaming existing object stores.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Initial upgrade needed: Old version - 0 New version - 1
+Initial objectStore name: TestObjectStore
+Caught exception renaming object store to the name of another existing object store: InvalidStateError (DOM Exception 11): Failed set property 'name' on 'IDBObjectStore': The database already has an object store named 'ExistingObjectStore'.
+Renamed objectStore name: RenamedObjectStore
+Current objectStore name in a new transaction: RenamedObjectStore
+Caught exception renaming object store outside of a version change transaction: InvalidStateError (DOM Exception 11): Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.
+Current objectStoreNames during second upgrade transaction includes 'ExistingObjectStore': true
+Current objectStoreNames during second upgrade transaction includes 'RenamedObjectStore': true
+Renamed objectstore again to: YetAnotherName
+Aborting version change transaction...
+Current objectStoreNames during final transaction includes 'ExistingObjectStore': true
+Current objectStoreNames during final transaction includes 'RenamedObjectStore': true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstorerename1privateexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private-expected.txt (0 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private-expected.txt        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+This tests expectations with renaming existing object stores.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Initial upgrade needed: Old version - 0 New version - 1
+Initial objectStore name: TestObjectStore
+Caught exception renaming object store to the name of another existing object store: InvalidStateError (DOM Exception 11): Failed set property 'name' on 'IDBObjectStore': The database already has an object store named 'ExistingObjectStore'.
+Renamed objectStore name: RenamedObjectStore
+Current objectStore name in a new transaction: RenamedObjectStore
+Caught exception renaming object store outside of a version change transaction: InvalidStateError (DOM Exception 11): Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.
+Current objectStoreNames during second upgrade transaction includes 'ExistingObjectStore': true
+Current objectStoreNames during second upgrade transaction includes 'RenamedObjectStore': true
+Renamed objectstore again to: YetAnotherName
+Aborting version change transaction...
+Current objectStoreNames during final transaction includes 'ExistingObjectStore': true
+Current objectStoreNames during final transaction includes 'RenamedObjectStore': true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstorerename1privatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private.html (0 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private.html        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+enablePrivateBrowsing = true;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/objectstore-rename-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstorerename1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1.html (0 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1.html        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/objectstore-rename-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesobjectstorerename1js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-rename-1.js (0 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-rename-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-rename-1.js        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+description(&quot;This tests expectations with renaming existing object stores.&quot;);
+
+indexedDBTest(prepareDatabase);
+
+function log(message)
+{
+    debug(message);
+}
+
+var testGenerator;
+function next()
+{
+    testGenerator.next();
+}
+
+function asyncNext()
+{
+    setTimeout(&quot;testGenerator.next();&quot;, 0);
+}
+
+var db;
+var dbName;
+var dbVersion;
+
+function prepareDatabase(event)
+{
+    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    db = event.target.result;
+        dbName = db.name;
+        dbVersion = db.version;
+
+        objectStore = db.createObjectStore(&quot;ExistingObjectStore&quot;);
+
+        objectStore = db.createObjectStore(&quot;TestObjectStore&quot;);
+        log(&quot;Initial objectStore name: &quot; + objectStore.name);
+        
+        try {
+                objectStore.name = &quot;ExistingObjectStore&quot;;
+                log(&quot;Was incorrectly able to rename this object store to the name of another existing object store&quot;);
+        } catch(e) {
+                log(&quot;Caught exception renaming object store to the name of another existing object store: &quot; + e);
+        }
+
+        objectStore.name = &quot;RenamedObjectStore&quot;;
+        log(&quot;Renamed objectStore name: &quot; + objectStore.name);
+
+    event.target.onsuccess = function() {
+        testGenerator = testSteps();
+        testGenerator.next();
+    };
+}
+
+function* testSteps()
+{    
+    tx = db.transaction(&quot;RenamedObjectStore&quot;, &quot;readwrite&quot;);
+    tx.oncomplete = next;
+    objectStore = tx.objectStore(&quot;RenamedObjectStore&quot;);
+    log(&quot;Current objectStore name in a new transaction: &quot; + objectStore.name);
+
+        try {
+                objectStore.name = &quot;newName&quot;;
+                log(&quot;Renaming object store succeeded, but it shouldn't have&quot;);
+        } catch(e) {
+                log(&quot;Caught exception renaming object store outside of a version change transaction: &quot; + e);
+        }
+    
+    yield; // For the transaction's completion.
+
+        db.close();
+    
+        upgradeOpenRequest = indexedDB.open(dbName, dbVersion + 1);
+        upgradeOpenRequest.onerror = next;
+        upgradeOpenRequest.onupgradeneeded = function() {
+                db = upgradeOpenRequest.result;
+                
+                log(&quot;Current objectStoreNames during second upgrade transaction includes 'ExistingObjectStore': &quot; + db.objectStoreNames.contains(&quot;ExistingObjectStore&quot;));
+                log(&quot;Current objectStoreNames during second upgrade transaction includes 'RenamedObjectStore': &quot; + db.objectStoreNames.contains(&quot;RenamedObjectStore&quot;));
+
+                objectStore = event.target.transaction.objectStore(&quot;RenamedObjectStore&quot;);
+                objectStore.name = &quot;YetAnotherName&quot;;
+                
+                log(&quot;Renamed objectstore again to: &quot; + objectStore.name);
+                log(&quot;Aborting version change transaction...&quot;);
+                event.target.transaction.abort();
+        }
+
+        yield; // For the open request's failure (due to aborting the version change transaction)
+
+        upgradeOpenRequest = indexedDB.open(dbName);
+        upgradeOpenRequest.onsuccess = function(event) {
+                log(&quot;Current objectStoreNames during final transaction includes 'ExistingObjectStore': &quot; + db.objectStoreNames.contains(&quot;ExistingObjectStore&quot;));
+                log(&quot;Current objectStoreNames during final transaction includes 'RenamedObjectStore': &quot; + db.objectStoreNames.contains(&quot;RenamedObjectStore&quot;));
+
+                next();
+        }
+        
+        yield; // To balance the next() above.
+        
+    finishJSTest();
+ }

</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbreadonlyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/readonly-expected.txt (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/readonly-expected.txt        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/LayoutTests/storage/indexeddb/readonly-expected.txt        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -16,9 +16,6 @@
</span><span class="cx"> PASS transaction.db is still [object IDBDatabase]
</span><span class="cx"> Deleted all object stores.
</span><span class="cx"> objectStore = db.createObjectStore('foo');
</span><del>-trying to set readonly property objectStore.name
-objectStore.name = 'bar'
-PASS objectStore.name is still foo
</del><span class="cx"> trying to set readonly property objectStore.keyPath
</span><span class="cx"> objectStore.keyPath = 'bar'
</span><span class="cx"> PASS objectStore.keyPath is still null
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbreadonlyprivateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/readonly-private-expected.txt (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/readonly-private-expected.txt        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/LayoutTests/storage/indexeddb/readonly-private-expected.txt        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -16,9 +16,6 @@
</span><span class="cx"> PASS transaction.db is still [object IDBDatabase]
</span><span class="cx"> Deleted all object stores.
</span><span class="cx"> objectStore = db.createObjectStore('foo');
</span><del>-trying to set readonly property objectStore.name
-objectStore.name = 'bar'
-PASS objectStore.name is still foo
</del><span class="cx"> trying to set readonly property objectStore.keyPath
</span><span class="cx"> objectStore.keyPath = 'bar'
</span><span class="cx"> PASS objectStore.keyPath is still null
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbresourcesreadonlyjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/resources/readonly.js (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/resources/readonly.js        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/LayoutTests/storage/indexeddb/resources/readonly.js        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> 
</span><span class="cx">     objectStore = evalAndLog(&quot;objectStore = db.createObjectStore('foo');&quot;);
</span><span class="cx"> 
</span><del>-    setReadonlyProperty(&quot;objectStore.name&quot;, &quot;'bar'&quot;);
</del><span class="cx">     setReadonlyProperty(&quot;objectStore.keyPath&quot;, &quot;'bar'&quot;);
</span><span class="cx"> /* fails, split into separate test
</span><span class="cx">     setReadonlyProperty(&quot;objectStore.indexNames&quot;, &quot;['bar']&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/ChangeLog        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -1,3 +1,99 @@
</span><ins>+2016-10-20  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Support IDBObjectStore name assignment.
+        &lt;rdar://problem/28806931&gt; and https://bugs.webkit.org/show_bug.cgi?id=163749
+
+        Reviewed by Alex Christensen.
+
+        Tests: storage/indexeddb/modern/objectstore-rename-1-private.html
+               storage/indexeddb/modern/objectstore-rename-1.html
+
+        Touches a *lot* of code sites, but none of them are particularly interesting.
+        They are all just getting the new name spread out to all of the various objects that need it.
+
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::renameObjectStore):
+        * Modules/indexeddb/IDBDatabase.h:
+
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::setName):
+        * Modules/indexeddb/IDBObjectStore.h:
+        * Modules/indexeddb/IDBObjectStore.idl:
+
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::renameObjectStore):
+        (WebCore::IDBTransaction::renameObjectStoreOnServer):
+        (WebCore::IDBTransaction::didRenameObjectStoreOnServer):
+        * Modules/indexeddb/IDBTransaction.h:
+
+        * Modules/indexeddb/client/IDBConnectionProxy.cpp:
+        (WebCore::IDBClient::IDBConnectionProxy::renameObjectStore):
+        * Modules/indexeddb/client/IDBConnectionProxy.h:
+
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        (WebCore::IDBClient::IDBConnectionToServer::renameObjectStore):
+        (WebCore::IDBClient::IDBConnectionToServer::didRenameObjectStore):
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
+
+        * Modules/indexeddb/server/IDBBackingStore.h:
+
+        * Modules/indexeddb/server/IDBConnectionToClient.cpp:
+        (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
+        (WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore):
+        * Modules/indexeddb/server/IDBConnectionToClient.h:
+        * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
+
+        * Modules/indexeddb/server/IDBServer.cpp:
+        (WebCore::IDBServer::IDBServer::renameObjectStore):
+        * Modules/indexeddb/server/IDBServer.h:
+
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed):
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
+
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+
+        * Modules/indexeddb/server/MemoryObjectStore.h:
+        (WebCore::IDBServer::MemoryObjectStore::rename):
+
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
+
+        * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
+        (WebCore::IDBDatabaseInfo::renameObjectStore):
+        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
+
+        * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
+        (WebCore::IDBObjectStoreInfo::rename):
+
+        * Modules/indexeddb/shared/IDBResultData.cpp:
+        (WebCore::IDBResultData::renameObjectStoreSuccess):
+        * Modules/indexeddb/shared/IDBResultData.h:
+
+        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+        (WebCore::InProcessIDBServer::didRenameObjectStore):
+        (WebCore::InProcessIDBServer::renameObjectStore):
+        * Modules/indexeddb/shared/InProcessIDBServer.h:
+
</ins><span class="cx"> 2016-10-20  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make table.deleteRow(-1) a no-op when there are no rows
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -106,6 +106,17 @@
</span><span class="cx">     return objectStoreNames;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBDatabase::renameObjectStore(IDBObjectStore&amp; objectStore, const String&amp; newName)
+{
+    ASSERT(currentThread() == originThreadID());
+    ASSERT(m_versionChangeTransaction);
+    ASSERT(m_info.hasObjectStore(objectStore.info().name()));
+
+    m_info.renameObjectStore(objectStore.info().identifier(), newName);
+
+    m_versionChangeTransaction-&gt;renameObjectStore(objectStore, newName);
+}
+
</ins><span class="cx"> ExceptionOr&lt;Ref&lt;IDBObjectStore&gt;&gt; IDBDatabase::createObjectStore(const String&amp;, const Dictionary&amp;)
</span><span class="cx"> {
</span><span class="cx">     ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -62,6 +62,8 @@
</span><span class="cx">     ExceptionOr&lt;void&gt; deleteObjectStore(const String&amp; name);
</span><span class="cx">     void close();
</span><span class="cx"> 
</span><ins>+    void renameObjectStore(IDBObjectStore&amp;, const String&amp; newName);
+
</ins><span class="cx">     // EventTarget
</span><span class="cx">     EventTargetInterface eventTargetInterface() const final { return IDBDatabaseEventTargetInterfaceType; }
</span><span class="cx">     ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -95,6 +95,31 @@
</span><span class="cx">     return m_info.name();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ExceptionOr&lt;void&gt; IDBObjectStore::setName(const String&amp; name)
+{
+    ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
+
+    if (m_deleted)
+        return Exception { INVALID_STATE_ERR, ASCIILiteral(&quot;Failed set property 'name' on 'IDBObjectStore': The object store has been deleted.&quot;) };
+
+    if (!m_transaction-&gt;isVersionChange())
+        return Exception { INVALID_STATE_ERR, ASCIILiteral(&quot;Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.&quot;) };
+
+    if (!m_transaction-&gt;isActive())
+        return Exception { INVALID_STATE_ERR, ASCIILiteral(&quot;Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not active.&quot;) };
+
+    if (m_info.name() == name)
+        return { };
+
+    if (m_transaction-&gt;database().info().hasObjectStore(name))
+        return Exception { INVALID_STATE_ERR, makeString(&quot;Failed set property 'name' on 'IDBObjectStore': The database already has an object store named '&quot;, name, &quot;'.&quot;) };
+
+    m_transaction-&gt;database().renameObjectStore(*this, name);
+    m_info.rename(name);
+
+    return { };
+}
+
</ins><span class="cx"> const IDBKeyPath&amp; IDBObjectStore::keyPath() const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx">     ~IDBObjectStore();
</span><span class="cx"> 
</span><span class="cx">     const String&amp; name() const;
</span><ins>+    ExceptionOr&lt;void&gt; setName(const String&amp;);
</ins><span class="cx">     const IDBKeyPath&amp; keyPath() const;
</span><span class="cx">     RefPtr&lt;DOMStringList&gt; indexNames() const;
</span><span class="cx">     IDBTransaction&amp; transaction();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">     JSCustomMarkFunction,
</span><span class="cx">     SkipVTableValidation,
</span><span class="cx"> ] interface IDBObjectStore {
</span><del>-    readonly attribute DOMString? name;
</del><ins>+    [SetterMayThrowException] attribute DOMString name;
</ins><span class="cx">     [ImplementationReturnType=IDBKeyPath] readonly attribute any keyPath;
</span><span class="cx">     readonly attribute DOMStringList indexNames;
</span><span class="cx">     readonly attribute IDBTransaction transaction;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -601,6 +601,40 @@
</span><span class="cx">     ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::CreateObjectStoreSuccess || resultData.type() == IDBResultType::Error);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBTransaction::renameObjectStore(IDBObjectStore&amp; objectStore, const String&amp; newName)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::renameObjectStore&quot;);
+    ASSERT(isVersionChange());
+    ASSERT(scriptExecutionContext());
+    ASSERT(currentThread() == m_database-&gt;originThreadID());
+
+    ASSERT(m_referencedObjectStores.contains(objectStore.info().name()));
+    ASSERT(!m_referencedObjectStores.contains(newName));
+    ASSERT(m_referencedObjectStores.get(objectStore.info().name()) == &amp;objectStore);
+
+    uint64_t objectStoreIdentifier = objectStore.info().identifier();
+    auto operation = IDBClient::createTransactionOperation(*this, &amp;IDBTransaction::didRenameObjectStoreOnServer, &amp;IDBTransaction::renameObjectStoreOnServer, objectStoreIdentifier, newName);
+    scheduleOperation(WTFMove(operation));
+
+    m_referencedObjectStores.set(newName, m_referencedObjectStores.take(objectStore.info().name()));
+}
+
+void IDBTransaction::renameObjectStoreOnServer(IDBClient::TransactionOperation&amp; operation, const uint64_t&amp; objectStoreIdentifier, const String&amp; newName)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::renameObjectStoreOnServer&quot;);
+    ASSERT(currentThread() == m_database-&gt;originThreadID());
+    ASSERT(isVersionChange());
+
+    m_database-&gt;connectionProxy().renameObjectStore(operation, objectStoreIdentifier, newName);
+}
+
+void IDBTransaction::didRenameObjectStoreOnServer(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didRenameObjectStoreOnServer&quot;);
+    ASSERT(currentThread() == m_database-&gt;originThreadID());
+    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::RenameObjectStoreSuccess || resultData.type() == IDBResultType::Error);
+}
+
</ins><span class="cx"> std::unique_ptr&lt;IDBIndex&gt; IDBTransaction::createIndex(IDBObjectStore&amp; objectStore, const IDBIndexInfo&amp; info)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::createIndex&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -113,6 +113,7 @@
</span><span class="cx">     bool isActive() const;
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;IDBObjectStore&gt; createObjectStore(const IDBObjectStoreInfo&amp;);
</span><ins>+    void renameObjectStore(IDBObjectStore&amp;, const String&amp; newName);
</ins><span class="cx">     std::unique_ptr&lt;IDBIndex&gt; createIndex(IDBObjectStore&amp;, const IDBIndexInfo&amp;);
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;IDBRequest&gt; requestPutOrAdd(JSC::ExecState&amp;, IDBObjectStore&amp;, IDBKey*, SerializedScriptValue&amp;, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="lines">@@ -171,6 +172,9 @@
</span><span class="cx">     void createObjectStoreOnServer(IDBClient::TransactionOperation&amp;, const IDBObjectStoreInfo&amp;);
</span><span class="cx">     void didCreateObjectStoreOnServer(const IDBResultData&amp;);
</span><span class="cx"> 
</span><ins>+    void renameObjectStoreOnServer(IDBClient::TransactionOperation&amp;, const uint64_t&amp; objectStoreIdentifier, const String&amp; newName);
+    void didRenameObjectStoreOnServer(const IDBResultData&amp;);
+
</ins><span class="cx">     void createIndexOnServer(IDBClient::TransactionOperation&amp;, const IDBIndexInfo&amp;);
</span><span class="cx">     void didCreateIndexOnServer(const IDBResultData&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -125,6 +125,14 @@
</span><span class="cx">     callConnectionOnMainThread(&amp;IDBConnectionToServer::createObjectStore, requestData, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBConnectionProxy::renameObjectStore(TransactionOperation&amp; operation, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    const IDBRequestData requestData(operation);
+    saveOperation(operation);
+
+    callConnectionOnMainThread(&amp;IDBConnectionToServer::renameObjectStore, requestData, objectStoreIdentifier, newName);
+}
+
</ins><span class="cx"> void IDBConnectionProxy::deleteObjectStore(TransactionOperation&amp; operation, const String&amp; objectStoreName)
</span><span class="cx"> {
</span><span class="cx">     const IDBRequestData requestData(operation);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -77,7 +77,8 @@
</span><span class="cx">     void deleteRecord(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
</span><span class="cx">     void openCursor(TransactionOperation&amp;, const IDBCursorInfo&amp;);
</span><span class="cx">     void iterateCursor(TransactionOperation&amp;, const IDBKeyData&amp;, unsigned long count);
</span><del>-    
</del><ins>+    void renameObjectStore(TransactionOperation&amp;, uint64_t objectStoreIdentifier, const String&amp; newName);
+
</ins><span class="cx">     void fireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp; requestIdentifier, uint64_t requestedVersion);
</span><span class="cx">     void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp; requestIdentifier);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -116,6 +116,20 @@
</span><span class="cx">     m_proxy-&gt;completeOperation(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBConnectionToServer::renameObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    LOG(IndexedDB, &quot;IDBConnectionToServer::renameObjectStore&quot;);
+    ASSERT(isMainThread());
+
+    m_delegate-&gt;renameObjectStore(requestData, objectStoreIdentifier, newName);
+}
+
+void IDBConnectionToServer::didRenameObjectStore(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBConnectionToServer::didRenameObjectStore&quot;);
+    m_proxy-&gt;completeOperation(resultData);
+}
+
</ins><span class="cx"> void IDBConnectionToServer::clearObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBConnectionToServer::clearObjectStore&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -68,6 +68,9 @@
</span><span class="cx">     void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName);
</span><span class="cx">     WEBCORE_EXPORT void didDeleteObjectStore(const IDBResultData&amp;);
</span><span class="cx"> 
</span><ins>+    void renameObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; newName);
+    WEBCORE_EXPORT void didRenameObjectStore(const IDBResultData&amp;);
+
</ins><span class="cx">     void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier);
</span><span class="cx">     WEBCORE_EXPORT void didClearObjectStore(const IDBResultData&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -63,6 +63,7 @@
</span><span class="cx">     virtual void didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp;) = 0;
</span><span class="cx">     virtual void createObjectStore(const IDBRequestData&amp;, const IDBObjectStoreInfo&amp;) = 0;
</span><span class="cx">     virtual void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName) = 0;
</span><ins>+    virtual void renameObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; newName) = 0;
</ins><span class="cx">     virtual void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx">     virtual void createIndex(const IDBRequestData&amp;, const IDBIndexInfo&amp;) = 0;
</span><span class="cx">     virtual void deleteIndex(const IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual IDBError createObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;) = 0;
</span><span class="cx">     virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</span><ins>+    virtual IDBError renameObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; newName) = 0;
</ins><span class="cx">     virtual IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx">     virtual IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) = 0;
</span><span class="cx">     virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -73,6 +73,11 @@
</span><span class="cx">     m_delegate-&gt;didDeleteObjectStore(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBConnectionToClient::didRenameObjectStore(const IDBResultData&amp; result)
+{
+    m_delegate-&gt;didRenameObjectStore(result);
+}
+
</ins><span class="cx"> void IDBConnectionToClient::didClearObjectStore(const IDBResultData&amp; result)
</span><span class="cx"> {
</span><span class="cx">     m_delegate-&gt;didClearObjectStore(result);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx">     void didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
</span><span class="cx">     void didCreateObjectStore(const IDBResultData&amp;);
</span><span class="cx">     void didDeleteObjectStore(const IDBResultData&amp;);
</span><ins>+    void didRenameObjectStore(const IDBResultData&amp;);
</ins><span class="cx">     void didClearObjectStore(const IDBResultData&amp;);
</span><span class="cx">     void didCreateIndex(const IDBResultData&amp;);
</span><span class="cx">     void didDeleteIndex(const IDBResultData&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">     virtual void didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;) = 0;
</span><span class="cx">     virtual void didCreateObjectStore(const IDBResultData&amp;) = 0;
</span><span class="cx">     virtual void didDeleteObjectStore(const IDBResultData&amp;) = 0;
</span><ins>+    virtual void didRenameObjectStore(const IDBResultData&amp;) = 0;
</ins><span class="cx">     virtual void didClearObjectStore(const IDBResultData&amp;) = 0;
</span><span class="cx">     virtual void didCreateIndex(const IDBResultData&amp;) = 0;
</span><span class="cx">     virtual void didDeleteIndex(const IDBResultData&amp;) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -213,6 +213,18 @@
</span><span class="cx">     transaction-&gt;deleteObjectStore(requestData, objectStoreName);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBServer::renameObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    LOG(IndexedDB, &quot;IDBServer::renameObjectStore&quot;);
+
+    auto transaction = m_transactions.get(requestData.transactionIdentifier());
+    if (!transaction)
+        return;
+
+    ASSERT(transaction-&gt;isVersionChange());
+    transaction-&gt;renameObjectStore(requestData, objectStoreIdentifier, newName);
+}
+
</ins><span class="cx"> void IDBServer::clearObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBServer::clearObjectStore&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx">     WEBCORE_EXPORT void commitTransaction(const IDBResourceIdentifier&amp;);
</span><span class="cx">     WEBCORE_EXPORT void didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp;);
</span><span class="cx">     WEBCORE_EXPORT void createObjectStore(const IDBRequestData&amp;, const IDBObjectStoreInfo&amp;);
</span><ins>+    WEBCORE_EXPORT void renameObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; newName);
</ins><span class="cx">     WEBCORE_EXPORT void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName);
</span><span class="cx">     WEBCORE_EXPORT void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier);
</span><span class="cx">     WEBCORE_EXPORT void createIndex(const IDBRequestData&amp;, const IDBIndexInfo&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -150,6 +150,16 @@
</span><span class="cx">     m_clearedOrderedKeys.add(&amp;objectStore, WTFMove(orderedKeys));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void MemoryBackingStoreTransaction::objectStoreRenamed(MemoryObjectStore&amp; objectStore, const String&amp; oldName)
+{
+    ASSERT(m_objectStores.contains(&amp;objectStore));
+    ASSERT(m_info.mode() == IndexedDB::TransactionMode::VersionChange);
+
+    // We only care about the first rename in a given transaction, because if the transaction is aborted we want
+    // to go back to the first 'oldName'
+    m_originalObjectStoreNames.add(&amp;objectStore, oldName);
+}
+
</ins><span class="cx"> void MemoryBackingStoreTransaction::indexCleared(MemoryIndex&amp; index, std::unique_ptr&lt;IndexValueStore&gt;&amp;&amp; valueStore)
</span><span class="cx"> {
</span><span class="cx">     auto addResult = m_clearedIndexValueStores.add(&amp;index, nullptr);
</span><span class="lines">@@ -193,6 +203,10 @@
</span><span class="cx"> 
</span><span class="cx">     TemporaryChange&lt;bool&gt; change(m_isAborting, true);
</span><span class="cx"> 
</span><ins>+    for (auto iterator : m_originalObjectStoreNames)
+        iterator.key-&gt;rename(iterator.value);
+    m_originalObjectStoreNames.clear();
+
</ins><span class="cx">     for (auto objectStore : m_versionChangeAddedObjectStores)
</span><span class="cx">         m_backingStore.removeObjectStoreForVersionChangeAbort(*objectStore);
</span><span class="cx">     m_versionChangeAddedObjectStores.clear();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -64,6 +64,7 @@
</span><span class="cx">     void recordValueChanged(MemoryObjectStore&amp;, const IDBKeyData&amp;, ThreadSafeDataBuffer*);
</span><span class="cx">     void objectStoreDeleted(Ref&lt;MemoryObjectStore&gt;&amp;&amp;);
</span><span class="cx">     void objectStoreCleared(MemoryObjectStore&amp;, std::unique_ptr&lt;KeyValueMap&gt;&amp;&amp;, std::unique_ptr&lt;std::set&lt;IDBKeyData&gt;&gt;&amp;&amp;);
</span><ins>+    void objectStoreRenamed(MemoryObjectStore&amp;, const String&amp; oldName);
</ins><span class="cx">     void indexCleared(MemoryIndex&amp;, std::unique_ptr&lt;IndexValueStore&gt;&amp;&amp;);
</span><span class="cx"> 
</span><span class="cx">     void addNewIndex(MemoryIndex&amp;);
</span><span class="lines">@@ -95,6 +96,7 @@
</span><span class="cx">     HashMap&lt;MemoryObjectStore*, std::unique_ptr&lt;KeyValueMap&gt;&gt; m_originalValues;
</span><span class="cx">     HashMap&lt;MemoryObjectStore*, std::unique_ptr&lt;KeyValueMap&gt;&gt; m_clearedKeyValueMaps;
</span><span class="cx">     HashMap&lt;MemoryObjectStore*, std::unique_ptr&lt;std::set&lt;IDBKeyData&gt;&gt;&gt; m_clearedOrderedKeys;
</span><ins>+    HashMap&lt;MemoryObjectStore*, String&gt; m_originalObjectStoreNames;
</ins><span class="cx">     HashMap&lt;MemoryIndex*, std::unique_ptr&lt;IndexValueStore&gt;&gt; m_clearedIndexValueStores;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -171,6 +171,32 @@
</span><span class="cx">     return IDBError();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBError MemoryIDBBackingStore::renameObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    LOG(IndexedDB, &quot;MemoryIDBBackingStore::renameObjectStore&quot;);
+
+    ASSERT(m_databaseInfo);
+    if (!m_databaseInfo-&gt;infoForExistingObjectStore(objectStoreIdentifier))
+        return IDBError(IDBDatabaseException::ConstraintError);
+
+    auto transaction = m_transactions.get(transactionIdentifier);
+    ASSERT(transaction);
+    ASSERT(transaction-&gt;isVersionChange());
+
+    auto objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
+    ASSERT(objectStore);
+    if (!objectStore)
+        return IDBError(IDBDatabaseException::ConstraintError);
+
+    String oldName = objectStore-&gt;info().name();
+    objectStore-&gt;rename(newName);
+    transaction-&gt;objectStoreRenamed(*objectStore, oldName);
+
+    m_databaseInfo-&gt;renameObjectStore(objectStoreIdentifier, newName);
+
+    return IDBError();
+}
+
</ins><span class="cx"> IDBError MemoryIDBBackingStore::clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::clearObjectStore&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx">     IDBError commitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier) final;
</span><span class="cx">     IDBError createObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;) final;
</span><span class="cx">     IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) final;
</span><ins>+    IDBError renameObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; newName) final;
</ins><span class="cx">     IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) final;
</span><span class="cx">     IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) final;
</span><span class="cx">     IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -97,6 +97,8 @@
</span><span class="cx"> 
</span><span class="cx">     void maybeRestoreDeletedIndex(Ref&lt;MemoryIndex&gt;&amp;&amp;);
</span><span class="cx"> 
</span><ins>+    void rename(const String&amp; newName) { m_info.rename(newName); }
+
</ins><span class="cx"> private:
</span><span class="cx">     MemoryObjectStore(const IDBObjectStoreInfo&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -978,6 +978,39 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBError SQLiteIDBBackingStore::renameObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    LOG(IndexedDB, &quot;SQLiteIDBBackingStore::renameObjectStore - object store %&quot; PRIu64, objectStoreIdentifier);
+
+    ASSERT(m_sqliteDB);
+    ASSERT(m_sqliteDB-&gt;isOpen());
+
+    auto* transaction = m_transactions.get(transactionIdentifier);
+    if (!transaction || !transaction-&gt;inProgress()) {
+        LOG_ERROR(&quot;Attempt to rename an object store without an in-progress transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to rename an object store without an in-progress transaction&quot;) };
+    }
+    if (transaction-&gt;mode() != IndexedDB::TransactionMode::VersionChange) {
+        LOG_ERROR(&quot;Attempt to rename an object store in a non-version-change transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to rename an object store in a non-version-change transaction&quot;) };
+    }
+
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;UPDATE ObjectStoreInfo SET name = ? WHERE id = ?;&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindText(1, newName) != SQLITE_OK
+            || sql.bindInt64(2, objectStoreIdentifier) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not update name for object store id %&quot; PRIi64 &quot; in ObjectStoreInfo table (%i) - %s&quot;, objectStoreIdentifier, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not rename object store&quot;) };
+        }
+    }
+
+    m_databaseInfo-&gt;renameObjectStore(objectStoreIdentifier, newName);
+
+    return { };
+}
+
</ins><span class="cx"> IDBError SQLiteIDBBackingStore::clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreID)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::clearObjectStore - object store %&quot; PRIu64, objectStoreID);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx">     IDBError commitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier) final;
</span><span class="cx">     IDBError createObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;) final;
</span><span class="cx">     IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) final;
</span><ins>+    IDBError renameObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; newName) final;
</ins><span class="cx">     IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) final;
</span><span class="cx">     IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) final;
</span><span class="cx">     IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -660,6 +660,47 @@
</span><span class="cx">     performErrorCallback(callbackIdentifier, error);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UniqueIDBDatabase::renameObjectStore(UniqueIDBDatabaseTransaction&amp; transaction, uint64_t objectStoreIdentifier, const String&amp; newName, ErrorCallback callback)
+{
+    ASSERT(isMainThread());
+    LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::renameObjectStore&quot;);
+
+    uint64_t callbackID = storeCallbackOrFireError(callback);
+    if (!callbackID)
+        return;
+
+    auto* info = m_databaseInfo-&gt;infoForExistingObjectStore(objectStoreIdentifier);
+    if (!info) {
+        performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to rename non-existant object store&quot;) });
+        return;
+    }
+
+    postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performRenameObjectStore, callbackID, transaction.info().identifier(), objectStoreIdentifier, newName));
+}
+
+void UniqueIDBDatabase::performRenameObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    ASSERT(!isMainThread());
+    LOG(IndexedDB, &quot;(db) UniqueIDBDatabase::performRenameObjectStore&quot;);
+
+    ASSERT(m_backingStore);
+    m_backingStore-&gt;renameObjectStore(transactionIdentifier, objectStoreIdentifier, newName);
+
+    IDBError error;
+    postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformRenameObjectStore, callbackIdentifier, error, objectStoreIdentifier, newName));
+}
+
+void UniqueIDBDatabase::didPerformRenameObjectStore(uint64_t callbackIdentifier, const IDBError&amp; error, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    ASSERT(isMainThread());
+    LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::didPerformRenameObjectStore&quot;);
+
+    if (error.isNull())
+        m_databaseInfo-&gt;renameObjectStore(objectStoreIdentifier, newName);
+
+    performErrorCallback(callbackIdentifier, error);
+}
+
</ins><span class="cx"> void UniqueIDBDatabase::clearObjectStore(UniqueIDBDatabaseTransaction&amp; transaction, uint64_t objectStoreIdentifier, ErrorCallback callback)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx"> 
</span><span class="cx">     void createObjectStore(UniqueIDBDatabaseTransaction&amp;, const IDBObjectStoreInfo&amp;, ErrorCallback);
</span><span class="cx">     void deleteObjectStore(UniqueIDBDatabaseTransaction&amp;, const String&amp; objectStoreName, ErrorCallback);
</span><ins>+    void renameObjectStore(UniqueIDBDatabaseTransaction&amp;, uint64_t objectStoreIdentifier, const String&amp; newName, ErrorCallback);
</ins><span class="cx">     void clearObjectStore(UniqueIDBDatabaseTransaction&amp;, uint64_t objectStoreIdentifier, ErrorCallback);
</span><span class="cx">     void createIndex(UniqueIDBDatabaseTransaction&amp;, const IDBIndexInfo&amp;, ErrorCallback);
</span><span class="cx">     void deleteIndex(UniqueIDBDatabaseTransaction&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName, ErrorCallback);
</span><span class="lines">@@ -144,6 +145,7 @@
</span><span class="cx">     void beginTransactionInBackingStore(const IDBTransactionInfo&amp;);
</span><span class="cx">     void performCreateObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;);
</span><span class="cx">     void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier);
</span><ins>+    void performRenameObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; newName);
</ins><span class="cx">     void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier);
</span><span class="cx">     void performCreateIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;);
</span><span class="cx">     void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier);
</span><span class="lines">@@ -162,6 +164,7 @@
</span><span class="cx">     void didOpenBackingStore(const IDBDatabaseInfo&amp;, const IDBError&amp;);
</span><span class="cx">     void didPerformCreateObjectStore(uint64_t callbackIdentifier, const IDBError&amp;, const IDBObjectStoreInfo&amp;);
</span><span class="cx">     void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t objectStoreIdentifier);
</span><ins>+    void didPerformRenameObjectStore(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t objectStoreIdentifier, const String&amp; newName);
</ins><span class="cx">     void didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError&amp;);
</span><span class="cx">     void didPerformCreateIndex(uint64_t callbackIdentifier, const IDBError&amp;, const IDBIndexInfo&amp;);
</span><span class="cx">     void didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t objectStoreIdentifier, uint64_t indexIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -184,6 +184,13 @@
</span><span class="cx">     m_connectionToClient.didDeleteObjectStore(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UniqueIDBDatabaseConnection::didRenameObjectStore(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;UniqueIDBDatabaseConnection::didRenameObjectStore&quot;);
+
+    m_connectionToClient.didRenameObjectStore(resultData);
+}
+
</ins><span class="cx"> void UniqueIDBDatabaseConnection::didClearObjectStore(const IDBResultData&amp; resultData)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;UniqueIDBDatabaseConnection::didClearObjectStore&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx">     void didCommitTransaction(UniqueIDBDatabaseTransaction&amp;, const IDBError&amp;);
</span><span class="cx">     void didCreateObjectStore(const IDBResultData&amp;);
</span><span class="cx">     void didDeleteObjectStore(const IDBResultData&amp;);
</span><ins>+    void didRenameObjectStore(const IDBResultData&amp;);
</ins><span class="cx">     void didClearObjectStore(const IDBResultData&amp;);
</span><span class="cx">     void didCreateIndex(const IDBResultData&amp;);
</span><span class="cx">     void didDeleteIndex(const IDBResultData&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -137,6 +137,23 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UniqueIDBDatabaseTransaction::renameObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::renameObjectStore&quot;);
+
+    ASSERT(isVersionChange());
+    ASSERT(m_transactionInfo.identifier() == requestData.transactionIdentifier());
+
+    RefPtr&lt;UniqueIDBDatabaseTransaction&gt; protectedThis(this);
+    m_databaseConnection-&gt;database().renameObjectStore(*this, objectStoreIdentifier, newName, [this, protectedThis, requestData](const IDBError&amp; error) {
+        LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::renameObjectStore (callback)&quot;);
+        if (error.isNull())
+            m_databaseConnection-&gt;didRenameObjectStore(IDBResultData::renameObjectStoreSuccess(requestData.requestIdentifier()));
+        else
+            m_databaseConnection-&gt;didRenameObjectStore(IDBResultData::error(requestData.requestIdentifier(), error));
+    });
+}
+
</ins><span class="cx"> void UniqueIDBDatabaseTransaction::clearObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::clearObjectStore&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> 
</span><span class="cx">     void createObjectStore(const IDBRequestData&amp;, const IDBObjectStoreInfo&amp;);
</span><span class="cx">     void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName);
</span><ins>+    void renameObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; newName);
</ins><span class="cx">     void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier);
</span><span class="cx">     void createIndex(const IDBRequestData&amp;, const IDBIndexInfo&amp;);
</span><span class="cx">     void deleteIndex(const IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -122,6 +122,15 @@
</span><span class="cx">     return getInfoForExistingObjectStore(name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBDatabaseInfo::renameObjectStore(uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    auto* info = infoForExistingObjectStore(objectStoreIdentifier);
+    if (!info)
+        return;
+
+    info-&gt;rename(newName);
+}
+
</ins><span class="cx"> Vector&lt;String&gt; IDBDatabaseInfo::objectStoreNames() const
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;String&gt; names;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -57,6 +57,8 @@
</span><span class="cx">     const IDBObjectStoreInfo* infoForExistingObjectStore(uint64_t objectStoreIdentifier) const;
</span><span class="cx">     const IDBObjectStoreInfo* infoForExistingObjectStore(const String&amp; objectStoreName) const;
</span><span class="cx"> 
</span><ins>+    void renameObjectStore(uint64_t objectStoreIdentifier, const String&amp; newName);
+
</ins><span class="cx">     Vector&lt;String&gt; objectStoreNames() const;
</span><span class="cx"> 
</span><span class="cx">     void deleteObjectStore(const String&amp; objectStoreName);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -48,6 +48,8 @@
</span><span class="cx">     bool autoIncrement() const { return m_autoIncrement; }
</span><span class="cx">     uint64_t maxIndexID() const { return m_maxIndexID; }
</span><span class="cx"> 
</span><ins>+    void rename(const String&amp; newName) { m_name = newName; }
+
</ins><span class="cx">     IDBObjectStoreInfo isolatedCopy() const;
</span><span class="cx"> 
</span><span class="cx">     IDBIndexInfo createNewIndex(const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResultDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -139,6 +139,11 @@
</span><span class="cx">     return { IDBResultType::DeleteObjectStoreSuccess, requestIdentifier };
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBResultData IDBResultData::renameObjectStoreSuccess(const IDBResourceIdentifier&amp; requestIdentifier)
+{
+    return { IDBResultType::RenameObjectStoreSuccess, requestIdentifier };
+}
+
</ins><span class="cx"> IDBResultData IDBResultData::clearObjectStoreSuccess(const IDBResourceIdentifier&amp; requestIdentifier)
</span><span class="cx"> {
</span><span class="cx">     return { IDBResultType::ClearObjectStoreSuccess, requestIdentifier };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResultDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx">     DeleteIndexSuccess,
</span><span class="cx">     OpenCursorSuccess,
</span><span class="cx">     IterateCursorSuccess,
</span><ins>+    RenameObjectStoreSuccess,
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> namespace IDBServer {
</span><span class="lines">@@ -72,6 +73,7 @@
</span><span class="cx">     static IDBResultData deleteDatabaseSuccess(const IDBResourceIdentifier&amp;, const IDBDatabaseInfo&amp;);
</span><span class="cx">     static IDBResultData createObjectStoreSuccess(const IDBResourceIdentifier&amp;);
</span><span class="cx">     static IDBResultData deleteObjectStoreSuccess(const IDBResourceIdentifier&amp;);
</span><ins>+    static IDBResultData renameObjectStoreSuccess(const IDBResourceIdentifier&amp;);
</ins><span class="cx">     static IDBResultData clearObjectStoreSuccess(const IDBResourceIdentifier&amp;);
</span><span class="cx">     static IDBResultData createIndexSuccess(const IDBResourceIdentifier&amp;);
</span><span class="cx">     static IDBResultData deleteIndexSuccess(const IDBResourceIdentifier&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -146,6 +146,13 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InProcessIDBServer::didRenameObjectStore(const IDBResultData&amp; resultData)
+{
+    RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
+        m_connectionToServer-&gt;didRenameObjectStore(resultData);
+    });
+}
+
</ins><span class="cx"> void InProcessIDBServer::didClearObjectStore(const IDBResultData&amp; resultData)
</span><span class="cx"> {
</span><span class="cx">     RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
</span><span class="lines">@@ -244,6 +251,13 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InProcessIDBServer::renameObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, objectStoreIdentifier, newName] {
+        m_server-&gt;renameObjectStore(requestData, objectStoreIdentifier, newName);
+    });
+}
+
</ins><span class="cx"> void InProcessIDBServer::clearObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx">     RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, objectStoreIdentifier] {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -64,6 +64,7 @@
</span><span class="cx">     void didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp;) final;
</span><span class="cx">     void createObjectStore(const IDBRequestData&amp;, const IDBObjectStoreInfo&amp;) final;
</span><span class="cx">     void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName) final;
</span><ins>+    void renameObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; newName) final;
</ins><span class="cx">     void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier) final;
</span><span class="cx">     void createIndex(const IDBRequestData&amp;, const IDBIndexInfo&amp;) final;
</span><span class="cx">     void deleteIndex(const IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName) final;
</span><span class="lines">@@ -89,6 +90,7 @@
</span><span class="cx">     void didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;) final;
</span><span class="cx">     void didCreateObjectStore(const IDBResultData&amp;) final;
</span><span class="cx">     void didDeleteObjectStore(const IDBResultData&amp;) final;
</span><ins>+    void didRenameObjectStore(const IDBResultData&amp;) final;
</ins><span class="cx">     void didClearObjectStore(const IDBResultData&amp;) final;
</span><span class="cx">     void didCreateIndex(const IDBResultData&amp;) final;
</span><span class="cx">     void didDeleteIndex(const IDBResultData&amp;) final;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebKit2/ChangeLog        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-10-20  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Support IDBObjectStore name assignment.
+        &lt;rdar://problem/28806931&gt; and https://bugs.webkit.org/show_bug.cgi?id=163749
+
+        Reviewed by Alex Christensen.
+
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
+        (WebKit::WebIDBConnectionToClient::didRenameObjectStore):
+        (WebKit::WebIDBConnectionToClient::renameObjectStore):
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
+
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+        (WebKit::WebIDBConnectionToServer::renameObjectStore):
+        (WebKit::WebIDBConnectionToServer::didRenameObjectStore):
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
+
</ins><span class="cx"> 2016-10-20  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Avoid strstr() when checking (E)GL extensions
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -107,6 +107,11 @@
</span><span class="cx">     send(Messages::WebIDBConnectionToServer::DidDeleteObjectStore(resultData));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebIDBConnectionToClient::didRenameObjectStore(const WebCore::IDBResultData&amp; resultData)
+{
+    send(Messages::WebIDBConnectionToServer::DidRenameObjectStore(resultData));
+}
+
</ins><span class="cx"> void WebIDBConnectionToClient::didClearObjectStore(const WebCore::IDBResultData&amp; resultData)
</span><span class="cx"> {
</span><span class="cx">     send(Messages::WebIDBConnectionToServer::DidClearObjectStore(resultData));
</span><span class="lines">@@ -235,6 +240,11 @@
</span><span class="cx">     DatabaseProcess::singleton().idbServer().deleteObjectStore(request, name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebIDBConnectionToClient::renameObjectStore(const IDBRequestData&amp; request, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    DatabaseProcess::singleton().idbServer().renameObjectStore(request, objectStoreIdentifier, newName);
+}
+
</ins><span class="cx"> void WebIDBConnectionToClient::clearObjectStore(const IDBRequestData&amp; request, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx">     DatabaseProcess::singleton().idbServer().clearObjectStore(request, objectStoreIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -64,6 +64,7 @@
</span><span class="cx">     void didCommitTransaction(const WebCore::IDBResourceIdentifier&amp; transactionIdentifier, const WebCore::IDBError&amp;) final;
</span><span class="cx">     void didCreateObjectStore(const WebCore::IDBResultData&amp;) final;
</span><span class="cx">     void didDeleteObjectStore(const WebCore::IDBResultData&amp;) final;
</span><ins>+    void didRenameObjectStore(const WebCore::IDBResultData&amp;) final;
</ins><span class="cx">     void didClearObjectStore(const WebCore::IDBResultData&amp;) final;
</span><span class="cx">     void didCreateIndex(const WebCore::IDBResultData&amp;) final;
</span><span class="cx">     void didDeleteIndex(const WebCore::IDBResultData&amp;) final;
</span><span class="lines">@@ -92,6 +93,7 @@
</span><span class="cx">     void didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier&amp;);
</span><span class="cx">     void createObjectStore(const WebCore::IDBRequestData&amp;, const WebCore::IDBObjectStoreInfo&amp;);
</span><span class="cx">     void deleteObjectStore(const WebCore::IDBRequestData&amp;, const String&amp; objectStoreName);
</span><ins>+    void renameObjectStore(const WebCore::IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; newName);
</ins><span class="cx">     void clearObjectStore(const WebCore::IDBRequestData&amp;, uint64_t objectStoreIdentifier);
</span><span class="cx">     void createIndex(const WebCore::IDBRequestData&amp;, const WebCore::IDBIndexInfo&amp;);
</span><span class="cx">     void deleteIndex(const WebCore::IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName);
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">     DidFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, WebCore::IDBResourceIdentifier transactionIdentifier);
</span><span class="cx">     CreateObjectStore(WebCore::IDBRequestData requestData, WebCore::IDBObjectStoreInfo info);
</span><span class="cx">     DeleteObjectStore(WebCore::IDBRequestData requestData, String objectStoreName);
</span><ins>+    RenameObjectStore(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier, String newName);
</ins><span class="cx">     ClearObjectStore(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier);
</span><span class="cx">     CreateIndex(WebCore::IDBRequestData requestData, WebCore::IDBIndexInfo info);
</span><span class="cx">     DeleteIndex(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier, String indexName);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -118,6 +118,11 @@
</span><span class="cx">     send(Messages::WebIDBConnectionToClient::DeleteObjectStore(requestData, objectStoreName));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebIDBConnectionToServer::renameObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier, const String&amp; newName)
+{
+    send(Messages::WebIDBConnectionToClient::RenameObjectStore(requestData, objectStoreIdentifier, newName));
+}
+
</ins><span class="cx"> void WebIDBConnectionToServer::clearObjectStore(const IDBRequestData&amp; requestData, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx">     send(Messages::WebIDBConnectionToClient::ClearObjectStore(requestData, objectStoreIdentifier));
</span><span class="lines">@@ -228,6 +233,11 @@
</span><span class="cx">     m_connectionToServer-&gt;didDeleteObjectStore(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebIDBConnectionToServer::didRenameObjectStore(const IDBResultData&amp; result)
+{
+    m_connectionToServer-&gt;didRenameObjectStore(result);
+}
+
</ins><span class="cx"> void WebIDBConnectionToServer::didClearObjectStore(const IDBResultData&amp; result)
</span><span class="cx"> {
</span><span class="cx">     m_connectionToServer-&gt;didClearObjectStore(result);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">     void didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier&amp;) final;
</span><span class="cx">     void createObjectStore(const WebCore::IDBRequestData&amp;, const WebCore::IDBObjectStoreInfo&amp;) final;
</span><span class="cx">     void deleteObjectStore(const WebCore::IDBRequestData&amp;, const String&amp; objectStoreName) final;
</span><ins>+    void renameObjectStore(const WebCore::IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; newName) final;
</ins><span class="cx">     void clearObjectStore(const WebCore::IDBRequestData&amp;, uint64_t objectStoreIdentifier) final;
</span><span class="cx">     void createIndex(const WebCore::IDBRequestData&amp;, const WebCore::IDBIndexInfo&amp;) final;
</span><span class="cx">     void deleteIndex(const WebCore::IDBRequestData&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName) final;
</span><span class="lines">@@ -81,6 +82,7 @@
</span><span class="cx">     void didCommitTransaction(const WebCore::IDBResourceIdentifier&amp; transactionIdentifier, const WebCore::IDBError&amp;);
</span><span class="cx">     void didCreateObjectStore(const WebCore::IDBResultData&amp;);
</span><span class="cx">     void didDeleteObjectStore(const WebCore::IDBResultData&amp;);
</span><ins>+    void didRenameObjectStore(const WebCore::IDBResultData&amp;);
</ins><span class="cx">     void didClearObjectStore(const WebCore::IDBResultData&amp;);
</span><span class="cx">     void didCreateIndex(const WebCore::IDBResultData&amp;);
</span><span class="cx">     void didDeleteIndex(const WebCore::IDBResultData&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServermessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in (207640 => 207641)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in        2016-10-20 21:00:54 UTC (rev 207640)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in        2016-10-20 23:03:21 UTC (rev 207641)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">     DidCommitTransaction(WebCore::IDBResourceIdentifier transactionIdentifier, WebCore::IDBError error)
</span><span class="cx">     DidCreateObjectStore(WebCore::IDBResultData result)
</span><span class="cx">     DidDeleteObjectStore(WebCore::IDBResultData result)
</span><ins>+    DidRenameObjectStore(WebCore::IDBResultData result)
</ins><span class="cx">     DidClearObjectStore(WebCore::IDBResultData result)
</span><span class="cx">     DidCreateIndex(WebCore::IDBResultData result)
</span><span class="cx">     DidDeleteIndex(WebCore::IDBResultData result)
</span></span></pre>
</div>
</div>

</body>
</html>