<!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.
<rdar://problem/28806931> 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 <beidson@apple.com>
+
+ IndexedDB 2.0: Support IDBObjectStore name assignment.
+ <rdar://problem/28806931> 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 <zalan@apple.com>
</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 <beidson@apple.com>
+
+ IndexedDB 2.0: Support IDBObjectStore name assignment.
+ <rdar://problem/28806931> 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 <cdumez@apple.com>
</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 "() => store.name = 'renamed_books'" did not throw
-FAIL IndexedDB object store rename throws in a readonly transaction assert_throws: function "() => store.name = 'renamed_books'" did not throw
-FAIL IndexedDB object store rename throws in a readwrite transaction assert_throws: function "() => store.name = 'renamed_books'" did not throw
-FAIL IndexedDB object store rename throws in an inactive transaction assert_throws: function "() => { bookStore.name = 'renamed_books'; }" did not throw
-FAIL IndexedDB object store rename to the name of another store throws assert_throws: function "() => store.name = 'not_books'" did not throw
-FAIL IndexedDB object store rename handles exceptions when stringifying names assert_throws: IDBObjectStore rename should re-raise toString() exception function "() => {
- store.name = {
- toSt..." 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 "() => { bookStore.name = 'renamed_books'; }" threw object "InvalidStateError (DOM Exception 11): Failed set property..." that is not a DOMException TransactionInactiveError: property "code" is equal to 11, expected 0
+FAIL IndexedDB object store rename to the name of another store throws assert_throws: function "() => store.name = 'not_books'" threw object "InvalidStateError (DOM Exception 11): Failed set property..." that is not a DOMException ConstraintError: property "code" 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 "renamed_books" but got "books"
-FAIL IndexedDB object store rename in the transaction where it is created assert_equals: IDBObjectStore name should change immediately after a rename expected "renamed_books" but got "books"
-FAIL IndexedDB object store rename covers index promise_test: Unhandled rejection with value: object "NotFoundError (DOM IDBDatabase Exception 8): Failed to ex..."
-FAIL IndexedDB object store rename covers key generator promise_test: Unhandled rejection with value: object "NotFoundError (DOM IDBDatabase Exception 8): Failed to ex..."
</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 "not_books" but got "books"
-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 "42" but got "books"
-FAIL IndexedDB object store can be renamed to "" assert_equals: IDBObjectStore name should change immediately after the rename expected "" but got "books"
-FAIL IndexedDB object store can be renamed to "\u0000" assert_equals: IDBObjectStore name should change immediately after the rename expected "\0" but got "books"
-FAIL IndexedDB object store can be renamed to "\uDC00\uD800" assert_equals: IDBObjectStore name should change immediately after the rename expected "í°í " but got "books"
</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 ""
+PASS IndexedDB object store can be renamed to "\u0000"
+PASS IndexedDB object store can be renamed to "\uDC00\uD800"
</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 "PASS" messages, followed by "TEST COMPLETE".
+
+
+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 "PASS" messages, followed by "TEST COMPLETE".
+
+
+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>+<html>
+<head>
+<script>
+enablePrivateBrowsing = true;
+</script>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/objectstore-rename-1.js"></script>
+</body>
+</html>
</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>+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/objectstore-rename-1.js"></script>
+</body>
+</html>
</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("This tests expectations with renaming existing object stores.");
+
+indexedDBTest(prepareDatabase);
+
+function log(message)
+{
+ debug(message);
+}
+
+var testGenerator;
+function next()
+{
+ testGenerator.next();
+}
+
+function asyncNext()
+{
+ setTimeout("testGenerator.next();", 0);
+}
+
+var db;
+var dbName;
+var dbVersion;
+
+function prepareDatabase(event)
+{
+ log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ db = event.target.result;
+        dbName = db.name;
+        dbVersion = db.version;
+
+        objectStore = db.createObjectStore("ExistingObjectStore");
+
+        objectStore = db.createObjectStore("TestObjectStore");
+        log("Initial objectStore name: " + objectStore.name);
+        
+        try {
+                objectStore.name = "ExistingObjectStore";
+                log("Was incorrectly able to rename this object store to the name of another existing object store");
+        } catch(e) {
+                log("Caught exception renaming object store to the name of another existing object store: " + e);
+        }
+
+        objectStore.name = "RenamedObjectStore";
+        log("Renamed objectStore name: " + objectStore.name);
+
+ event.target.onsuccess = function() {
+ testGenerator = testSteps();
+ testGenerator.next();
+ };
+}
+
+function* testSteps()
+{
+ tx = db.transaction("RenamedObjectStore", "readwrite");
+ tx.oncomplete = next;
+ objectStore = tx.objectStore("RenamedObjectStore");
+ log("Current objectStore name in a new transaction: " + objectStore.name);
+
+        try {
+                objectStore.name = "newName";
+                log("Renaming object store succeeded, but it shouldn't have");
+        } catch(e) {
+                log("Caught exception renaming object store outside of a version change transaction: " + 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("Current objectStoreNames during second upgrade transaction includes 'ExistingObjectStore': " + db.objectStoreNames.contains("ExistingObjectStore"));
+                log("Current objectStoreNames during second upgrade transaction includes 'RenamedObjectStore': " + db.objectStoreNames.contains("RenamedObjectStore"));
+
+                objectStore = event.target.transaction.objectStore("RenamedObjectStore");
+                objectStore.name = "YetAnotherName";
+                
+                log("Renamed objectstore again to: " + objectStore.name);
+                log("Aborting version change transaction...");
+                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("Current objectStoreNames during final transaction includes 'ExistingObjectStore': " + db.objectStoreNames.contains("ExistingObjectStore"));
+                log("Current objectStoreNames during final transaction includes 'RenamedObjectStore': " + db.objectStoreNames.contains("RenamedObjectStore"));
+
+                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("objectStore = db.createObjectStore('foo');");
</span><span class="cx">
</span><del>- setReadonlyProperty("objectStore.name", "'bar'");
</del><span class="cx"> setReadonlyProperty("objectStore.keyPath", "'bar'");
</span><span class="cx"> /* fails, split into separate test
</span><span class="cx"> setReadonlyProperty("objectStore.indexNames", "['bar']");
</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 <beidson@apple.com>
+
+ IndexedDB 2.0: Support IDBObjectStore name assignment.
+ <rdar://problem/28806931> 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 <cdumez@apple.com>
</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& objectStore, const String& newName)
+{
+ ASSERT(currentThread() == originThreadID());
+ ASSERT(m_versionChangeTransaction);
+ ASSERT(m_info.hasObjectStore(objectStore.info().name()));
+
+ m_info.renameObjectStore(objectStore.info().identifier(), newName);
+
+ m_versionChangeTransaction->renameObjectStore(objectStore, newName);
+}
+
</ins><span class="cx"> ExceptionOr<Ref<IDBObjectStore>> IDBDatabase::createObjectStore(const String&, const Dictionary&)
</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<void> deleteObjectStore(const String& name);
</span><span class="cx"> void close();
</span><span class="cx">
</span><ins>+ void renameObjectStore(IDBObjectStore&, const String& 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<void> IDBObjectStore::setName(const String& name)
+{
+ ASSERT(currentThread() == m_transaction->database().originThreadID());
+
+ if (m_deleted)
+ return Exception { INVALID_STATE_ERR, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store has been deleted.") };
+
+ if (!m_transaction->isVersionChange())
+ return Exception { INVALID_STATE_ERR, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.") };
+
+ if (!m_transaction->isActive())
+ return Exception { INVALID_STATE_ERR, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not active.") };
+
+ if (m_info.name() == name)
+ return { };
+
+ if (m_transaction->database().info().hasObjectStore(name))
+ return Exception { INVALID_STATE_ERR, makeString("Failed set property 'name' on 'IDBObjectStore': The database already has an object store named '", name, "'.") };
+
+ m_transaction->database().renameObjectStore(*this, name);
+ m_info.rename(name);
+
+ return { };
+}
+
</ins><span class="cx"> const IDBKeyPath& IDBObjectStore::keyPath() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == m_transaction->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& name() const;
</span><ins>+ ExceptionOr<void> setName(const String&);
</ins><span class="cx"> const IDBKeyPath& keyPath() const;
</span><span class="cx"> RefPtr<DOMStringList> indexNames() const;
</span><span class="cx"> IDBTransaction& 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& objectStore, const String& newName)
+{
+ LOG(IndexedDB, "IDBTransaction::renameObjectStore");
+ ASSERT(isVersionChange());
+ ASSERT(scriptExecutionContext());
+ ASSERT(currentThread() == m_database->originThreadID());
+
+ ASSERT(m_referencedObjectStores.contains(objectStore.info().name()));
+ ASSERT(!m_referencedObjectStores.contains(newName));
+ ASSERT(m_referencedObjectStores.get(objectStore.info().name()) == &objectStore);
+
+ uint64_t objectStoreIdentifier = objectStore.info().identifier();
+ auto operation = IDBClient::createTransactionOperation(*this, &IDBTransaction::didRenameObjectStoreOnServer, &IDBTransaction::renameObjectStoreOnServer, objectStoreIdentifier, newName);
+ scheduleOperation(WTFMove(operation));
+
+ m_referencedObjectStores.set(newName, m_referencedObjectStores.take(objectStore.info().name()));
+}
+
+void IDBTransaction::renameObjectStoreOnServer(IDBClient::TransactionOperation& operation, const uint64_t& objectStoreIdentifier, const String& newName)
+{
+ LOG(IndexedDB, "IDBTransaction::renameObjectStoreOnServer");
+ ASSERT(currentThread() == m_database->originThreadID());
+ ASSERT(isVersionChange());
+
+ m_database->connectionProxy().renameObjectStore(operation, objectStoreIdentifier, newName);
+}
+
+void IDBTransaction::didRenameObjectStoreOnServer(const IDBResultData& resultData)
+{
+ LOG(IndexedDB, "IDBTransaction::didRenameObjectStoreOnServer");
+ ASSERT(currentThread() == m_database->originThreadID());
+ ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::RenameObjectStoreSuccess || resultData.type() == IDBResultType::Error);
+}
+
</ins><span class="cx"> std::unique_ptr<IDBIndex> IDBTransaction::createIndex(IDBObjectStore& objectStore, const IDBIndexInfo& info)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::createIndex");
</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<IDBObjectStore> createObjectStore(const IDBObjectStoreInfo&);
</span><ins>+ void renameObjectStore(IDBObjectStore&, const String& newName);
</ins><span class="cx"> std::unique_ptr<IDBIndex> createIndex(IDBObjectStore&, const IDBIndexInfo&);
</span><span class="cx">
</span><span class="cx"> Ref<IDBRequest> requestPutOrAdd(JSC::ExecState&, IDBObjectStore&, IDBKey*, SerializedScriptValue&, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="lines">@@ -171,6 +172,9 @@
</span><span class="cx"> void createObjectStoreOnServer(IDBClient::TransactionOperation&, const IDBObjectStoreInfo&);
</span><span class="cx"> void didCreateObjectStoreOnServer(const IDBResultData&);
</span><span class="cx">
</span><ins>+ void renameObjectStoreOnServer(IDBClient::TransactionOperation&, const uint64_t& objectStoreIdentifier, const String& newName);
+ void didRenameObjectStoreOnServer(const IDBResultData&);
+
</ins><span class="cx"> void createIndexOnServer(IDBClient::TransactionOperation&, const IDBIndexInfo&);
</span><span class="cx"> void didCreateIndexOnServer(const IDBResultData&);
</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(&IDBConnectionToServer::createObjectStore, requestData, info);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBConnectionProxy::renameObjectStore(TransactionOperation& operation, uint64_t objectStoreIdentifier, const String& newName)
+{
+ const IDBRequestData requestData(operation);
+ saveOperation(operation);
+
+ callConnectionOnMainThread(&IDBConnectionToServer::renameObjectStore, requestData, objectStoreIdentifier, newName);
+}
+
</ins><span class="cx"> void IDBConnectionProxy::deleteObjectStore(TransactionOperation& operation, const String& 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&, const IDBKeyRangeData&);
</span><span class="cx"> void openCursor(TransactionOperation&, const IDBCursorInfo&);
</span><span class="cx"> void iterateCursor(TransactionOperation&, const IDBKeyData&, unsigned long count);
</span><del>-
</del><ins>+ void renameObjectStore(TransactionOperation&, uint64_t objectStoreIdentifier, const String& newName);
+
</ins><span class="cx"> void fireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier, uint64_t requestedVersion);
</span><span class="cx"> void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& 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->completeOperation(resultData);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBConnectionToServer::renameObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier, const String& newName)
+{
+ LOG(IndexedDB, "IDBConnectionToServer::renameObjectStore");
+ ASSERT(isMainThread());
+
+ m_delegate->renameObjectStore(requestData, objectStoreIdentifier, newName);
+}
+
+void IDBConnectionToServer::didRenameObjectStore(const IDBResultData& resultData)
+{
+ LOG(IndexedDB, "IDBConnectionToServer::didRenameObjectStore");
+ m_proxy->completeOperation(resultData);
+}
+
</ins><span class="cx"> void IDBConnectionToServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBConnectionToServer::clearObjectStore");
</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&, const String& objectStoreName);
</span><span class="cx"> WEBCORE_EXPORT void didDeleteObjectStore(const IDBResultData&);
</span><span class="cx">
</span><ins>+ void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName);
+ WEBCORE_EXPORT void didRenameObjectStore(const IDBResultData&);
+
</ins><span class="cx"> void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
</span><span class="cx"> WEBCORE_EXPORT void didClearObjectStore(const IDBResultData&);
</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&) = 0;
</span><span class="cx"> virtual void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&) = 0;
</span><span class="cx"> virtual void deleteObjectStore(const IDBRequestData&, const String& objectStoreName) = 0;
</span><ins>+ virtual void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName) = 0;
</ins><span class="cx"> virtual void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx"> virtual void createIndex(const IDBRequestData&, const IDBIndexInfo&) = 0;
</span><span class="cx"> virtual void deleteIndex(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& 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& transactionIdentifier, const IDBObjectStoreInfo&) = 0;
</span><span class="cx"> virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</span><ins>+ virtual IDBError renameObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) = 0;
</ins><span class="cx"> virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx"> virtual IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) = 0;
</span><span class="cx"> virtual IDBError deleteIndex(const IDBResourceIdentifier& 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->didDeleteObjectStore(result);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBConnectionToClient::didRenameObjectStore(const IDBResultData& result)
+{
+ m_delegate->didRenameObjectStore(result);
+}
+
</ins><span class="cx"> void IDBConnectionToClient::didClearObjectStore(const IDBResultData& result)
</span><span class="cx"> {
</span><span class="cx"> m_delegate->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& transactionIdentifier, const IDBError&);
</span><span class="cx"> void didCreateObjectStore(const IDBResultData&);
</span><span class="cx"> void didDeleteObjectStore(const IDBResultData&);
</span><ins>+ void didRenameObjectStore(const IDBResultData&);
</ins><span class="cx"> void didClearObjectStore(const IDBResultData&);
</span><span class="cx"> void didCreateIndex(const IDBResultData&);
</span><span class="cx"> void didDeleteIndex(const IDBResultData&);
</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& transactionIdentifier, const IDBError&) = 0;
</span><span class="cx"> virtual void didCreateObjectStore(const IDBResultData&) = 0;
</span><span class="cx"> virtual void didDeleteObjectStore(const IDBResultData&) = 0;
</span><ins>+ virtual void didRenameObjectStore(const IDBResultData&) = 0;
</ins><span class="cx"> virtual void didClearObjectStore(const IDBResultData&) = 0;
</span><span class="cx"> virtual void didCreateIndex(const IDBResultData&) = 0;
</span><span class="cx"> virtual void didDeleteIndex(const IDBResultData&) = 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->deleteObjectStore(requestData, objectStoreName);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBServer::renameObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier, const String& newName)
+{
+ LOG(IndexedDB, "IDBServer::renameObjectStore");
+
+ auto transaction = m_transactions.get(requestData.transactionIdentifier());
+ if (!transaction)
+ return;
+
+ ASSERT(transaction->isVersionChange());
+ transaction->renameObjectStore(requestData, objectStoreIdentifier, newName);
+}
+
</ins><span class="cx"> void IDBServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBServer::clearObjectStore");
</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&);
</span><span class="cx"> WEBCORE_EXPORT void didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&);
</span><span class="cx"> WEBCORE_EXPORT void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&);
</span><ins>+ WEBCORE_EXPORT void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName);
</ins><span class="cx"> WEBCORE_EXPORT void deleteObjectStore(const IDBRequestData&, const String& objectStoreName);
</span><span class="cx"> WEBCORE_EXPORT void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
</span><span class="cx"> WEBCORE_EXPORT void createIndex(const IDBRequestData&, const IDBIndexInfo&);
</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(&objectStore, WTFMove(orderedKeys));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void MemoryBackingStoreTransaction::objectStoreRenamed(MemoryObjectStore& objectStore, const String& oldName)
+{
+ ASSERT(m_objectStores.contains(&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(&objectStore, oldName);
+}
+
</ins><span class="cx"> void MemoryBackingStoreTransaction::indexCleared(MemoryIndex& index, std::unique_ptr<IndexValueStore>&& valueStore)
</span><span class="cx"> {
</span><span class="cx"> auto addResult = m_clearedIndexValueStores.add(&index, nullptr);
</span><span class="lines">@@ -193,6 +203,10 @@
</span><span class="cx">
</span><span class="cx"> TemporaryChange<bool> change(m_isAborting, true);
</span><span class="cx">
</span><ins>+ for (auto iterator : m_originalObjectStoreNames)
+ iterator.key->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&, const IDBKeyData&, ThreadSafeDataBuffer*);
</span><span class="cx"> void objectStoreDeleted(Ref<MemoryObjectStore>&&);
</span><span class="cx"> void objectStoreCleared(MemoryObjectStore&, std::unique_ptr<KeyValueMap>&&, std::unique_ptr<std::set<IDBKeyData>>&&);
</span><ins>+ void objectStoreRenamed(MemoryObjectStore&, const String& oldName);
</ins><span class="cx"> void indexCleared(MemoryIndex&, std::unique_ptr<IndexValueStore>&&);
</span><span class="cx">
</span><span class="cx"> void addNewIndex(MemoryIndex&);
</span><span class="lines">@@ -95,6 +96,7 @@
</span><span class="cx"> HashMap<MemoryObjectStore*, std::unique_ptr<KeyValueMap>> m_originalValues;
</span><span class="cx"> HashMap<MemoryObjectStore*, std::unique_ptr<KeyValueMap>> m_clearedKeyValueMaps;
</span><span class="cx"> HashMap<MemoryObjectStore*, std::unique_ptr<std::set<IDBKeyData>>> m_clearedOrderedKeys;
</span><ins>+ HashMap<MemoryObjectStore*, String> m_originalObjectStoreNames;
</ins><span class="cx"> HashMap<MemoryIndex*, std::unique_ptr<IndexValueStore>> 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& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName)
+{
+ LOG(IndexedDB, "MemoryIDBBackingStore::renameObjectStore");
+
+ ASSERT(m_databaseInfo);
+ if (!m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier))
+ return IDBError(IDBDatabaseException::ConstraintError);
+
+ auto transaction = m_transactions.get(transactionIdentifier);
+ ASSERT(transaction);
+ ASSERT(transaction->isVersionChange());
+
+ auto objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
+ ASSERT(objectStore);
+ if (!objectStore)
+ return IDBError(IDBDatabaseException::ConstraintError);
+
+ String oldName = objectStore->info().name();
+ objectStore->rename(newName);
+ transaction->objectStoreRenamed(*objectStore, oldName);
+
+ m_databaseInfo->renameObjectStore(objectStoreIdentifier, newName);
+
+ return IDBError();
+}
+
</ins><span class="cx"> IDBError MemoryIDBBackingStore::clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "MemoryIDBBackingStore::clearObjectStore");
</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& transactionIdentifier) final;
</span><span class="cx"> IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) final;
</span><span class="cx"> IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) final;
</span><ins>+ IDBError renameObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) final;
</ins><span class="cx"> IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) final;
</span><span class="cx"> IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) final;
</span><span class="cx"> IDBError deleteIndex(const IDBResourceIdentifier& 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<MemoryIndex>&&);
</span><span class="cx">
</span><ins>+ void rename(const String& newName) { m_info.rename(newName); }
+
</ins><span class="cx"> private:
</span><span class="cx"> MemoryObjectStore(const IDBObjectStoreInfo&);
</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& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName)
+{
+ LOG(IndexedDB, "SQLiteIDBBackingStore::renameObjectStore - object store %" PRIu64, objectStoreIdentifier);
+
+ ASSERT(m_sqliteDB);
+ ASSERT(m_sqliteDB->isOpen());
+
+ auto* transaction = m_transactions.get(transactionIdentifier);
+ if (!transaction || !transaction->inProgress()) {
+ LOG_ERROR("Attempt to rename an object store without an in-progress transaction");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to rename an object store without an in-progress transaction") };
+ }
+ if (transaction->mode() != IndexedDB::TransactionMode::VersionChange) {
+ LOG_ERROR("Attempt to rename an object store in a non-version-change transaction");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to rename an object store in a non-version-change transaction") };
+ }
+
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("UPDATE ObjectStoreInfo SET name = ? WHERE id = ?;"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindText(1, newName) != SQLITE_OK
+ || sql.bindInt64(2, objectStoreIdentifier) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not update name for object store id %" PRIi64 " in ObjectStoreInfo table (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not rename object store") };
+ }
+ }
+
+ m_databaseInfo->renameObjectStore(objectStoreIdentifier, newName);
+
+ return { };
+}
+
</ins><span class="cx"> IDBError SQLiteIDBBackingStore::clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreID)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::clearObjectStore - object store %" 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& transactionIdentifier) final;
</span><span class="cx"> IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) final;
</span><span class="cx"> IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) final;
</span><ins>+ IDBError renameObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) final;
</ins><span class="cx"> IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) final;
</span><span class="cx"> IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) final;
</span><span class="cx"> IDBError deleteIndex(const IDBResourceIdentifier& 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& transaction, uint64_t objectStoreIdentifier, const String& newName, ErrorCallback callback)
+{
+ ASSERT(isMainThread());
+ LOG(IndexedDB, "(main) UniqueIDBDatabase::renameObjectStore");
+
+ uint64_t callbackID = storeCallbackOrFireError(callback);
+ if (!callbackID)
+ return;
+
+ auto* info = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier);
+ if (!info) {
+ performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to rename non-existant object store") });
+ return;
+ }
+
+ postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performRenameObjectStore, callbackID, transaction.info().identifier(), objectStoreIdentifier, newName));
+}
+
+void UniqueIDBDatabase::performRenameObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName)
+{
+ ASSERT(!isMainThread());
+ LOG(IndexedDB, "(db) UniqueIDBDatabase::performRenameObjectStore");
+
+ ASSERT(m_backingStore);
+ m_backingStore->renameObjectStore(transactionIdentifier, objectStoreIdentifier, newName);
+
+ IDBError error;
+ postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformRenameObjectStore, callbackIdentifier, error, objectStoreIdentifier, newName));
+}
+
+void UniqueIDBDatabase::didPerformRenameObjectStore(uint64_t callbackIdentifier, const IDBError& error, uint64_t objectStoreIdentifier, const String& newName)
+{
+ ASSERT(isMainThread());
+ LOG(IndexedDB, "(main) UniqueIDBDatabase::didPerformRenameObjectStore");
+
+ if (error.isNull())
+ m_databaseInfo->renameObjectStore(objectStoreIdentifier, newName);
+
+ performErrorCallback(callbackIdentifier, error);
+}
+
</ins><span class="cx"> void UniqueIDBDatabase::clearObjectStore(UniqueIDBDatabaseTransaction& 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&, const IDBObjectStoreInfo&, ErrorCallback);
</span><span class="cx"> void deleteObjectStore(UniqueIDBDatabaseTransaction&, const String& objectStoreName, ErrorCallback);
</span><ins>+ void renameObjectStore(UniqueIDBDatabaseTransaction&, uint64_t objectStoreIdentifier, const String& newName, ErrorCallback);
</ins><span class="cx"> void clearObjectStore(UniqueIDBDatabaseTransaction&, uint64_t objectStoreIdentifier, ErrorCallback);
</span><span class="cx"> void createIndex(UniqueIDBDatabaseTransaction&, const IDBIndexInfo&, ErrorCallback);
</span><span class="cx"> void deleteIndex(UniqueIDBDatabaseTransaction&, uint64_t objectStoreIdentifier, const String& indexName, ErrorCallback);
</span><span class="lines">@@ -144,6 +145,7 @@
</span><span class="cx"> void beginTransactionInBackingStore(const IDBTransactionInfo&);
</span><span class="cx"> void performCreateObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&);
</span><span class="cx"> void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier);
</span><ins>+ void performRenameObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName);
</ins><span class="cx"> void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier);
</span><span class="cx"> void performCreateIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&);
</span><span class="cx"> void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier);
</span><span class="lines">@@ -162,6 +164,7 @@
</span><span class="cx"> void didOpenBackingStore(const IDBDatabaseInfo&, const IDBError&);
</span><span class="cx"> void didPerformCreateObjectStore(uint64_t callbackIdentifier, const IDBError&, const IDBObjectStoreInfo&);
</span><span class="cx"> void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier);
</span><ins>+ void didPerformRenameObjectStore(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier, const String& newName);
</ins><span class="cx"> void didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError&);
</span><span class="cx"> void didPerformCreateIndex(uint64_t callbackIdentifier, const IDBError&, const IDBIndexInfo&);
</span><span class="cx"> void didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&, 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& resultData)
+{
+ LOG(IndexedDB, "UniqueIDBDatabaseConnection::didRenameObjectStore");
+
+ m_connectionToClient.didRenameObjectStore(resultData);
+}
+
</ins><span class="cx"> void UniqueIDBDatabaseConnection::didClearObjectStore(const IDBResultData& resultData)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "UniqueIDBDatabaseConnection::didClearObjectStore");
</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&, const IDBError&);
</span><span class="cx"> void didCreateObjectStore(const IDBResultData&);
</span><span class="cx"> void didDeleteObjectStore(const IDBResultData&);
</span><ins>+ void didRenameObjectStore(const IDBResultData&);
</ins><span class="cx"> void didClearObjectStore(const IDBResultData&);
</span><span class="cx"> void didCreateIndex(const IDBResultData&);
</span><span class="cx"> void didDeleteIndex(const IDBResultData&);
</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& requestData, uint64_t objectStoreIdentifier, const String& newName)
+{
+ LOG(IndexedDB, "UniqueIDBDatabaseTransaction::renameObjectStore");
+
+ ASSERT(isVersionChange());
+ ASSERT(m_transactionInfo.identifier() == requestData.transactionIdentifier());
+
+ RefPtr<UniqueIDBDatabaseTransaction> protectedThis(this);
+ m_databaseConnection->database().renameObjectStore(*this, objectStoreIdentifier, newName, [this, protectedThis, requestData](const IDBError& error) {
+ LOG(IndexedDB, "UniqueIDBDatabaseTransaction::renameObjectStore (callback)");
+ if (error.isNull())
+ m_databaseConnection->didRenameObjectStore(IDBResultData::renameObjectStoreSuccess(requestData.requestIdentifier()));
+ else
+ m_databaseConnection->didRenameObjectStore(IDBResultData::error(requestData.requestIdentifier(), error));
+ });
+}
+
</ins><span class="cx"> void UniqueIDBDatabaseTransaction::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "UniqueIDBDatabaseTransaction::clearObjectStore");
</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&, const IDBObjectStoreInfo&);
</span><span class="cx"> void deleteObjectStore(const IDBRequestData&, const String& objectStoreName);
</span><ins>+ void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName);
</ins><span class="cx"> void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
</span><span class="cx"> void createIndex(const IDBRequestData&, const IDBIndexInfo&);
</span><span class="cx"> void deleteIndex(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& 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& newName)
+{
+ auto* info = infoForExistingObjectStore(objectStoreIdentifier);
+ if (!info)
+ return;
+
+ info->rename(newName);
+}
+
</ins><span class="cx"> Vector<String> IDBDatabaseInfo::objectStoreNames() const
</span><span class="cx"> {
</span><span class="cx"> Vector<String> 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& objectStoreName) const;
</span><span class="cx">
</span><ins>+ void renameObjectStore(uint64_t objectStoreIdentifier, const String& newName);
+
</ins><span class="cx"> Vector<String> objectStoreNames() const;
</span><span class="cx">
</span><span class="cx"> void deleteObjectStore(const String& 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& newName) { m_name = newName; }
+
</ins><span class="cx"> IDBObjectStoreInfo isolatedCopy() const;
</span><span class="cx">
</span><span class="cx"> IDBIndexInfo createNewIndex(const String& name, const IDBKeyPath&, 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& requestIdentifier)
+{
+ return { IDBResultType::RenameObjectStoreSuccess, requestIdentifier };
+}
+
</ins><span class="cx"> IDBResultData IDBResultData::clearObjectStoreSuccess(const IDBResourceIdentifier& 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&, const IDBDatabaseInfo&);
</span><span class="cx"> static IDBResultData createObjectStoreSuccess(const IDBResourceIdentifier&);
</span><span class="cx"> static IDBResultData deleteObjectStoreSuccess(const IDBResourceIdentifier&);
</span><ins>+ static IDBResultData renameObjectStoreSuccess(const IDBResourceIdentifier&);
</ins><span class="cx"> static IDBResultData clearObjectStoreSuccess(const IDBResourceIdentifier&);
</span><span class="cx"> static IDBResultData createIndexSuccess(const IDBResourceIdentifier&);
</span><span class="cx"> static IDBResultData deleteIndexSuccess(const IDBResourceIdentifier&);
</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& resultData)
+{
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
+ m_connectionToServer->didRenameObjectStore(resultData);
+ });
+}
+
</ins><span class="cx"> void InProcessIDBServer::didClearObjectStore(const IDBResultData& 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& requestData, uint64_t objectStoreIdentifier, const String& newName)
+{
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, objectStoreIdentifier, newName] {
+ m_server->renameObjectStore(requestData, objectStoreIdentifier, newName);
+ });
+}
+
</ins><span class="cx"> void InProcessIDBServer::clearObjectStore(const IDBRequestData& 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&) final;
</span><span class="cx"> void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&) final;
</span><span class="cx"> void deleteObjectStore(const IDBRequestData&, const String& objectStoreName) final;
</span><ins>+ void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName) final;
</ins><span class="cx"> void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier) final;
</span><span class="cx"> void createIndex(const IDBRequestData&, const IDBIndexInfo&) final;
</span><span class="cx"> void deleteIndex(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& indexName) final;
</span><span class="lines">@@ -89,6 +90,7 @@
</span><span class="cx"> void didCommitTransaction(const IDBResourceIdentifier& transactionIdentifier, const IDBError&) final;
</span><span class="cx"> void didCreateObjectStore(const IDBResultData&) final;
</span><span class="cx"> void didDeleteObjectStore(const IDBResultData&) final;
</span><ins>+ void didRenameObjectStore(const IDBResultData&) final;
</ins><span class="cx"> void didClearObjectStore(const IDBResultData&) final;
</span><span class="cx"> void didCreateIndex(const IDBResultData&) final;
</span><span class="cx"> void didDeleteIndex(const IDBResultData&) 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 <beidson@apple.com>
+
+ IndexedDB 2.0: Support IDBObjectStore name assignment.
+ <rdar://problem/28806931> 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 <cgarcia@igalia.com>
</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& resultData)
+{
+ send(Messages::WebIDBConnectionToServer::DidRenameObjectStore(resultData));
+}
+
</ins><span class="cx"> void WebIDBConnectionToClient::didClearObjectStore(const WebCore::IDBResultData& 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& request, uint64_t objectStoreIdentifier, const String& newName)
+{
+ DatabaseProcess::singleton().idbServer().renameObjectStore(request, objectStoreIdentifier, newName);
+}
+
</ins><span class="cx"> void WebIDBConnectionToClient::clearObjectStore(const IDBRequestData& 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& transactionIdentifier, const WebCore::IDBError&) final;
</span><span class="cx"> void didCreateObjectStore(const WebCore::IDBResultData&) final;
</span><span class="cx"> void didDeleteObjectStore(const WebCore::IDBResultData&) final;
</span><ins>+ void didRenameObjectStore(const WebCore::IDBResultData&) final;
</ins><span class="cx"> void didClearObjectStore(const WebCore::IDBResultData&) final;
</span><span class="cx"> void didCreateIndex(const WebCore::IDBResultData&) final;
</span><span class="cx"> void didDeleteIndex(const WebCore::IDBResultData&) final;
</span><span class="lines">@@ -92,6 +93,7 @@
</span><span class="cx"> void didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier&);
</span><span class="cx"> void createObjectStore(const WebCore::IDBRequestData&, const WebCore::IDBObjectStoreInfo&);
</span><span class="cx"> void deleteObjectStore(const WebCore::IDBRequestData&, const String& objectStoreName);
</span><ins>+ void renameObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName);
</ins><span class="cx"> void clearObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier);
</span><span class="cx"> void createIndex(const WebCore::IDBRequestData&, const WebCore::IDBIndexInfo&);
</span><span class="cx"> void deleteIndex(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier, const String& 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& requestData, uint64_t objectStoreIdentifier, const String& newName)
+{
+ send(Messages::WebIDBConnectionToClient::RenameObjectStore(requestData, objectStoreIdentifier, newName));
+}
+
</ins><span class="cx"> void WebIDBConnectionToServer::clearObjectStore(const IDBRequestData& 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->didDeleteObjectStore(result);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebIDBConnectionToServer::didRenameObjectStore(const IDBResultData& result)
+{
+ m_connectionToServer->didRenameObjectStore(result);
+}
+
</ins><span class="cx"> void WebIDBConnectionToServer::didClearObjectStore(const IDBResultData& result)
</span><span class="cx"> {
</span><span class="cx"> m_connectionToServer->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&) final;
</span><span class="cx"> void createObjectStore(const WebCore::IDBRequestData&, const WebCore::IDBObjectStoreInfo&) final;
</span><span class="cx"> void deleteObjectStore(const WebCore::IDBRequestData&, const String& objectStoreName) final;
</span><ins>+ void renameObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName) final;
</ins><span class="cx"> void clearObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier) final;
</span><span class="cx"> void createIndex(const WebCore::IDBRequestData&, const WebCore::IDBIndexInfo&) final;
</span><span class="cx"> void deleteIndex(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier, const String& indexName) final;
</span><span class="lines">@@ -81,6 +82,7 @@
</span><span class="cx"> void didCommitTransaction(const WebCore::IDBResourceIdentifier& transactionIdentifier, const WebCore::IDBError&);
</span><span class="cx"> void didCreateObjectStore(const WebCore::IDBResultData&);
</span><span class="cx"> void didDeleteObjectStore(const WebCore::IDBResultData&);
</span><ins>+ void didRenameObjectStore(const WebCore::IDBResultData&);
</ins><span class="cx"> void didClearObjectStore(const WebCore::IDBResultData&);
</span><span class="cx"> void didCreateIndex(const WebCore::IDBResultData&);
</span><span class="cx"> void didDeleteIndex(const WebCore::IDBResultData&);
</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>