<!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>[191758] 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/191758">191758</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-10-29 15:08:51 -0700 (Thu, 29 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: deleteObjectStore support.
https://bugs.webkit.org/show_bug.cgi?id=150673

Reviewed by Alex Christensen.

Source/JavaScriptCore:

* runtime/VM.h:

Source/WebCore:

Tests: storage/indexeddb/modern/deleteobjectstore-1.html
       storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html
       storage/indexeddb/modern/idbobjectstore-get-failures.html

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::deleteObjectStore):
(WebCore::IDBClient::IDBConnectionToServer::didDeleteObjectStore):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::deleteObjectStore):
(WebCore::IDBClient::IDBDatabase::willCommitTransaction):
(WebCore::IDBClient::IDBDatabase::willAbortTransaction):
(WebCore::IDBClient::IDBDatabase::commitTransaction): Deleted.
(WebCore::IDBClient::IDBDatabase::abortTransaction): Deleted.
* Modules/indexeddb/client/IDBDatabaseImpl.h:

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::markAsDeleted):
* Modules/indexeddb/client/IDBObjectStoreImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::IDBTransaction):
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::abortOnServer):
(WebCore::IDBClient::IDBTransaction::commit):
(WebCore::IDBClient::IDBTransaction::commitOnServer):
(WebCore::IDBClient::IDBTransaction::deleteObjectStore):
(WebCore::IDBClient::IDBTransaction::deleteObjectStoreOnServer):
(WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
(WebCore::IDBClient::IDBTransaction::activate):
(WebCore::IDBClient::IDBTransaction::activationTimerFired): Deleted.
(WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer): Deleted.
(WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer): Deleted.
(WebCore::IDBClient::IDBTransaction::getRecordOnServer): Deleted.
(WebCore::IDBClient::IDBTransaction::putOrAddOnServer): Deleted.
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::TransactionOperation::completed):
(WebCore::IDBClient::createTransactionOperation):

* Modules/indexeddb/server/IDBBackingStore.h:

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

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

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

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
(WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::createObjectStore): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

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

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

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

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didDeleteObjectStore):
(WebCore::InProcessIDBServer::deleteObjectStore):
* Modules/indexeddb/shared/InProcessIDBServer.h:

LayoutTests:

