<!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>[191826] 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/191826">191826</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-10-30 16:20:02 -0700 (Fri, 30 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modern IDB: IDBObjectStore.clear() support.
https://bugs.webkit.org/show_bug.cgi?id=150733
Reviewed by Alex Christensen.
Source/WebCore:
Tests: storage/indexeddb/modern/idbobjectstore-clear-1.html
storage/indexeddb/modern/idbobjectstore-clear-2.html
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::clearObjectStore):
(WebCore::IDBClient::IDBConnectionToServer::didClearObjectStore):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::clear):
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::setResultToUndefined):
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
(WebCore::IDBClient::IDBTransaction::clearObjectStoreOnServer):
(WebCore::IDBClient::IDBTransaction::didClearObjectStoreOnServer):
* Modules/indexeddb/client/IDBTransactionImpl.h:
* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::didClearObjectStore):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::clearObjectStore):
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
(WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
(WebCore::IDBServer::MemoryBackingStoreTransaction::isAborting):
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::clear):
(WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
* Modules/indexeddb/server/MemoryObjectStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::performClearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformClearObjectStore):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didClearObjectStore):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::clearObjectStoreSuccess):
* Modules/indexeddb/shared/IDBResultData.h:
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didClearObjectStore):
(WebCore::InProcessIDBServer::clearObjectStore):
* Modules/indexeddb/shared/InProcessIDBServer.h:
LayoutTests:
* storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-clear-1.html: Added.
* storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-clear-2.html: Added.
* storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h</a></li>
<li><a href="#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="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.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="#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>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1html">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2html">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/LayoutTests/ChangeLog        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-10-30 Brady Eidson <beidson@apple.com>
+
+ Modern IDB: IDBObjectStore.clear() support.
+ https://bugs.webkit.org/show_bug.cgi?id=150733
+
+ Reviewed by Alex Christensen.
+
+ * storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt: Added.
+ * storage/indexeddb/modern/idbobjectstore-clear-1.html: Added.
+ * storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt: Added.
+ * storage/indexeddb/modern/idbobjectstore-clear-2.html: Added.
+ * storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt: Added.
+ * storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html: Added.
+
</ins><span class="cx"> 2015-10-30 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Marking imported/w3c/web-platform-tests/XMLHttpRequest/send-timeout-events.htm as flaky on win
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt (0 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+ALERT: Initial upgrade needed: Old version - 0 New version - 1
+ALERT: Initial upgrade versionchange transaction complete
+ALERT: Success opening database connection - Starting readwrite transaction
+ALERT: Value gotten was bar1
+ALERT: Value gotten was bar2
+ALERT: Value gotten was bar3
+ALERT: Value gotten was bar4
+ALERT: Value gotten was bar5
+ALERT: Value gotten was bar6
+ALERT: Value gotten was bar7
+ALERT: Value gotten was bar8
+ALERT: Value gotten was bar9
+ALERT: Object store cleared
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Readwrite transaction complete
+ALERT: Done
+This test creates an object store then populates it.
+It then clears it and makes sure it has nothing left in it.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html (0 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -0,0 +1,111 @@
</span><ins>+This test creates an object store then populates it.<br>
+It then clears it and makes sure it has nothing left in it.<br>
+<script>
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+
+function done()
+{
+ alert("Done");
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+var createRequest = window.indexedDB.open("IDBObjectStoreClearDatabase", 1);
+
+createRequest.onupgradeneeded = function(event) {
+ alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ var versionTransaction = createRequest.transaction;
+ var database = event.target.result;
+ var objectStore = database.createObjectStore("TestObjectStore", { autoIncrement: true });
+ var request = objectStore.put("bar1");
+ var request = objectStore.put("bar2");
+ var request = objectStore.put("bar3");
+ var request = objectStore.put("bar4");
+ var request = objectStore.put("bar5");
+ var request = objectStore.put("bar6");
+ var request = objectStore.put("bar7");
+ var request = objectStore.put("bar8");
+ var request = objectStore.put("bar9");
+
+ versionTransaction.onabort = function(event) {
+ alert("Initial upgrade versionchange transaction unexpected aborted");
+ done();
+ }
+
+ versionTransaction.oncomplete = function(event) {
+ alert("Initial upgrade versionchange transaction complete");
+ continueTest1();
+ database.close();
+ }
+
+ versionTransaction.onerror = function(event) {
+ alert("Initial upgrade versionchange transaction unexpected error" + event);
+ done();
+ }
+}
+
+function getChecker(event) {
+ alert("Value gotten was " + event.target.result);
+}
+
+function continueTest1()
+{
+ var openRequest = window.indexedDB.open("IDBObjectStoreClearDatabase", 1);
+
+ openRequest.onerror = function(event) {
+ alert("Request unexpected error - " + event);
+ done();
+ }
+ openRequest.onblocked = function(event) {
+ alert("Request unexpected blocked - " + event);
+ done();
+ }
+ openRequest.onupgradeneeded = function(event) {
+ alert("Request unexpected upgradeneeded - " + event);
+ done();
+ }
+
+ openRequest.onsuccess = function(event) {
+ alert("Success opening database connection - Starting readwrite transaction");
+ var database = event.target.result;
+ var transaction = database.transaction("TestObjectStore", "readwrite");
+ var objectStore = transaction.objectStore("TestObjectStore");
+
+ var request;
+ for (var i = 1; i <= 9; ++i) {
+ request = objectStore.get(i);
+ request.onsuccess = getChecker;
+ }
+
+ request = objectStore.clear();
+ request.onsuccess = function() {
+ alert("Object store cleared");
+ var newRequests;
+ for (var i = 1; i <= 9; ++i) {
+ newRequests = objectStore.get(i);
+ newRequests.onsuccess = getChecker;
+ }
+ }
+
+ transaction.onabort = function(event) {
+ alert("Readwrite transaction unexpected abort");
+ done();
+ }
+
+ transaction.oncomplete = function(event) {
+ alert("Readwrite transaction complete");
+ done();
+ }
+
+ transaction.onerror = function(event) {
+ alert("Readwrite transaction unexpected error - " + event);
+ done();
+ }
+ }
+}
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt (0 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+ALERT: Initial upgrade needed: Old version - 0 New version - 1
+ALERT: Initial upgrade versionchange transaction complete
+ALERT: Success opening database connection - Starting readwrite transaction
+ALERT: Value gotten was bar1
+ALERT: Value gotten was bar2
+ALERT: Value gotten was bar3
+ALERT: Value gotten was bar4
+ALERT: Value gotten was bar5
+ALERT: Value gotten was bar6
+ALERT: Value gotten was bar7
+ALERT: Value gotten was bar8
+ALERT: Value gotten was bar9
+ALERT: Object store cleared, making sure its all gone.
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Value gotten was undefined
+ALERT: Readwrite transaction abort
+ALERT: Success opening database connection - Starting final transaction
+ALERT: Value gotten was bar1
+ALERT: Value gotten was bar2
+ALERT: Value gotten was bar3
+ALERT: Value gotten was bar4
+ALERT: Value gotten was bar5
+ALERT: Value gotten was bar6
+ALERT: Value gotten was bar7
+ALERT: Value gotten was bar8
+ALERT: Value gotten was bar9
+ALERT: Readwrite transaction complete
+ALERT: Done
+This test creates an object store then populates it, then commits that transaction.
+It then clears it, but aborts that transaction.
+Finally it checks to make sure everything from step 1 is still in there.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html (0 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -0,0 +1,167 @@
</span><ins>+This test creates an object store then populates it, then commits that transaction.<br>
+It then clears it, but aborts that transaction.<br>
+Finally it checks to make sure everything from step 1 is still in there.<br>
+<script>
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+
+function done()
+{
+ alert("Done");
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+var createRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
+
+createRequest.onupgradeneeded = function(event) {
+ alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ var versionTransaction = createRequest.transaction;
+ var database = event.target.result;
+ var objectStore = database.createObjectStore("TestObjectStore", { autoIncrement: true });
+ var request = objectStore.put("bar1");
+ var request = objectStore.put("bar2");
+ var request = objectStore.put("bar3");
+ var request = objectStore.put("bar4");
+ var request = objectStore.put("bar5");
+ var request = objectStore.put("bar6");
+ var request = objectStore.put("bar7");
+ var request = objectStore.put("bar8");
+ var request = objectStore.put("bar9");
+
+ versionTransaction.onabort = function(event) {
+ alert("Initial upgrade versionchange transaction unexpected aborted");
+ done();
+ }
+
+ versionTransaction.oncomplete = function(event) {
+ alert("Initial upgrade versionchange transaction complete");
+ continueTest1();
+ database.close();
+ }
+
+ versionTransaction.onerror = function(event) {
+ alert("Initial upgrade versionchange transaction unexpected error" + event);
+ done();
+ }
+}
+
+function getChecker(event) {
+ alert("Value gotten was " + event.target.result);
+}
+
+function continueTest1()
+{
+ var openRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
+
+ openRequest.onerror = function(event) {
+ alert("Request unexpected error - " + event);
+ done();
+ }
+ openRequest.onblocked = function(event) {
+ alert("Request unexpected blocked - " + event);
+ done();
+ }
+ openRequest.onupgradeneeded = function(event) {
+ alert("Request unexpected upgradeneeded - " + event);
+ done();
+ }
+
+ openRequest.onsuccess = function(event) {
+ alert("Success opening database connection - Starting readwrite transaction");
+ var database = event.target.result;
+ var transaction = database.transaction("TestObjectStore", "readwrite");
+ var objectStore = transaction.objectStore("TestObjectStore");
+
+ var request;
+ for (var i = 1; i <= 9; ++i) {
+ request = objectStore.get(i);
+ request.onsuccess = getChecker;
+ }
+
+ request = objectStore.clear();
+ request.onsuccess = function() {
+ alert("Object store cleared, making sure its all gone.");
+ var newRequests;
+ for (var i = 1; i <= 9; ++i) {
+ newRequests = objectStore.get(i);
+ newRequests.onsuccess = getChecker;
+ }
+
+ // We'll be on the last request here, can just override it.
+ newRequests.onsuccess = function(event) {
+ getChecker(event);
+ transaction.abort();
+ }
+ }
+
+ // Just for fun clear it twice, won't change anything
+ objectStore.clear();
+
+ transaction.onabort = function(event) {
+ alert("Readwrite transaction abort");
+ continueTest2();
+ }
+
+ transaction.oncomplete = function(event) {
+ alert("Readwrite transaction unexpected complete");
+ done();
+ }
+
+ transaction.onerror = function(event) {
+ alert("Readwrite transaction unexpected error - " + event);
+ done();
+ }
+ }
+}
+
+function continueTest2()
+{
+ var openRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
+
+ openRequest.onerror = function(event) {
+ alert("Request unexpected error - " + event);
+ done();
+ }
+ openRequest.onblocked = function(event) {
+ alert("Request unexpected blocked - " + event);
+ done();
+ }
+ openRequest.onupgradeneeded = function(event) {
+ alert("Request unexpected upgradeneeded - " + event);
+ done();
+ }
+
+ openRequest.onsuccess = function(event) {
+ alert("Success opening database connection - Starting final transaction");
+ var database = event.target.result;
+ var transaction = database.transaction("TestObjectStore", "readwrite");
+ var objectStore = transaction.objectStore("TestObjectStore");
+
+ var request;
+ for (var i = 1; i <= 9; ++i) {
+ request = objectStore.get(i);
+ request.onsuccess = getChecker;
+ }
+
+ transaction.onabort = function(event) {
+ alert("Readwrite transaction unexpected abort");
+ done();
+ }
+
+ transaction.oncomplete = function(event) {
+ alert("Readwrite transaction complete");
+ done();
+ }
+
+ transaction.onerror = function(event) {
+ alert("Readwrite transaction unexpected error - " + event);
+ done();
+ }
+ }
+}
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailuresexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt (0 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+ALERT: Initial upgrade needed: Old version - 0 New version - 1
+ALERT: Failed to put record into object store with an invalid key
+ALERT: Failed to put record into object store that has been deleted
+ALERT: Failed to clear object store that has been deleted
+ALERT: Initial upgrade versionchange transaction complete
+ALERT: Failed to clear object store in read-only transaction
+ALERT: Failed to put record into object store with inactive transaction
+ALERT: Failed to clear object store with inactive transaction
+ALERT: readwrite transaction complete
+ALERT: Done
+This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailureshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html (0 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -0,0 +1,119 @@
</span><ins>+This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().
+<script>
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+
+function done()
+{
+ alert("Done");
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+var createRequest = window.indexedDB.open("IDBObjectStorePutAndClearFailuresDatabase", 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+ alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ var versionTransaction = createRequest.transaction;
+ database = event.target.result;
+ var objectStore = database.createObjectStore("TestObjectStore");
+ var request = objectStore.put("bar", "foo");
+
+ request.onsuccess = function() {
+ try {
+ objectStore.put("bar", NaN);
+ } catch(e) {
+ alert("Failed to put record into object store with an invalid key");
+ }
+
+ database.deleteObjectStore("TestObjectStore");
+
+ try {
+ objectStore.put("bar", "foo");
+ } catch(e) {
+ alert("Failed to put record into object store that has been deleted");
+ }
+
+ try {
+ objectStore.clear();
+ } catch(e) {
+ alert("Failed to clear object store that has been deleted");
+ }
+
+ // Recreate the objectstore because we'll need it in phase 2.
+ var objectStore = database.createObjectStore("TestObjectStore");
+ objectStore.put("bar", "foo");
+ }
+
+ versionTransaction.onabort = function(event) {
+ alert("Initial upgrade versionchange transaction unexpected aborted");
+ done();
+ }
+
+ versionTransaction.oncomplete = function(event) {
+ alert("Initial upgrade versionchange transaction complete");
+ continueTest1();
+ }
+
+ versionTransaction.onerror = function(event) {
+ alert("Initial upgrade versionchange transaction unexpected error" + event);
+ done();
+ }
+}
+
+function continueTest1()
+{
+ var transaction = database.transaction("TestObjectStore", "readonly");
+ var objectStore = transaction.objectStore("TestObjectStore");
+
+ try {
+ objectStore.clear();
+ } catch(e) {
+ alert("Failed to clear object store in read-only transaction");
+ }
+
+ var transaction = database.transaction("TestObjectStore", "readwrite");
+ var objectStore = transaction.objectStore("TestObjectStore");
+
+ // Queue up a whole bunch of gets to keep the transaction alive for awhile
+ for (var i = 0; i < 10; ++i)
+ objectStore.get("foo");
+
+ var testWhileInactive = function() {
+ try {
+ objectStore.put("bar", "foo");
+ } catch(e) {
+ alert("Failed to put record into object store with inactive transaction");
+ }
+
+ try {
+ objectStore.clear();
+ } catch(e) {
+ alert("Failed to clear object store with inactive transaction");
+ }
+ }
+
+ setTimeout(testWhileInactive, 0);
+
+ transaction.onabort = function(event) {
+ alert("readwrite transaction unexpected abort" + event);
+ done();
+ }
+
+ transaction.oncomplete = function(event) {
+ alert("readwrite transaction complete");
+ done();
+ }
+
+ transaction.onerror = function(event) {
+ alert("readwrite transaction unexpected error" + event);
+ done();
+ }
+}
+
+</script>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/ChangeLog        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -1,3 +1,82 @@
</span><ins>+2015-10-30 Brady Eidson <beidson@apple.com>
+
+ Modern IDB: IDBObjectStore.clear() support.
+ https://bugs.webkit.org/show_bug.cgi?id=150733
+
+ Reviewed by Alex Christensen.
+
+ Tests: storage/indexeddb/modern/idbobjectstore-clear-1.html
+ storage/indexeddb/modern/idbobjectstore-clear-2.html
+
+ * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+ (WebCore::IDBClient::IDBConnectionToServer::clearObjectStore):
+ (WebCore::IDBClient::IDBConnectionToServer::didClearObjectStore):
+ * Modules/indexeddb/client/IDBConnectionToServer.h:
+ * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
+
+ * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
+ (WebCore::IDBClient::IDBObjectStore::clear):
+
+ * Modules/indexeddb/client/IDBRequestImpl.cpp:
+ (WebCore::IDBClient::IDBRequest::setResultToUndefined):
+ * Modules/indexeddb/client/IDBRequestImpl.h:
+
+ * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+ (WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
+ (WebCore::IDBClient::IDBTransaction::clearObjectStoreOnServer):
+ (WebCore::IDBClient::IDBTransaction::didClearObjectStoreOnServer):
+ * Modules/indexeddb/client/IDBTransactionImpl.h:
+
+ * Modules/indexeddb/server/IDBBackingStore.h:
+
+ * Modules/indexeddb/server/IDBConnectionToClient.cpp:
+ (WebCore::IDBServer::IDBConnectionToClient::didClearObjectStore):
+ * Modules/indexeddb/server/IDBConnectionToClient.h:
+ * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
+
+ * Modules/indexeddb/server/IDBServer.cpp:
+ (WebCore::IDBServer::IDBServer::clearObjectStore):
+ * Modules/indexeddb/server/IDBServer.h:
+
+ * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
+ (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
+ (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
+ (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
+ * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
+ (WebCore::IDBServer::MemoryBackingStoreTransaction::isAborting):
+
+ * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+ (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
+ * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+
+ * Modules/indexeddb/server/MemoryObjectStore.cpp:
+ (WebCore::IDBServer::MemoryObjectStore::clear):
+ (WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
+ * Modules/indexeddb/server/MemoryObjectStore.h:
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
+ (WebCore::IDBServer::UniqueIDBDatabase::performClearObjectStore):
+ (WebCore::IDBServer::UniqueIDBDatabase::didPerformClearObjectStore):
+ * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
+ * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didClearObjectStore):
+ * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
+
+ * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
+ * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
+
+ * Modules/indexeddb/shared/IDBResultData.cpp:
+ (WebCore::IDBResultData::clearObjectStoreSuccess):
+ * Modules/indexeddb/shared/IDBResultData.h:
+
+ * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+ (WebCore::InProcessIDBServer::didClearObjectStore):
+ (WebCore::InProcessIDBServer::clearObjectStore):
+ * Modules/indexeddb/shared/InProcessIDBServer.h:
+
</ins><span class="cx"> 2015-10-30 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> CSSParserVariable leaks seen on leaks bots
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -124,6 +124,21 @@
</span><span class="cx"> completeOperation(resultData);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBConnectionToServer::clearObjectStore(TransactionOperation& operation, uint64_t objectStoreIdentifier)
+{
+ LOG(IndexedDB, "IDBConnectionToServer::clearObjectStore");
+
+ saveOperation(operation);
+
+ m_delegate->clearObjectStore(IDBRequestData(operation), objectStoreIdentifier);
+}
+
+void IDBConnectionToServer::didClearObjectStore(const IDBResultData& resultData)
+{
+ LOG(IndexedDB, "IDBConnectionToServer::didClearObjectStore");
+ completeOperation(resultData);
+}
+
</ins><span class="cx"> void IDBConnectionToServer::putOrAdd(TransactionOperation& operation, RefPtr<IDBKey>& key, RefPtr<SerializedScriptValue>& value, const IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBConnectionToServer::putOrAdd");
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -67,6 +67,9 @@
</span><span class="cx"> void deleteObjectStore(TransactionOperation&, const String& objectStoreName);
</span><span class="cx"> void didDeleteObjectStore(const IDBResultData&);
</span><span class="cx">
</span><ins>+ void clearObjectStore(TransactionOperation&, uint64_t objectStoreIdentifier);
+ void didClearObjectStore(const IDBResultData&);
+
</ins><span class="cx"> void putOrAdd(TransactionOperation&, RefPtr<IDBKey>&, RefPtr<SerializedScriptValue>&, const IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx"> void didPutOrAdd(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 (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx"> virtual void commitTransaction(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 clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier) = 0;
</ins><span class="cx"> virtual void putOrAdd(const IDBRequestData&, IDBKey*, SerializedScriptValue&, const IndexedDB::ObjectStoreOverwriteMode) = 0;
</span><span class="cx"> virtual void getRecord(const IDBRequestData&, IDBKey*) = 0;
</span><span class="cx"> virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -260,9 +260,27 @@
</span><span class="cx"> RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::clear(ScriptExecutionContext*, ExceptionCode&)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::clear(ScriptExecutionContext* context, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- RELEASE_ASSERT_NOT_REACHED();
</del><ins>+ LOG(IndexedDB, "IDBObjectStore::clear");
+
+ if (m_transaction->isReadOnly()) {
+ ec = static_cast<ExceptionCode>(IDBExceptionCode::ReadOnlyError);
+ return nullptr;
+ }
+
+ if (!m_transaction->isActive()) {
+ ec = static_cast<ExceptionCode>(IDBExceptionCode::TransactionInactiveError);
+ return nullptr;
+ }
+
+ if (m_deleted) {
+ ec = static_cast<ExceptionCode>(IDBExceptionCode::InvalidStateError);
+ return nullptr;
+ }
+
+ Ref<IDBRequest> request = m_transaction->requestClearObjectStore(*context, *this);
+ return adoptRef(request.leakRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<WebCore::IDBIndex> IDBObjectStore::createIndex(ScriptExecutionContext*, const String&, const IDBKeyPath&, bool, bool, ExceptionCode&)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><ins>+#include "DOMRequestState.h"
</ins><span class="cx"> #include "EventQueue.h"
</span><span class="cx"> #include "IDBBindingUtilities.h"
</span><span class="cx"> #include "IDBEventDispatcher.h"
</span><span class="lines">@@ -191,6 +192,17 @@
</span><span class="cx"> m_result = IDBAny::create(WTF::move(value));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBRequest::setResultToUndefined()
+{
+ auto context = scriptExecutionContext();
+ if (!context)
+ return;
+
+ DOMRequestState state(context);
+ if (auto* execState = state.exec())
+ m_result = IDBAny::create(Deprecated::ScriptValue(execState->vm(), JSC::jsUndefined()));
+}
+
</ins><span class="cx"> void IDBRequest::requestCompleted(const IDBResultData& resultData)
</span><span class="cx"> {
</span><span class="cx"> m_idbError = resultData.error();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx">
</span><span class="cx"> void setResult(const IDBKeyData*);
</span><span class="cx"> void setResultToStructuredClone(const ThreadSafeDataBuffer&);
</span><ins>+ void setResultToUndefined();
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> IDBRequest(IDBConnectionToServer&, ScriptExecutionContext*);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -414,6 +414,35 @@
</span><span class="cx"> request.requestCompleted(resultData);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+Ref<IDBRequest> IDBTransaction::requestClearObjectStore(ScriptExecutionContext& context, IDBObjectStore& objectStore)
+{
+ LOG(IndexedDB, "IDBTransaction::requestClearObjectStore");
+ ASSERT(isActive());
+
+ Ref<IDBRequest> request = IDBRequest::create(context, objectStore, *this);
+
+ uint64_t objectStoreIdentifier = objectStore.info().identifier();
+ auto operation = createTransactionOperation(*this, request.get(), &IDBTransaction::didClearObjectStoreOnServer, &IDBTransaction::clearObjectStoreOnServer, objectStoreIdentifier);
+ scheduleOperation(WTF::move(operation));
+
+ return WTF::move(request);
+}
+
+void IDBTransaction::clearObjectStoreOnServer(TransactionOperation& operation, const uint64_t& objectStoreIdentifier)
+{
+ LOG(IndexedDB, "IDBTransaction::clearObjectStoreOnServer");
+
+ serverConnection().clearObjectStore(operation, objectStoreIdentifier);
+}
+
+void IDBTransaction::didClearObjectStoreOnServer(IDBRequest& request, const IDBResultData& resultData)
+{
+ LOG(IndexedDB, "IDBTransaction::didClearObjectStoreOnServer");
+
+ request.setResultToUndefined();
+ request.requestCompleted(resultData);
+}
+
</ins><span class="cx"> Ref<IDBRequest> IDBTransaction::requestPutOrAdd(ScriptExecutionContext& context, IDBObjectStore& objectStore, IDBKey* key, SerializedScriptValue& value, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::requestPutOrAdd");
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -89,6 +89,7 @@
</span><span class="cx">
</span><span class="cx"> Ref<IDBRequest> requestPutOrAdd(ScriptExecutionContext&, IDBObjectStore&, IDBKey*, SerializedScriptValue&, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx"> Ref<IDBRequest> requestGetRecord(ScriptExecutionContext&, IDBObjectStore&, IDBKey&);
</span><ins>+ Ref<IDBRequest> requestClearObjectStore(ScriptExecutionContext&, IDBObjectStore&);
</ins><span class="cx">
</span><span class="cx"> void deleteObjectStore(const String& objectStoreName);
</span><span class="cx">
</span><span class="lines">@@ -121,6 +122,9 @@
</span><span class="cx"> void createObjectStoreOnServer(TransactionOperation&, const IDBObjectStoreInfo&);
</span><span class="cx"> void didCreateObjectStoreOnServer(const IDBResultData&);
</span><span class="cx">
</span><ins>+ void clearObjectStoreOnServer(TransactionOperation&, const uint64_t& objectStoreIdentifier);
+ void didClearObjectStoreOnServer(IDBRequest&, const IDBResultData&);
+
</ins><span class="cx"> void putOrAddOnServer(TransactionOperation&, RefPtr<IDBKey>, RefPtr<SerializedScriptValue>, const IndexedDB::ObjectStoreOverwriteMode&);
</span><span class="cx"> void didPutOrAddOnServer(IDBRequest&, const IDBResultData&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -53,6 +53,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, const String& objectStoreName) = 0;
</span><ins>+ virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</ins><span class="cx"> virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, bool& keyExists) = 0;
</span><span class="cx"> virtual IDBError deleteRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&) = 0;
</span><span class="cx"> virtual IDBError putRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, const ThreadSafeDataBuffer& value) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</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::didClearObjectStore(const IDBResultData& result)
+{
+ m_delegate->didClearObjectStore(result);
+}
+
</ins><span class="cx"> void IDBConnectionToClient::didPutOrAdd(const IDBResultData& result)
</span><span class="cx"> {
</span><span class="cx"> m_delegate->didPutOrAdd(result);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -54,6 +54,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 didClearObjectStore(const IDBResultData&);
</ins><span class="cx"> void didPutOrAdd(const IDBResultData&);
</span><span class="cx"> void didGetRecord(const IDBResultData&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -50,6 +50,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 didClearObjectStore(const IDBResultData&) = 0;
</ins><span class="cx"> virtual void didPutOrAdd(const IDBResultData&) = 0;
</span><span class="cx"> virtual void didGetRecord(const IDBResultData&) = 0;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -180,6 +180,17 @@
</span><span class="cx"> transaction->deleteObjectStore(requestData, objectStoreName);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier)
+{
+ LOG(IndexedDB, "IDBServer::clearObjectStore");
+
+ auto transaction = m_transactions.get(requestData.transactionIdentifier());
+ if (!transaction)
+ return;
+
+ transaction->clearObjectStore(requestData, objectStoreIdentifier);
+}
+
</ins><span class="cx"> void IDBServer::putOrAdd(const IDBRequestData& requestData, const IDBKeyData& keyData, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBServer::putOrAdd");
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx"> void commitTransaction(const IDBResourceIdentifier&);
</span><span class="cx"> void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&);
</span><span class="cx"> void deleteObjectStore(const IDBRequestData&, const String& objectStoreName);
</span><ins>+ void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
</ins><span class="cx"> void putOrAdd(const IDBRequestData&, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx"> void getRecord(const IDBRequestData&, const IDBKeyData&);
</span><span class="cx"> void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -90,6 +90,27 @@
</span><span class="cx"> addResult.iterator->value = WTF::move(objectStore);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void MemoryBackingStoreTransaction::objectStoreCleared(MemoryObjectStore& objectStore, std::unique_ptr<KeyValueMap>&& keyValueMap)
+{
+ ASSERT(m_objectStores.contains(&objectStore));
+
+ auto addResult = m_clearedKeyValueMaps.add(&objectStore, nullptr);
+
+ // If this object store has already been cleared during this transaction, we don't need to remember this clearing.
+ if (!addResult.isNewEntry)
+ return;
+
+ // If values had previously been changed during this transaction, fold those changes back into the
+ // cleared key-value map now, so we have exactly the map that will need to be restored if the transaction is aborted.
+ auto originalValues = m_originalValues.take(&objectStore);
+ if (originalValues) {
+ for (auto iterator : *originalValues)
+ keyValueMap->set(iterator.key, iterator.value);
+ }
+
+ addResult.iterator->value = WTF::move(keyValueMap);
+}
+
</ins><span class="cx"> void MemoryBackingStoreTransaction::recordValueChanged(MemoryObjectStore& objectStore, const IDBKeyData& key)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_objectStores.contains(&objectStore));
</span><span class="lines">@@ -97,6 +118,11 @@
</span><span class="cx"> if (m_isAborting)
</span><span class="cx"> return;
</span><span class="cx">
</span><ins>+ // If this object store had been cleared during the transaction, no point in recording this
+ // individual key/value change as its entire key/value map will be restored upon abort.
+ if (m_clearedKeyValueMaps.contains(&objectStore))
+ return;
+
</ins><span class="cx"> auto originalAddResult = m_originalValues.add(&objectStore, nullptr);
</span><span class="cx"> if (originalAddResult.isNewEntry)
</span><span class="cx"> originalAddResult.iterator->value = std::make_unique<KeyValueMap>();
</span><span class="lines">@@ -138,7 +164,13 @@
</span><span class="cx"> ASSERT(m_originalKeyGenerators.contains(objectStore));
</span><span class="cx"> objectStore->setKeyGeneratorValue(m_originalKeyGenerators.get(objectStore));
</span><span class="cx">
</span><del>- auto keyValueMap = m_originalValues.get(objectStore);
</del><ins>+ auto clearedKeyValueMap = m_clearedKeyValueMaps.take(objectStore);
+ if (clearedKeyValueMap) {
+ objectStore->replaceKeyValueStore(WTF::move(clearedKeyValueMap));
+ continue;
+ }
+
+ auto keyValueMap = m_originalValues.take(objectStore);
</ins><span class="cx"> if (!keyValueMap)
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -146,8 +178,6 @@
</span><span class="cx"> objectStore->deleteRecord(entry.key);
</span><span class="cx"> objectStore->setKeyValue(entry.key, entry.value);
</span><span class="cx"> }
</span><del>-
- m_originalValues.remove(objectStore);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> finish();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx">
</span><span class="cx"> bool isVersionChange() const { return m_info.mode() == IndexedDB::TransactionMode::VersionChange; }
</span><span class="cx"> bool isWriting() const { return m_info.mode() != IndexedDB::TransactionMode::ReadOnly; }
</span><ins>+ bool isAborting() const { return m_isAborting; }
</ins><span class="cx">
</span><span class="cx"> const IDBDatabaseInfo& originalDatabaseInfo() const;
</span><span class="cx">
</span><span class="lines">@@ -59,6 +60,7 @@
</span><span class="cx"> void addExistingObjectStore(MemoryObjectStore&);
</span><span class="cx"> void recordValueChanged(MemoryObjectStore&, const IDBKeyData&);
</span><span class="cx"> void objectStoreDeleted(std::unique_ptr<MemoryObjectStore>);
</span><ins>+ void objectStoreCleared(MemoryObjectStore&, std::unique_ptr<KeyValueMap>&&);
</ins><span class="cx">
</span><span class="cx"> void abort();
</span><span class="cx"> void commit();
</span><span class="lines">@@ -82,7 +84,7 @@
</span><span class="cx"> HashMap<MemoryObjectStore*, uint64_t> m_originalKeyGenerators;
</span><span class="cx"> HashMap<String, std::unique_ptr<MemoryObjectStore>> m_deletedObjectStores;
</span><span class="cx"> HashMap<MemoryObjectStore*, std::unique_ptr<KeyValueMap>> m_originalValues;
</span><del>-
</del><ins>+ HashMap<MemoryObjectStore*, std::unique_ptr<KeyValueMap>> m_clearedKeyValueMaps;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace IDBServer
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -161,6 +161,27 @@
</span><span class="cx"> return IDBError();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+IDBError MemoryIDBBackingStore::clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier)
+{
+ LOG(IndexedDB, "MemoryIDBBackingStore::clearObjectStore");
+ ASSERT(objectStoreIdentifier);
+
+ ASSERT_UNUSED(transactionIdentifier, m_transactions.contains(transactionIdentifier));
+
+#ifndef NDEBUG
+ auto transaction = m_transactions.get(transactionIdentifier);
+ ASSERT(transaction->isWriting());
+#endif
+
+ auto objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier);
+ if (!objectStore)
+ return IDBError(IDBExceptionCode::ConstraintError);
+
+ objectStore->clear();
+
+ return IDBError();
+}
+
</ins><span class="cx"> void MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort(MemoryObjectStore& objectStore)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort");
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> virtual IDBError commitTransaction(const IDBResourceIdentifier& transactionIdentifier) override final;
</span><span class="cx"> virtual IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) override final;
</span><span class="cx"> virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, const String& objectStoreName) override final;
</span><ins>+ virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</ins><span class="cx"> virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, bool& keyExists) override final;
</span><span class="cx"> virtual IDBError deleteRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&) override final;
</span><span class="cx"> virtual IDBError putRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, const ThreadSafeDataBuffer& value) override final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -73,6 +73,22 @@
</span><span class="cx"> return m_keyValueStore->contains(key);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void MemoryObjectStore::clear()
+{
+ LOG(IndexedDB, "MemoryObjectStore::clear");
+ ASSERT(m_writeTransaction);
+
+ m_writeTransaction->objectStoreCleared(*this, WTF::move(m_keyValueStore));
+}
+
+void MemoryObjectStore::replaceKeyValueStore(std::unique_ptr<KeyValueMap>&& store)
+{
+ ASSERT(m_writeTransaction);
+ ASSERT(m_writeTransaction->isAborting());
+
+ m_keyValueStore = WTF::move(store);
+}
+
</ins><span class="cx"> void MemoryObjectStore::deleteRecord(const IDBKeyData& key)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "MemoryObjectStore::deleteRecord");
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -63,6 +63,9 @@
</span><span class="cx"> uint64_t currentKeyGeneratorValue() const { return m_keyGeneratorValue; }
</span><span class="cx"> void setKeyGeneratorValue(uint64_t value) { m_keyGeneratorValue = value; }
</span><span class="cx">
</span><ins>+ void clear();
+ void replaceKeyValueStore(std::unique_ptr<KeyValueMap>&&);
+
</ins><span class="cx"> ThreadSafeDataBuffer valueForKey(const IDBKeyData&) const;
</span><span class="cx">
</span><span class="cx"> const IDBObjectStoreInfo& info() const { return m_info; }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -296,6 +296,35 @@
</span><span class="cx"> performErrorCallback(callbackIdentifier, error);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void UniqueIDBDatabase::clearObjectStore(UniqueIDBDatabaseTransaction& transaction, uint64_t objectStoreIdentifier, ErrorCallback callback)
+{
+ ASSERT(isMainThread());
+ LOG(IndexedDB, "(main) UniqueIDBDatabase::clearObjectStore");
+
+ uint64_t callbackID = storeCallback(callback);
+ m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performClearObjectStore, callbackID, transaction.info().identifier(), objectStoreIdentifier));
+}
+
+void UniqueIDBDatabase::performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier)
+{
+ ASSERT(!isMainThread());
+ LOG(IndexedDB, "(db) UniqueIDBDatabase::performClearObjectStore");
+
+ ASSERT(m_backingStore);
+ m_backingStore->clearObjectStore(transactionIdentifier, objectStoreIdentifier);
+
+ IDBError error;
+ m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformClearObjectStore, callbackIdentifier, error));
+}
+
+void UniqueIDBDatabase::didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError& error)
+{
+ ASSERT(isMainThread());
+ LOG(IndexedDB, "(main) UniqueIDBDatabase::didPerformClearObjectStore");
+
+ performErrorCallback(callbackIdentifier, error);
+}
+
</ins><span class="cx"> void UniqueIDBDatabase::putOrAdd(const IDBRequestData& requestData, const IDBKeyData& keyData, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode overwriteMode, KeyDataCallback 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 (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -71,6 +71,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 clearObjectStore(UniqueIDBDatabaseTransaction&, uint64_t objectStoreIdentifier, ErrorCallback);
</ins><span class="cx"> void putOrAdd(const IDBRequestData&, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode, KeyDataCallback);
</span><span class="cx"> void getRecord(const IDBRequestData&, const IDBKeyData&, ValueDataCallback);
</span><span class="cx"> void commitTransaction(UniqueIDBDatabaseTransaction&, ErrorCallback);
</span><span class="lines">@@ -100,6 +101,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, const String& objectStoreName);
</span><ins>+ void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier);
</ins><span class="cx"> void performPutOrAdd(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx"> void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&);
</span><span class="cx"> void performActivateTransactionInBackingStore(uint64_t callbackIdentifier, const IDBTransactionInfo&);
</span><span class="lines">@@ -108,6 +110,7 @@
</span><span class="cx"> void didOpenBackingStore(const IDBDatabaseInfo&);
</span><span class="cx"> void didPerformCreateObjectStore(uint64_t callbackIdentifier, const IDBError&, const IDBObjectStoreInfo&);
</span><span class="cx"> void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&, const String& objectStoreName);
</span><ins>+ void didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError&);
</ins><span class="cx"> void didPerformPutOrAdd(uint64_t callbackIdentifier, const IDBError&, const IDBKeyData&);
</span><span class="cx"> void didPerformGetRecord(uint64_t callbackIdentifier, const IDBError&, const ThreadSafeDataBuffer&);
</span><span class="cx"> void didPerformCommitTransaction(uint64_t callbackIdentifier, const IDBError&, const IDBResourceIdentifier& transactionIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -146,6 +146,13 @@
</span><span class="cx"> m_connectionToClient.didDeleteObjectStore(resultData);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void UniqueIDBDatabaseConnection::didClearObjectStore(const IDBResultData& resultData)
+{
+ LOG(IndexedDB, "UniqueIDBDatabaseConnection::didClearObjectStore");
+
+ m_connectionToClient.didClearObjectStore(resultData);
+}
+
</ins><span class="cx"> } // namespace IDBServer
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -68,6 +68,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 didClearObjectStore(const IDBResultData&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> UniqueIDBDatabaseConnection(UniqueIDBDatabase&, IDBConnectionToClient&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -130,7 +130,22 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void UniqueIDBDatabaseTransaction::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier)
+{
+ LOG(IndexedDB, "UniqueIDBDatabaseTransaction::clearObjectStore");
</ins><span class="cx">
</span><ins>+ ASSERT(m_transactionInfo.identifier() == requestData.transactionIdentifier());
+
+ RefPtr<UniqueIDBDatabaseTransaction> self(this);
+ m_databaseConnection->database().clearObjectStore(*this, objectStoreIdentifier, [this, self, requestData](const IDBError& error) {
+ LOG(IndexedDB, "UniqueIDBDatabaseTransaction::clearObjectStore (callback)");
+ if (error.isNull())
+ m_databaseConnection->didClearObjectStore(IDBResultData::clearObjectStoreSuccess(requestData.requestIdentifier()));
+ else
+ m_databaseConnection->didClearObjectStore(IDBResultData::error(requestData.requestIdentifier(), error));
+ });
+}
+
</ins><span class="cx"> void UniqueIDBDatabaseTransaction::putOrAdd(const IDBRequestData& requestData, const IDBKeyData& keyData, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "UniqueIDBDatabaseTransaction::putOrAdd");
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -64,6 +64,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 clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
</ins><span class="cx"> void putOrAdd(const IDBRequestData&, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx"> void getRecord(const IDBRequestData&, const IDBKeyData&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResultDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -98,6 +98,11 @@
</span><span class="cx"> return { IDBResultType::DeleteObjectStoreSuccess, requestIdentifier };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+IDBResultData IDBResultData::clearObjectStoreSuccess(const IDBResourceIdentifier& requestIdentifier)
+{
+ return { IDBResultType::ClearObjectStoreSuccess, requestIdentifier };
+}
+
</ins><span class="cx"> IDBResultData IDBResultData::putOrAddSuccess(const IDBResourceIdentifier& requestIdentifier, const IDBKeyData& resultKey)
</span><span class="cx"> {
</span><span class="cx"> IDBResultData result(IDBResultType::PutOrAddSuccess, requestIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResultDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> OpenDatabaseUpgradeNeeded,
</span><span class="cx"> CreateObjectStoreSuccess,
</span><span class="cx"> DeleteObjectStoreSuccess,
</span><ins>+ ClearObjectStoreSuccess,
</ins><span class="cx"> PutOrAddSuccess,
</span><span class="cx"> GetRecordSuccess,
</span><span class="cx"> };
</span><span class="lines">@@ -62,6 +63,7 @@
</span><span class="cx"> static IDBResultData openDatabaseUpgradeNeeded(const IDBResourceIdentifier&, IDBServer::UniqueIDBDatabaseTransaction&);
</span><span class="cx"> static IDBResultData createObjectStoreSuccess(const IDBResourceIdentifier&);
</span><span class="cx"> static IDBResultData deleteObjectStoreSuccess(const IDBResourceIdentifier&);
</span><ins>+ static IDBResultData clearObjectStoreSuccess(const IDBResourceIdentifier&);
</ins><span class="cx"> static IDBResultData putOrAddSuccess(const IDBResourceIdentifier&, const IDBKeyData&);
</span><span class="cx"> static IDBResultData getRecordSuccess(const IDBResourceIdentifier&, const ThreadSafeDataBuffer& valueData);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -135,6 +135,14 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void InProcessIDBServer::didClearObjectStore(const IDBResultData& resultData)
+{
+ RefPtr<InProcessIDBServer> self(this);
+ RunLoop::current().dispatch([this, self, resultData] {
+ m_connectionToServer->didClearObjectStore(resultData);
+ });
+}
+
</ins><span class="cx"> void InProcessIDBServer::didPutOrAdd(const IDBResultData& resultData)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InProcessIDBServer> self(this);
</span><span class="lines">@@ -183,6 +191,14 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void InProcessIDBServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier)
+{
+ RefPtr<InProcessIDBServer> self(this);
+ RunLoop::current().dispatch([this, self, requestData, objectStoreIdentifier] {
+ m_server->clearObjectStore(requestData, objectStoreIdentifier);
+ });
+}
+
</ins><span class="cx"> void InProcessIDBServer::putOrAdd(const IDBRequestData& requestData, IDBKey* key, SerializedScriptValue& value, const IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<InProcessIDBServer> self(this);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h (191825 => 191826)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-30 23:18:27 UTC (rev 191825)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-30 23:20:02 UTC (rev 191826)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> virtual void commitTransaction(IDBResourceIdentifier&) override final;
</span><span class="cx"> virtual void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&) override final;
</span><span class="cx"> virtual void deleteObjectStore(const IDBRequestData&, const String& objectStoreName) override final;
</span><ins>+ virtual void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier) override final;
</ins><span class="cx"> virtual void putOrAdd(const IDBRequestData&, IDBKey*, SerializedScriptValue&, const IndexedDB::ObjectStoreOverwriteMode) override final;
</span><span class="cx"> virtual void getRecord(const IDBRequestData&, IDBKey*) override final;
</span><span class="cx"> virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&) override final;
</span><span class="lines">@@ -73,6 +74,7 @@
</span><span class="cx"> virtual void didCommitTransaction(const IDBResourceIdentifier& transactionIdentifier, const IDBError&) override final;
</span><span class="cx"> virtual void didCreateObjectStore(const IDBResultData&) override final;
</span><span class="cx"> virtual void didDeleteObjectStore(const IDBResultData&) override final;
</span><ins>+ virtual void didClearObjectStore(const IDBResultData&) override final;
</ins><span class="cx"> virtual void didPutOrAdd(const IDBResultData&) override final;
</span><span class="cx"> virtual void didGetRecord(const IDBResultData&) override final;
</span><span class="cx"> virtual void fireVersionChangeEvent(IDBServer::UniqueIDBDatabaseConnection&, uint64_t requestedVersion) override final;
</span></span></pre>
</div>
</div>
</body>
</html>