* storage/indexeddb/modern/deleteobjectstore-1-expected.txt: Added.
* storage/indexeddb/modern/deleteobjectstore-1.html: Added.
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt: Added.
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html: Added.
* storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-get-failures.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMh">trunk/Source/JavaScriptCore/runtime/VM.h</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="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.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="#trunkSourceWebCoreModulesindexeddbclientTransactionOperationh">trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.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="#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="#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="#trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1html">trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/LayoutTests/ChangeLog        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-10-29  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: deleteObjectStore support.
+        https://bugs.webkit.org/show_bug.cgi?id=150673
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/deleteobjectstore-1-expected.txt: Added.
+        * storage/indexeddb/modern/deleteobjectstore-1.html: Added.
+        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt: Added.
+        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html: Added.
+        * storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt: Added.
+        * storage/indexeddb/modern/idbobjectstore-get-failures.html: Added.
+
</ins><span class="cx"> 2015-10-29  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Date input values should not overlap with menu list dropdown button on iOS
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt (0 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+ALERT: Initial upgrade needed: Old version - 0 New version - 1
+ALERT: Initial upgrade versionchange transaction complete
+ALERT: Second upgrade needed: Old version - 1 New version - 2
+ALERT: Deleting object store
+ALERT: Second version change transaction abort
+ALERT: Success opening database connection - Starting final transaction
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Value gotten was AH AH AH AH AH
+ALERT: Final transaction complete
+ALERT: Done
+This test creates an object store then populates it, then commits that transaction.
+It then deletes it, but aborts that transaction.
+Finally it checks to make sure everything from step 1 is there as expected.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html (0 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -0,0 +1,141 @@
</span><ins>+This test creates an object store then populates it, then commits that transaction.&lt;br&gt;
+It then deletes it, but aborts that transaction.&lt;br&gt;
+Finally it checks to make sure everything from step 1 is there as expected.&lt;br&gt;
+&lt;script&gt;
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    alert(&quot;Done&quot;);
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+var createRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    for (var i = 0; i &lt; 10; ++i)
+        objectStore.put(&quot;AH AH AH AH AH&quot;, i + &quot; puts&quot;);
+
+    versionTransaction.onabort = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+        database.close();
+    }
+
+    versionTransaction.onerror = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function getChecker(event) {
+    alert(&quot;Value gotten was &quot; + event.target.result);
+}
+
+function continueTest1()
+{
+    var openRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 2);
+
+    openRequest.onerror = function(event) {
+        alert(&quot;Request unexpected error - &quot; + event);
+        done();
+    }
+    openRequest.onblocked = function(event) {
+        alert(&quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onsuccess = function(event) {
+        alert(&quot;Request unexpected success - &quot; + event);
+        done();
+    }
+
+    openRequest.onupgradeneeded = function(event) {
+        alert(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+        var versionTransaction = openRequest.transaction;
+        var database = event.target.result;
+        var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        
+        alert(&quot;Deleting object store&quot;);        
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+
+        versionTransaction.abort();
+
+        versionTransaction.onabort = function(event) {
+            alert(&quot;Second version change transaction abort&quot;);
+            continueTest2();
+            database.close();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            alert(&quot;Second version change transaction unexpected complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            alert(&quot;Second version change transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
+
+function continueTest2()
+{
+    var openRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 1);
+
+    openRequest.onerror = function(event) {
+        alert(&quot;Request unexpected error - &quot; + event);
+        done();
+    }
+    openRequest.onblocked = function(event) {
+        alert(&quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onupgradeneeded = function(event) {
+        alert(&quot;Request unexpected upgradeneeded - &quot; + event);
+        done();
+    }
+
+    openRequest.onsuccess = function(event) {
+        alert(&quot;Success opening database connection - Starting final transaction&quot;);
+        var database = event.target.result;
+        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    
+        var request;
+        for (var i = 0; i &lt; 10; ++i) {
+            request = objectStore.get(i + &quot; puts&quot;);
+            request.onsuccess = getChecker;
+        }
+
+        transaction.onabort = function(event) {
+            alert(&quot;Final transaction unexpected abort&quot;);
+            done();
+        }
+
+        transaction.oncomplete = function(event) {
+            alert(&quot;Final transaction complete&quot;);
+            done();
+        }
+
+        transaction.onerror = function(event) {
+            alert(&quot;Final transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailuresexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt (0 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+ALERT: Initial upgrade needed: Old version - 0 New version - 1
+ALERT: Initial upgrade versionchange transaction complete
+ALERT: readwrite put success - about to try to delete an objectstore
+ALERT: Failed to deleteObjectStore without a versionchange transaction - Error: InvalidStateError: DOM Exception 11
+ALERT: readwrite transaction complete
+ALERT: Second upgrade needed: Old version - 1 New version - 2
+ALERT: Failed to deleteObjectStore with a non-existent objectstore - Error: NotFoundError: DOM IDBDatabase Exception 8
+ALERT: Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - Error: TransactionInactiveError: DOM IDBDatabase Exception 0
+ALERT: Second version change transaction complete
+ALERT: Done
+This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailureshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html (0 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
+&lt;script&gt;
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    alert(&quot;Done&quot;);
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBDatabaseDeleteObjectStoreFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    versionTransaction.onabort = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function() {
+        alert(&quot;readwrite put success - about to try to delete an objectstore&quot;);
+        try {
+            database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        } catch(e) {
+            alert(&quot;Failed to deleteObjectStore without a versionchange transaction - &quot; + e);
+        }
+    }
+    
+    transaction.onabort = function(event) {
+        alert(&quot;readwrite transaction unexpected aborted&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        alert(&quot;readwrite transaction complete&quot;);
+        continueTest2();
+        database.close();
+    }
+
+    transaction.onerror = function(event) {
+        alert(&quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest2()
+{
+    var openRequest = window.indexedDB.open(&quot;IDBDatabaseDeleteObjectStoreFailuresDatabase&quot;, 2);
+
+    openRequest.onerror = function(event) {
+        alert(&quot;Request unexpected error - &quot; + event);
+        done();
+    }
+    openRequest.onblocked = function(event) {
+        alert(&quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onsuccess = function(event) {
+        alert(&quot;Request unexpected success - &quot; + event);
+        done();
+    }
+
+    openRequest.onupgradeneeded = function(event) {
+        alert(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+        var versionTransaction = openRequest.transaction;
+        database = event.target.result;
+
+        try {
+            database.deleteObjectStore(&quot;NonexistentObjectStore&quot;);
+        } catch(e) {
+            alert(&quot;Failed to deleteObjectStore with a non-existent objectstore - &quot; + e);
+        }
+        
+        // Queue up a whole bunch of puts to keep the transaction alive for awhile
+        var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        for (var i = 0; i &lt; 10; ++i)
+            objectStore.put(&quot;AH AH AH AH AH&quot;, i + &quot; puts&quot;);
+        
+        // After the versionChange transaction becomes inactive, but while it's still in-progress, try to delete the objectstore
+        var tryInactiveDelete = function() 
+        {
+            try {
+                database.deleteObjectStore(&quot;TestObjectStore&quot;);
+            } catch(e) {
+                alert(&quot;Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - &quot; + e);
+            }
+        }
+        
+        setTimeout(tryInactiveDelete, 0);
+
+        versionTransaction.onabort = function(event) {
+            alert(&quot;Second version change transaction unexpected abort&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            alert(&quot;Second version change transaction complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            alert(&quot;Second version change transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailuresexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt (0 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+ALERT: Initial upgrade needed: Old version - 0 New version - 1
+ALERT: Failed to get record from object store with an invalid key
+ALERT: Failed to get record from object store that has been deleted
+ALERT: Initial upgrade versionchange transaction complete
+ALERT: Failed to get record from object store while the transaction is inactive
+ALERT: readonly transaction complete
+ALERT: Done
+This tests some obvious failures that can happen while calling IDBObjectStore.get().
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailureshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html (0 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -0,0 +1,98 @@
</span><ins>+This tests some obvious failures that can happen while calling IDBObjectStore.get().
+&lt;script&gt;
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    alert(&quot;Done&quot;);
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreGetFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function() {
+        try {
+            objectStore.get(NaN);
+        } catch(e) {
+            alert(&quot;Failed to get record from object store with an invalid key&quot;);
+        }
+        
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        
+        try {
+            objectStore.get(&quot;foo&quot;);
+        } catch(e) {
+            alert(&quot;Failed to get record from object store that has been deleted&quot;);
+        } 
+
+        // Recreate the objectstore because we'll need it in phase 2.
+        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
+    }
+    
+    versionTransaction.onabort = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    // Queue up a whole bunch of gets to keep the transaction alive for awhile
+    for (var i = 0; i &lt; 10; ++i)
+        objectStore.get(&quot;foo&quot;);
+
+    var getWhileInactive = function() {
+        try {
+            objectStore.get(&quot;foo&quot;);
+        } catch(e) {
+            alert(&quot;Failed to get record from object store while the transaction is inactive&quot;);
+        } 
+    }
+    
+    setTimeout(getWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        alert(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        alert(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        alert(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-10-29  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: deleteObjectStore support.
+        https://bugs.webkit.org/show_bug.cgi?id=150673
+
+        Reviewed by Alex Christensen.
+
+        * runtime/VM.h:
+
</ins><span class="cx"> 2015-10-29  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         cdjs-tests.yaml/main.js.ftl fails due to FTL ArithSub code for supporting UntypedUse operands.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/JavaScriptCore/runtime/VM.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -556,7 +556,7 @@
</span><span class="cx">     JSLock&amp; apiLock() { return *m_apiLock; }
</span><span class="cx">     CodeCache* codeCache() { return m_codeCache.get(); }
</span><span class="cx"> 
</span><del>-    void whenIdle(std::function&lt;void()&gt;);
</del><ins>+    JS_EXPORT_PRIVATE void whenIdle(std::function&lt;void()&gt;);
</ins><span class="cx"> 
</span><span class="cx">     JS_EXPORT_PRIVATE void deleteAllCode();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/ChangeLog        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -1,3 +1,106 @@
</span><ins>+2015-10-29  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: deleteObjectStore support.
+        https://bugs.webkit.org/show_bug.cgi?id=150673
+
+        Reviewed by Alex Christensen.
+
+        Tests: storage/indexeddb/modern/deleteobjectstore-1.html
+               storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html
+               storage/indexeddb/modern/idbobjectstore-get-failures.html
+
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        (WebCore::IDBClient::IDBConnectionToServer::deleteObjectStore):
+        (WebCore::IDBClient::IDBConnectionToServer::didDeleteObjectStore):
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
+
+        * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
+        (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
+        (WebCore::IDBClient::IDBDatabase::willCommitTransaction):
+        (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
+        (WebCore::IDBClient::IDBDatabase::commitTransaction): Deleted.
+        (WebCore::IDBClient::IDBDatabase::abortTransaction): Deleted.
+        * Modules/indexeddb/client/IDBDatabaseImpl.h:
+
+        * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
+        (WebCore::IDBClient::IDBObjectStore::markAsDeleted):
+        * Modules/indexeddb/client/IDBObjectStoreImpl.h:
+
+        * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+        (WebCore::IDBClient::IDBTransaction::IDBTransaction):
+        (WebCore::IDBClient::IDBTransaction::abort):
+        (WebCore::IDBClient::IDBTransaction::abortOnServer):
+        (WebCore::IDBClient::IDBTransaction::commit):
+        (WebCore::IDBClient::IDBTransaction::commitOnServer):
+        (WebCore::IDBClient::IDBTransaction::deleteObjectStore):
+        (WebCore::IDBClient::IDBTransaction::deleteObjectStoreOnServer):
+        (WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
+        (WebCore::IDBClient::IDBTransaction::activate):
+        (WebCore::IDBClient::IDBTransaction::activationTimerFired): Deleted.
+        (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer): Deleted.
+        (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer): Deleted.
+        (WebCore::IDBClient::IDBTransaction::getRecordOnServer): Deleted.
+        (WebCore::IDBClient::IDBTransaction::putOrAddOnServer): Deleted.
+        * Modules/indexeddb/client/IDBTransactionImpl.h:
+        
+        * Modules/indexeddb/client/TransactionOperation.h:
+        (WebCore::IDBClient::TransactionOperation::completed):
+        (WebCore::IDBClient::createTransactionOperation):
+        
+        * Modules/indexeddb/server/IDBBackingStore.h:
+        
+        * Modules/indexeddb/server/IDBConnectionToClient.cpp:
+        (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
+        * Modules/indexeddb/server/IDBConnectionToClient.h:
+        * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
+        
+        * Modules/indexeddb/server/IDBServer.cpp:
+        (WebCore::IDBServer::IDBServer::deleteObjectStore):
+        * Modules/indexeddb/server/IDBServer.h:
+        
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::finish):
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
+        
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
+        (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
+        (WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
+        (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore): Deleted.
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
+        
+        * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
+        (WebCore::IDBDatabaseInfo::deleteObjectStore):
+        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
+        
+        * Modules/indexeddb/shared/IDBResultData.cpp:
+        (WebCore::IDBResultData::deleteObjectStoreSuccess):
+        * Modules/indexeddb/shared/IDBResultData.h:
+        
+        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+        (WebCore::InProcessIDBServer::didDeleteObjectStore):
+        (WebCore::InProcessIDBServer::deleteObjectStore):
+        * Modules/indexeddb/shared/InProcessIDBServer.h:
+
</ins><span class="cx"> 2015-10-29  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Very slow typing on pages with wheel event handlers on the body, and deep content
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -109,6 +109,21 @@
</span><span class="cx">     completeOperation(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBConnectionToServer::deleteObjectStore(TransactionOperation&amp; operation, const String&amp; objectStoreName)
+{
+    LOG(IndexedDB, &quot;IDBConnectionToServer::deleteObjectStore&quot;);
+
+    saveOperation(operation);
+
+    m_delegate-&gt;deleteObjectStore(IDBRequestData(operation), objectStoreName);
+}
+
+void IDBConnectionToServer::didDeleteObjectStore(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBConnectionToServer::didDeleteObjectStore&quot;);
+    completeOperation(resultData);
+}
+
</ins><span class="cx"> void IDBConnectionToServer::putOrAdd(TransactionOperation&amp; operation, RefPtr&lt;IDBKey&gt;&amp; key, RefPtr&lt;SerializedScriptValue&gt;&amp; value, const IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBConnectionToServer::putOrAdd&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -64,6 +64,9 @@
</span><span class="cx">     void createObjectStore(TransactionOperation&amp;, const IDBObjectStoreInfo&amp;);
</span><span class="cx">     void didCreateObjectStore(const IDBResultData&amp;);
</span><span class="cx"> 
</span><ins>+    void deleteObjectStore(TransactionOperation&amp;, const String&amp; objectStoreName);
+    void didDeleteObjectStore(const IDBResultData&amp;);
+
</ins><span class="cx">     void putOrAdd(TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;&amp;, RefPtr&lt;SerializedScriptValue&gt;&amp;, const IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx">     void didPutOrAdd(const IDBResultData&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &lt;wtf/text/WTFString.h&gt;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class IDBKey;
</span><span class="lines">@@ -53,6 +55,7 @@
</span><span class="cx">     virtual void abortTransaction(IDBResourceIdentifier&amp;) = 0;
</span><span class="cx">     virtual void commitTransaction(IDBResourceIdentifier&amp;) = 0;
</span><span class="cx">     virtual void createObjectStore(const IDBRequestData&amp;, const IDBObjectStoreInfo&amp;) = 0;
</span><ins>+    virtual void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName) = 0;
</ins><span class="cx">     virtual void putOrAdd(const IDBRequestData&amp;, IDBKey*, SerializedScriptValue&amp;, const IndexedDB::ObjectStoreOverwriteMode) = 0;
</span><span class="cx">     virtual void getRecord(const IDBRequestData&amp;, IDBKey*) = 0;
</span><span class="cx">     virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -178,9 +178,27 @@
</span><span class="cx">     return transaction(context, objectStores, mode, ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBDatabase::deleteObjectStore(const String&amp;, ExceptionCode&amp;)
</del><ins>+void IDBDatabase::deleteObjectStore(const String&amp; objectStoreName, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    ASSERT_NOT_REACHED();
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::deleteObjectStore&quot;);
+
+    if (!m_versionChangeTransaction) {
+        ec = INVALID_STATE_ERR;
+        return;
+    }
+
+    if (!m_versionChangeTransaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return;
+    }
+
+    if (!m_info.hasObjectStore(objectStoreName)) {
+        ec = IDBDatabaseException::NotFoundError;
+        return;
+    }
+
+    m_info.deleteObjectStore(objectStoreName);
+    m_versionChangeTransaction-&gt;deleteObjectStore(objectStoreName);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::close()
</span><span class="lines">@@ -239,15 +257,13 @@
</span><span class="cx">     m_activeTransactions.set(transaction.info().identifier(), &amp;transaction);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBDatabase::commitTransaction(IDBTransaction&amp; transaction)
</del><ins>+void IDBDatabase::willCommitTransaction(IDBTransaction&amp; transaction)
</ins><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::commitTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::willCommitTransaction&quot;);
</ins><span class="cx"> 
</span><span class="cx">     auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
</span><span class="cx">     ASSERT(refTransaction);
</span><span class="cx">     m_committingTransactions.set(transaction.info().identifier(), WTF::move(refTransaction));
</span><del>-
-    m_serverConnection-&gt;commitTransaction(transaction);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::didCommitTransaction(IDBTransaction&amp; transaction)
</span><span class="lines">@@ -260,15 +276,13 @@
</span><span class="cx">     didCommitOrAbortTransaction(transaction);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBDatabase::abortTransaction(IDBTransaction&amp; transaction)
</del><ins>+void IDBDatabase::willAbortTransaction(IDBTransaction&amp; transaction)
</ins><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBDatabase::abortTransaction&quot;);
</del><ins>+    LOG(IndexedDB, &quot;IDBDatabase::willAbortTransaction&quot;);
</ins><span class="cx"> 
</span><span class="cx">     auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
</span><span class="cx">     ASSERT(refTransaction);
</span><span class="cx">     m_abortingTransactions.set(transaction.info().identifier(), WTF::move(refTransaction));
</span><del>-
-    m_serverConnection-&gt;abortTransaction(transaction);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::didAbortTransaction(IDBTransaction&amp; transaction)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -75,9 +75,9 @@
</span><span class="cx">     Ref&lt;IDBTransaction&gt; startVersionChangeTransaction(const IDBTransactionInfo&amp;);
</span><span class="cx">     void didStartTransaction(IDBTransaction&amp;);
</span><span class="cx"> 
</span><del>-    void commitTransaction(IDBTransaction&amp;);
</del><ins>+    void willCommitTransaction(IDBTransaction&amp;);
</ins><span class="cx">     void didCommitTransaction(IDBTransaction&amp;);
</span><del>-    void abortTransaction(IDBTransaction&amp;);
</del><ins>+    void willAbortTransaction(IDBTransaction&amp;);
</ins><span class="cx">     void didAbortTransaction(IDBTransaction&amp;);
</span><span class="cx"> 
</span><span class="cx">     void fireVersionChangeEvent(uint64_t requestedVersion);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -294,6 +294,11 @@
</span><span class="cx">     RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBObjectStore::markAsDeleted()
+{
+    m_deleted = true;
+}
+
</ins><span class="cx"> } // namespace IDBClient
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -75,6 +75,8 @@
</span><span class="cx">     virtual RefPtr&lt;WebCore::IDBRequest&gt; count(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&amp;) override final;
</span><span class="cx">     virtual RefPtr&lt;WebCore::IDBRequest&gt; count(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) override final;
</span><span class="cx"> 
</span><ins>+    void markAsDeleted();
+
</ins><span class="cx">     const IDBObjectStoreInfo&amp; info() const { return m_info; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &quot;IDBObjectStore.h&quot;
</span><span class="cx"> #include &quot;IDBRequestImpl.h&quot;
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><ins>+#include &quot;JSDOMWindowBase.h&quot;
</ins><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;ScriptExecutionContext.h&quot;
</span><span class="cx"> #include &quot;TransactionOperation.h&quot;
</span><span class="lines">@@ -58,13 +59,19 @@
</span><span class="cx">     relaxAdoptionRequirement();
</span><span class="cx"> 
</span><span class="cx">     if (m_info.mode() == IndexedDB::TransactionMode::VersionChange) {
</span><del>-        m_activationTimer = std::make_unique&lt;Timer&gt;(*this, &amp;IDBTransaction::activationTimerFired);
-        m_activationTimer-&gt;startOneShot(0);
</del><span class="cx">         m_originalDatabaseInfo = std::make_unique&lt;IDBDatabaseInfo&gt;(m_database-&gt;info());
</span><del>-        m_state = IndexedDB::TransactionState::Inactive;
</del><span class="cx">         m_startedOnServer = true;
</span><del>-    } else
</del><ins>+    } else {
+        activate();
+
+        RefPtr&lt;IDBTransaction&gt; self;
+        JSC::VM&amp; vm = JSDOMWindowBase::commonVM();
+        vm.whenIdle([self, this]() {
+            deactivate();
+        });
+
</ins><span class="cx">         establishOnServer();
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     suspendIfNeeded();
</span><span class="cx"> }
</span><span class="lines">@@ -157,10 +164,18 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_state = IndexedDB::TransactionState::Aborting;
</span><ins>+    m_database-&gt;willAbortTransaction(*this);
</ins><span class="cx"> 
</span><del>-    m_database-&gt;abortTransaction(*this);
</del><ins>+    auto operation = createTransactionOperation(*this, nullptr, &amp;IDBTransaction::abortOnServer);
+    scheduleOperation(WTF::move(operation));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBTransaction::abortOnServer(TransactionOperation&amp;)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::abortOnServer&quot;);
+    serverConnection().abortTransaction(*this);
+}
+
</ins><span class="cx"> const char* IDBTransaction::activeDOMObjectName() const
</span><span class="cx"> {
</span><span class="cx">     return &quot;IDBTransaction&quot;;
</span><span class="lines">@@ -191,12 +206,6 @@
</span><span class="cx">         || m_state == IndexedDB::TransactionState::Finished;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBTransaction::activationTimerFired()
-{
-    scheduleOperationTimer();
-    m_activationTimer = nullptr;
-}
-
</del><span class="cx"> void IDBTransaction::scheduleOperation(RefPtr&lt;TransactionOperation&gt;&amp;&amp; operation)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_transactionOperationMap.contains(operation-&gt;identifier()));
</span><span class="lines">@@ -235,14 +244,21 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::commit&quot;);
</span><span class="cx"> 
</span><del>-    if (isFinishedOrFinishing())
-        return;
</del><ins>+    ASSERT(!isFinishedOrFinishing());
</ins><span class="cx"> 
</span><span class="cx">     m_state = IndexedDB::TransactionState::Committing;
</span><ins>+    m_database-&gt;willCommitTransaction(*this);
</ins><span class="cx"> 
</span><del>-    m_database-&gt;commitTransaction(*this);
</del><ins>+    auto operation = createTransactionOperation(*this, nullptr, &amp;IDBTransaction::commitOnServer);
+    scheduleOperation(WTF::move(operation));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBTransaction::commitOnServer(TransactionOperation&amp;)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::commitOnServer&quot;);
+    serverConnection().commitTransaction(*this);
+}
+
</ins><span class="cx"> void IDBTransaction::finishAbortOrCommit()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_state != IndexedDB::TransactionState::Finished);
</span><span class="lines">@@ -359,9 +375,6 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(isVersionChange());
</span><span class="cx"> 
</span><del>-    if (isFinishedOrFinishing())
-        return;
-
</del><span class="cx">     m_database-&gt;serverConnection().createObjectStore(operation, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -370,8 +383,6 @@
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::didCreateObjectStoreOnServer&quot;);
</span><span class="cx"> 
</span><span class="cx">     ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::CreateObjectStoreSuccess);
</span><del>-
-    scheduleOperationTimer();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;IDBRequest&gt; IDBTransaction::requestGetRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBKey&amp; key)
</span><span class="lines">@@ -392,8 +403,6 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::getRecordOnServer&quot;);
</span><span class="cx"> 
</span><del>-    ASSERT(!isFinishedOrFinishing());
-
</del><span class="cx">     serverConnection().getRecord(operation, key);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -424,7 +433,6 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::putOrAddOnServer&quot;);
</span><span class="cx"> 
</span><del>-    ASSERT(!isFinishedOrFinishing());
</del><span class="cx">     ASSERT(!isReadOnly());
</span><span class="cx"> 
</span><span class="cx">     serverConnection().putOrAdd(operation, key, value, overwriteMode);
</span><span class="lines">@@ -438,6 +446,33 @@
</span><span class="cx">     request.requestCompleted(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBTransaction::deleteObjectStore(const String&amp; objectStoreName)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::deleteObjectStore&quot;);
+
+    ASSERT(isVersionChange());
+
+    if (auto objectStore = m_referencedObjectStores.take(objectStoreName))
+        objectStore-&gt;markAsDeleted();
+
+    auto operation = createTransactionOperation(*this, &amp;IDBTransaction::didDeleteObjectStoreOnServer, &amp;IDBTransaction::deleteObjectStoreOnServer, objectStoreName);
+    scheduleOperation(WTF::move(operation));
+}
+
+void IDBTransaction::deleteObjectStoreOnServer(TransactionOperation&amp; operation, const String&amp; objectStoreName)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::deleteObjectStoreOnServer&quot;);
+    ASSERT(isVersionChange());
+
+    serverConnection().deleteObjectStore(operation, objectStoreName);
+}
+
+void IDBTransaction::didDeleteObjectStoreOnServer(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didDeleteObjectStoreOnServer&quot;);
+    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteObjectStoreSuccess);
+}
+
</ins><span class="cx"> void IDBTransaction::establishOnServer()
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::establishOnServer&quot;);
</span><span class="lines">@@ -447,7 +482,9 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBTransaction::activate()
</span><span class="cx"> {
</span><del>-    ASSERT(!isFinishedOrFinishing());
</del><ins>+    if (isFinishedOrFinishing())
+        return;
+
</ins><span class="cx">     m_state = IndexedDB::TransactionState::Active;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -90,11 +90,15 @@
</span><span class="cx">     Ref&lt;IDBRequest&gt; requestPutOrAdd(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBKey*, SerializedScriptValue&amp;, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx">     Ref&lt;IDBRequest&gt; requestGetRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBKey&amp;);
</span><span class="cx"> 
</span><ins>+    void deleteObjectStore(const String&amp; objectStoreName);
+
</ins><span class="cx">     IDBConnectionToServer&amp; serverConnection();
</span><span class="cx"> 
</span><span class="cx">     void activate();
</span><span class="cx">     void deactivate();
</span><span class="cx"> 
</span><ins>+    void scheduleOperationTimer();
+
</ins><span class="cx"> private:
</span><span class="cx">     IDBTransaction(IDBDatabase&amp;, const IDBTransactionInfo&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -105,14 +109,15 @@
</span><span class="cx">     void finishAbortOrCommit();
</span><span class="cx"> 
</span><span class="cx">     void scheduleOperation(RefPtr&lt;TransactionOperation&gt;&amp;&amp;);
</span><del>-    void scheduleOperationTimer();
</del><span class="cx">     void operationTimerFired();
</span><del>-    void activationTimerFired();
</del><span class="cx"> 
</span><span class="cx">     void fireOnComplete();
</span><span class="cx">     void fireOnAbort();
</span><span class="cx">     void enqueueEvent(Ref&lt;Event&gt;);
</span><span class="cx"> 
</span><ins>+    void commitOnServer(TransactionOperation&amp;);
+    void abortOnServer(TransactionOperation&amp;);
+
</ins><span class="cx">     void createObjectStoreOnServer(TransactionOperation&amp;, const IDBObjectStoreInfo&amp;);
</span><span class="cx">     void didCreateObjectStoreOnServer(const IDBResultData&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -122,13 +127,16 @@
</span><span class="cx">     void getRecordOnServer(TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;);
</span><span class="cx">     void didGetRecordOnServer(IDBRequest&amp;, const IDBResultData&amp;);
</span><span class="cx"> 
</span><ins>+    void deleteObjectStoreOnServer(TransactionOperation&amp;, const String&amp; objectStoreName);
+    void didDeleteObjectStoreOnServer(const IDBResultData&amp;);
+
</ins><span class="cx">     void establishOnServer();
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;IDBDatabase&gt; m_database;
</span><span class="cx">     IDBTransactionInfo m_info;
</span><span class="cx">     std::unique_ptr&lt;IDBDatabaseInfo&gt; m_originalDatabaseInfo;
</span><span class="cx"> 
</span><del>-    IndexedDB::TransactionState m_state { IndexedDB::TransactionState::Active };
</del><ins>+    IndexedDB::TransactionState m_state { IndexedDB::TransactionState::Inactive };
</ins><span class="cx">     bool m_startedOnServer { false };
</span><span class="cx"> 
</span><span class="cx">     IDBError m_idbError;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientTransactionOperationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx">     void completed(const IDBResultData&amp; data)
</span><span class="cx">     {
</span><span class="cx">         m_completeFunction(data);
</span><ins>+        m_transaction-&gt;scheduleOperationTimer();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     const IDBResourceIdentifier&amp; identifier() const { return m_identifier; }
</span><span class="lines">@@ -84,7 +85,8 @@
</span><span class="cx">         };
</span><span class="cx"> 
</span><span class="cx">         m_completeFunction = [self, this, completeMethod](const IDBResultData&amp; resultData) {
</span><del>-            (&amp;m_transaction.get()-&gt;*completeMethod)(resultData);
</del><ins>+            if (completeMethod)
+                (&amp;m_transaction.get()-&gt;*completeMethod)(resultData);
</ins><span class="cx">         };
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -100,11 +102,21 @@
</span><span class="cx"> 
</span><span class="cx">         RefPtr&lt;IDBRequest&gt; refRequest(&amp;request);
</span><span class="cx">         m_completeFunction = [self, this, refRequest, completeMethod](const IDBResultData&amp; resultData) {
</span><del>-            (&amp;m_transaction.get()-&gt;*completeMethod)(*refRequest, resultData);
</del><ins>+            if (completeMethod)
+                (&amp;m_transaction.get()-&gt;*completeMethod)(*refRequest, resultData);
</ins><span class="cx">         };
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+inline RefPtr&lt;TransactionOperation&gt; createTransactionOperation(
+    IDBTransaction&amp; transaction,
+    void (IDBTransaction::*complete)(const IDBResultData&amp;),
+    void (IDBTransaction::*perform)(TransactionOperation&amp;))
+{
+    auto operation = new TransactionOperationImpl&lt;&gt;(transaction, complete, perform);
+    return adoptRef(operation);
+}
+
</ins><span class="cx"> template&lt;typename MP1, typename P1&gt;
</span><span class="cx"> RefPtr&lt;TransactionOperation&gt; createTransactionOperation(
</span><span class="cx">     IDBTransaction&amp; transaction,
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx">     virtual IDBError commitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier) = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual IDBError createObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;) = 0;
</span><ins>+    virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName) = 0;
</ins><span class="cx">     virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) = 0;
</span><span class="cx">     virtual IDBError deleteRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;) = 0;
</span><span class="cx">     virtual IDBError putRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; value) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -68,6 +68,11 @@
</span><span class="cx">     m_delegate-&gt;didCreateObjectStore(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBConnectionToClient::didDeleteObjectStore(const IDBResultData&amp; result)
+{
+    m_delegate-&gt;didDeleteObjectStore(result);
+}
+
</ins><span class="cx"> void IDBConnectionToClient::didPutOrAdd(const IDBResultData&amp; result)
</span><span class="cx"> {
</span><span class="cx">     m_delegate-&gt;didPutOrAdd(result);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">     void didAbortTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
</span><span class="cx">     void didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;);
</span><span class="cx">     void didCreateObjectStore(const IDBResultData&amp;);
</span><ins>+    void didDeleteObjectStore(const IDBResultData&amp;);
</ins><span class="cx">     void didPutOrAdd(const IDBResultData&amp;);
</span><span class="cx">     void didGetRecord(const IDBResultData&amp;);
</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 (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx">     virtual void didAbortTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;) = 0;
</span><span class="cx">     virtual void didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;) = 0;
</span><span class="cx">     virtual void didCreateObjectStore(const IDBResultData&amp;) = 0;
</span><ins>+    virtual void didDeleteObjectStore(const IDBResultData&amp;) = 0;
</ins><span class="cx">     virtual void didPutOrAdd(const IDBResultData&amp;) = 0;
</span><span class="cx">     virtual void didGetRecord(const IDBResultData&amp;) = 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 (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -168,6 +168,18 @@
</span><span class="cx">     transaction-&gt;createObjectStore(requestData, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBServer::deleteObjectStore(const IDBRequestData&amp; requestData, const String&amp; objectStoreName)
+{
+    LOG(IndexedDB, &quot;IDBServer::deleteObjectStore&quot;);
+
+    auto transaction = m_transactions.get(requestData.transactionIdentifier());
+    if (!transaction)
+        return;
+
+    ASSERT(transaction-&gt;isVersionChange());
+    transaction-&gt;deleteObjectStore(requestData, objectStoreName);
+}
+
</ins><span class="cx"> void IDBServer::putOrAdd(const IDBRequestData&amp; requestData, const IDBKeyData&amp; keyData, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBServer::putOrAdd&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx">     void abortTransaction(const IDBResourceIdentifier&amp;);
</span><span class="cx">     void commitTransaction(const IDBResourceIdentifier&amp;);
</span><span class="cx">     void createObjectStore(const IDBRequestData&amp;, const IDBObjectStoreInfo&amp;);
</span><ins>+    void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName);
</ins><span class="cx">     void putOrAdd(const IDBRequestData&amp;, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx">     void getRecord(const IDBRequestData&amp;, const IDBKeyData&amp;);
</span><span class="cx">     void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -80,6 +80,17 @@
</span><span class="cx">     objectStore.writeTransactionStarted(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void MemoryBackingStoreTransaction::objectStoreDeleted(std::unique_ptr&lt;MemoryObjectStore&gt; objectStore)
+{
+    ASSERT(objectStore);
+    ASSERT(m_objectStores.contains(objectStore.get()));
+    m_objectStores.remove(objectStore.get());
+
+    auto addResult = m_deletedObjectStores.add(objectStore-&gt;info().name(), nullptr);
+    if (addResult.isNewEntry)
+        addResult.iterator-&gt;value = WTF::move(objectStore);
+}
+
</ins><span class="cx"> void MemoryBackingStoreTransaction::recordValueChanged(MemoryObjectStore&amp; objectStore, const IDBKeyData&amp; key)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_objectStores.contains(&amp;objectStore));
</span><span class="lines">@@ -106,6 +117,19 @@
</span><span class="cx"> 
</span><span class="cx">     TemporaryChange&lt;bool&gt; change(m_isAborting, true);
</span><span class="cx"> 
</span><ins>+    // This loop moves the underlying unique_ptrs from out of the m_deleteObjectStores map,
+    // but the entries in the map still remain.
+    for (auto&amp; objectStore : m_deletedObjectStores.values()) {
+        MemoryObjectStore* rawObjectStore = objectStore.get();
+        m_backingStore.restoreObjectStoreForVersionChangeAbort(WTF::move(objectStore));
+
+        ASSERT(!m_objectStores.contains(rawObjectStore));
+        m_objectStores.add(rawObjectStore);
+    }
+
+    // This clears the entries from the map.
+    m_deletedObjectStores.clear();
+
</ins><span class="cx">     if (m_originalDatabaseInfo) {
</span><span class="cx">         ASSERT(m_info.mode() == IndexedDB::TransactionMode::VersionChange);
</span><span class="cx">         m_backingStore.setDatabaseInfo(*m_originalDatabaseInfo);
</span><span class="lines">@@ -145,8 +169,10 @@
</span><span class="cx">     if (!isWriting())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    for (auto objectStore : m_objectStores)
</del><ins>+    for (auto&amp; objectStore : m_objectStores)
</ins><span class="cx">         objectStore-&gt;writeTransactionFinished(*this);
</span><ins>+    for (auto&amp; objectStore : m_deletedObjectStores.values())
+        objectStore-&gt;writeTransactionFinished(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace IDBServer
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx">     void addNewObjectStore(MemoryObjectStore&amp;);
</span><span class="cx">     void addExistingObjectStore(MemoryObjectStore&amp;);
</span><span class="cx">     void recordValueChanged(MemoryObjectStore&amp;, const IDBKeyData&amp;);
</span><ins>+    void objectStoreDeleted(std::unique_ptr&lt;MemoryObjectStore&gt;);
</ins><span class="cx"> 
</span><span class="cx">     void abort();
</span><span class="cx">     void commit();
</span><span class="lines">@@ -78,6 +79,7 @@
</span><span class="cx">     HashSet&lt;MemoryObjectStore*&gt; m_objectStores;
</span><span class="cx">     HashSet&lt;MemoryObjectStore*&gt; m_versionChangeAddedObjectStores;
</span><span class="cx"> 
</span><ins>+    HashMap&lt;String, std::unique_ptr&lt;MemoryObjectStore&gt;&gt; m_deletedObjectStores;
</ins><span class="cx">     HashMap&lt;MemoryObjectStore*, std::unique_ptr&lt;KeyValueMap&gt;&gt; m_originalValues;
</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 (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx"> 
</span><span class="cx"> IDBError MemoryIDBBackingStore::createObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp; info)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;MemoryIDBBackingStore::createObjectStore&quot;);
</del><ins>+    LOG(IndexedDB, &quot;MemoryIDBBackingStore::createObjectStore - adding OS %s with ID %llu&quot;, info.name().utf8().data(), info.identifier());
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(m_databaseInfo);
</span><span class="cx">     if (m_databaseInfo-&gt;hasObjectStore(info.name()))
</span><span class="lines">@@ -138,6 +138,29 @@
</span><span class="cx">     return IDBError();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBError MemoryIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName)
+{
+    LOG(IndexedDB, &quot;MemoryIDBBackingStore::deleteObjectStore&quot;);
+
+    ASSERT(m_databaseInfo);
+    if (!m_databaseInfo-&gt;hasObjectStore(objectStoreName))
+        return IDBError(IDBExceptionCode::ConstraintError);
+
+    auto transaction = m_transactions.get(transactionIdentifier);
+    ASSERT(transaction);
+    ASSERT(transaction-&gt;isVersionChange());
+
+    auto objectStore = takeObjectStoreByName(objectStoreName);
+    ASSERT(objectStore);
+    if (!objectStore)
+        return IDBError(IDBExceptionCode::ConstraintError);
+
+    m_databaseInfo-&gt;deleteObjectStore(objectStoreName);
+    transaction-&gt;objectStoreDeleted(WTF::move(objectStore));
+
+    return IDBError();
+}
+
</ins><span class="cx"> void MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort(MemoryObjectStore&amp; objectStore)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort&quot;);
</span><span class="lines">@@ -148,6 +171,11 @@
</span><span class="cx">     unregisterObjectStore(objectStore);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort(std::unique_ptr&lt;MemoryObjectStore&gt;&amp;&amp; objectStore)
+{
+    registerObjectStore(WTF::move(objectStore));
+}
+
</ins><span class="cx"> IDBError MemoryIDBBackingStore::keyExistsInObjectStore(const IDBResourceIdentifier&amp;, uint64_t objectStoreIdentifier, const IDBKeyData&amp; keyData, bool&amp; keyExists)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::keyExistsInObjectStore&quot;);
</span><span class="lines">@@ -229,6 +257,18 @@
</span><span class="cx">     m_objectStoresByIdentifier.remove(objectStore.info().identifier());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+std::unique_ptr&lt;MemoryObjectStore&gt; MemoryIDBBackingStore::takeObjectStoreByName(const String&amp; name)
+{
+    auto rawObjectStore = m_objectStoresByName.take(name);
+    if (!rawObjectStore)
+        return nullptr;
+
+    auto objectStore = m_objectStoresByIdentifier.take(rawObjectStore-&gt;info().identifier());
+    ASSERT(objectStore);
+
+    return objectStore;
+}
+
</ins><span class="cx"> } // namespace IDBServer
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -53,16 +53,20 @@
</span><span class="cx">     virtual IDBError abortTransaction(const IDBResourceIdentifier&amp; transactionIdentifier) override final;
</span><span class="cx">     virtual IDBError commitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier) override final;
</span><span class="cx">     virtual IDBError createObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;) override final;
</span><ins>+    virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName) override final;
</ins><span class="cx">     virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) override final;
</span><span class="cx">     virtual IDBError deleteRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;) override final;
</span><span class="cx">     virtual IDBError putRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; value) override final;
</span><span class="cx">     virtual IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, ThreadSafeDataBuffer&amp; outValue) override final;
</span><span class="cx"> 
</span><span class="cx">     void removeObjectStoreForVersionChangeAbort(MemoryObjectStore&amp;);
</span><ins>+    void restoreObjectStoreForVersionChangeAbort(std::unique_ptr&lt;MemoryObjectStore&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     MemoryIDBBackingStore(const IDBDatabaseIdentifier&amp;);
</span><span class="cx"> 
</span><ins>+    std::unique_ptr&lt;MemoryObjectStore&gt; takeObjectStoreByName(const String&amp; name);
+
</ins><span class="cx">     IDBDatabaseIdentifier m_identifier;
</span><span class="cx">     std::unique_ptr&lt;IDBDatabaseInfo&gt; m_databaseInfo;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -237,19 +237,17 @@
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::createObjectStore&quot;);
</span><span class="cx"> 
</span><del>-    ASSERT(m_backingStore);
-    m_backingStore-&gt;createObjectStore(transaction.info().identifier(), info);
-
</del><span class="cx">     uint64_t callbackID = storeCallback(callback);
</span><span class="cx">     m_server.postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performCreateObjectStore, callbackID, transaction.info().identifier(), info));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::performCreateObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp;, const IDBObjectStoreInfo&amp; info)
</del><ins>+void UniqueIDBDatabase::performCreateObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp; info)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(db) UniqueIDBDatabase::performCreateObjectStore&quot;);
</span><span class="cx"> 
</span><del>-    // FIXME: Create object store in backing store, once that exists.
</del><ins>+    ASSERT(m_backingStore);
+    m_backingStore-&gt;createObjectStore(transactionIdentifier, info);
</ins><span class="cx"> 
</span><span class="cx">     IDBError error;
</span><span class="cx">     m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformCreateObjectStore, callbackIdentifier, error, info));
</span><span class="lines">@@ -266,6 +264,38 @@
</span><span class="cx">     performErrorCallback(callbackIdentifier, error);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UniqueIDBDatabase::deleteObjectStore(UniqueIDBDatabaseTransaction&amp; transaction, const String&amp; objectStoreName, ErrorCallback callback)
+{
+    ASSERT(isMainThread());
+    LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::deleteObjectStore&quot;);
+
+    uint64_t callbackID = storeCallback(callback);
+    m_server.postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performDeleteObjectStore, callbackID, transaction.info().identifier(), objectStoreName));
+}
+
+void UniqueIDBDatabase::performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName)
+{
+    ASSERT(!isMainThread());
+    LOG(IndexedDB, &quot;(db) UniqueIDBDatabase::performDeleteObjectStore&quot;);
+
+    ASSERT(m_backingStore);
+    m_backingStore-&gt;deleteObjectStore(transactionIdentifier, objectStoreName);
+
+    IDBError error;
+    m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformDeleteObjectStore, callbackIdentifier, error, objectStoreName));
+}
+
+void UniqueIDBDatabase::didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&amp; error, const String&amp; objectStoreName)
+{
+    ASSERT(isMainThread());
+    LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::didPerformDeleteObjectStore&quot;);
+
+    if (error.isNull())
+        m_databaseInfo-&gt;deleteObjectStore(objectStoreName);
+
+    performErrorCallback(callbackIdentifier, error);
+}
+
</ins><span class="cx"> void UniqueIDBDatabase::putOrAdd(const IDBRequestData&amp; requestData, const IDBKeyData&amp; keyData, const ThreadSafeDataBuffer&amp; 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 (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx">     IDBServer&amp; server() { return m_server; }
</span><span class="cx"> 
</span><span class="cx">     void createObjectStore(UniqueIDBDatabaseTransaction&amp;, const IDBObjectStoreInfo&amp;, ErrorCallback);
</span><ins>+    void deleteObjectStore(UniqueIDBDatabaseTransaction&amp;, const String&amp; objectStoreName, ErrorCallback);
</ins><span class="cx">     void putOrAdd(const IDBRequestData&amp;, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode, KeyDataCallback);
</span><span class="cx">     void getRecord(const IDBRequestData&amp;, const IDBKeyData&amp;, ValueDataCallback);
</span><span class="cx">     void commitTransaction(UniqueIDBDatabaseTransaction&amp;, ErrorCallback);
</span><span class="lines">@@ -98,6 +99,7 @@
</span><span class="cx">     void performAbortTransaction(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier);
</span><span class="cx">     void beginTransactionInBackingStore(const IDBTransactionInfo&amp;);
</span><span class="cx">     void performCreateObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;);
</span><ins>+    void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName);
</ins><span class="cx">     void performPutOrAdd(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx">     void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;);
</span><span class="cx">     void performActivateTransactionInBackingStore(uint64_t callbackIdentifier, const IDBTransactionInfo&amp;);
</span><span class="lines">@@ -105,6 +107,7 @@
</span><span class="cx">     // Main thread callbacks
</span><span class="cx">     void didOpenBackingStore(const IDBDatabaseInfo&amp;);
</span><span class="cx">     void didPerformCreateObjectStore(uint64_t callbackIdentifier, const IDBError&amp;, const IDBObjectStoreInfo&amp;);
</span><ins>+    void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&amp;, const String&amp; objectStoreName);
</ins><span class="cx">     void didPerformPutOrAdd(uint64_t callbackIdentifier, const IDBError&amp;, const IDBKeyData&amp;);
</span><span class="cx">     void didPerformGetRecord(uint64_t callbackIdentifier, const IDBError&amp;, const ThreadSafeDataBuffer&amp;);
</span><span class="cx">     void didPerformCommitTransaction(uint64_t callbackIdentifier, const IDBError&amp;, const IDBResourceIdentifier&amp; transactionIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -139,6 +139,13 @@
</span><span class="cx">     m_connectionToClient.didCreateObjectStore(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UniqueIDBDatabaseConnection::didDeleteObjectStore(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;UniqueIDBDatabaseConnection::didDeleteObjectStore&quot;);
+
+    m_connectionToClient.didDeleteObjectStore(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 (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx">     void didAbortTransaction(UniqueIDBDatabaseTransaction&amp;, const IDBError&amp;);
</span><span class="cx">     void didCommitTransaction(UniqueIDBDatabaseTransaction&amp;, const IDBError&amp;);
</span><span class="cx">     void didCreateObjectStore(const IDBResultData&amp;);
</span><ins>+    void didDeleteObjectStore(const IDBResultData&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     UniqueIDBDatabaseConnection(UniqueIDBDatabase&amp;, IDBConnectionToClient&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -113,6 +113,24 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UniqueIDBDatabaseTransaction::deleteObjectStore(const IDBRequestData&amp; requestData, const String&amp; objectStoreName)
+{
+    LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::deleteObjectStore&quot;);
+
+    ASSERT(isVersionChange());
+    ASSERT(m_transactionInfo.identifier() == requestData.transactionIdentifier());
+
+    RefPtr&lt;UniqueIDBDatabaseTransaction&gt; self(this);
+    m_databaseConnection-&gt;database().deleteObjectStore(*this, objectStoreName, [this, self, requestData](const IDBError&amp; error) {
+        LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::deleteObjectStore (callback)&quot;);
+        if (error.isNull())
+            m_databaseConnection-&gt;didDeleteObjectStore(IDBResultData::deleteObjectStoreSuccess(requestData.requestIdentifier()));
+        else
+            m_databaseConnection-&gt;didDeleteObjectStore(IDBResultData::error(requestData.requestIdentifier(), error));
+    });
+}
+
+
</ins><span class="cx"> void UniqueIDBDatabaseTransaction::putOrAdd(const IDBRequestData&amp; requestData, const IDBKeyData&amp; keyData, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::putOrAdd&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -63,6 +63,7 @@
</span><span class="cx">     void commit();
</span><span class="cx"> 
</span><span class="cx">     void createObjectStore(const IDBRequestData&amp;, const IDBObjectStoreInfo&amp;);
</span><ins>+    void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName);
</ins><span class="cx">     void putOrAdd(const IDBRequestData&amp;, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx">     void getRecord(const IDBRequestData&amp;, const IDBKeyData&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -106,6 +106,15 @@
</span><span class="cx">     return WTF::move(names);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBDatabaseInfo::deleteObjectStore(const String&amp; objectStoreName)
+{
+    auto* info = infoForExistingObjectStore(objectStoreName);
+    if (!info)
+        return;
+
+    m_objectStoreMap.remove(info-&gt;identifier());
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -54,6 +54,8 @@
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;String&gt; objectStoreNames() const;
</span><span class="cx"> 
</span><ins>+    void deleteObjectStore(const String&amp; objectStoreName);
+
</ins><span class="cx"> private:
</span><span class="cx">     IDBDatabaseInfo();
</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 (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -93,6 +93,11 @@
</span><span class="cx">     return { IDBResultType::CreateObjectStoreSuccess, requestIdentifier };
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBResultData IDBResultData::deleteObjectStoreSuccess(const IDBResourceIdentifier&amp; requestIdentifier)
+{
+    return { IDBResultType::DeleteObjectStoreSuccess, requestIdentifier };
+}
+
</ins><span class="cx"> IDBResultData IDBResultData::putOrAddSuccess(const IDBResourceIdentifier&amp; requestIdentifier, const IDBKeyData&amp; 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 (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx">     OpenDatabaseSuccess,
</span><span class="cx">     OpenDatabaseUpgradeNeeded,
</span><span class="cx">     CreateObjectStoreSuccess,
</span><ins>+    DeleteObjectStoreSuccess,
</ins><span class="cx">     PutOrAddSuccess,
</span><span class="cx">     GetRecordSuccess,
</span><span class="cx"> };
</span><span class="lines">@@ -60,6 +61,7 @@
</span><span class="cx">     static IDBResultData openDatabaseSuccess(const IDBResourceIdentifier&amp;, IDBServer::UniqueIDBDatabaseConnection&amp;);
</span><span class="cx">     static IDBResultData openDatabaseUpgradeNeeded(const IDBResourceIdentifier&amp;, IDBServer::UniqueIDBDatabaseTransaction&amp;);
</span><span class="cx">     static IDBResultData createObjectStoreSuccess(const IDBResourceIdentifier&amp;);
</span><ins>+    static IDBResultData deleteObjectStoreSuccess(const IDBResourceIdentifier&amp;);
</ins><span class="cx">     static IDBResultData putOrAddSuccess(const IDBResourceIdentifier&amp;, const IDBKeyData&amp;);
</span><span class="cx">     static IDBResultData getRecordSuccess(const IDBResourceIdentifier&amp;, const ThreadSafeDataBuffer&amp; 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 (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -127,6 +127,14 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InProcessIDBServer::didDeleteObjectStore(const IDBResultData&amp; resultData)
+{
+    RefPtr&lt;InProcessIDBServer&gt; self(this);
+    RunLoop::current().dispatch([this, self, resultData] {
+        m_connectionToServer-&gt;didDeleteObjectStore(resultData);
+    });
+}
+
</ins><span class="cx"> void InProcessIDBServer::didPutOrAdd(const IDBResultData&amp; resultData)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;InProcessIDBServer&gt; self(this);
</span><span class="lines">@@ -167,6 +175,14 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InProcessIDBServer::deleteObjectStore(const IDBRequestData&amp; requestData, const String&amp; objectStoreName)
+{
+    RefPtr&lt;InProcessIDBServer&gt; self(this);
+    RunLoop::current().dispatch([this, self, requestData, objectStoreName] {
+        m_server-&gt;deleteObjectStore(requestData, objectStoreName);
+    });
+}
+
</ins><span class="cx"> void InProcessIDBServer::putOrAdd(const IDBRequestData&amp; requestData, IDBKey* key, SerializedScriptValue&amp; value, const IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;InProcessIDBServer&gt; self(this);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h (191757 => 191758)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-29 22:07:42 UTC (rev 191757)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-29 22:08:51 UTC (rev 191758)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx">     virtual void abortTransaction(IDBResourceIdentifier&amp;) override final;
</span><span class="cx">     virtual void commitTransaction(IDBResourceIdentifier&amp;) override final;
</span><span class="cx">     virtual void createObjectStore(const IDBRequestData&amp;, const IDBObjectStoreInfo&amp;) override final;
</span><ins>+    virtual void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName) override final;
</ins><span class="cx">     virtual void putOrAdd(const IDBRequestData&amp;, IDBKey*, SerializedScriptValue&amp;, const IndexedDB::ObjectStoreOverwriteMode) override final;
</span><span class="cx">     virtual void getRecord(const IDBRequestData&amp;, IDBKey*) override final;
</span><span class="cx">     virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;) override final;
</span><span class="lines">@@ -71,6 +72,7 @@
</span><span class="cx">     virtual void didAbortTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;) override final;
</span><span class="cx">     virtual void didCommitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBError&amp;) override final;
</span><span class="cx">     virtual void didCreateObjectStore(const IDBResultData&amp;) override final;
</span><ins>+    virtual void didDeleteObjectStore(const IDBResultData&amp;) override final;
</ins><span class="cx">     virtual void didPutOrAdd(const IDBResultData&amp;) override final;
</span><span class="cx">     virtual void didGetRecord(const IDBResultData&amp;) override final;
</span><span class="cx">     virtual void fireVersionChangeEvent(IDBServer::UniqueIDBDatabaseConnection&amp;, uint64_t requestedVersion) override final;
</span></span></pre>
</div>
</div>

</body>
</html>