<!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>[195467] 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/195467">195467</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-01-22 12:37:42 -0800 (Fri, 22 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: Add transactions and create/delete object store to SQLite backend
https://bugs.webkit.org/show_bug.cgi?id=153359

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by many tests now passing).

* Modules/indexeddb/server/IDBBackingStore.h: Change deleteObjectStore to work on an ID instead of name.

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

Clean up filename generation a bit to actually match the previous directory structure.
Add begin/commit/abort transaction support.
Add create/delete object store support:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::filenameForDatabaseName):
(WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectory):
(WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabasePath):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:

Clean up SQLiteIDBTransaction to fit with the new WebCore backing store model, which is slightly
different from the old WebKit2 backing store model:
* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::SQLiteIDBTransaction):
(WebCore::IDBServer::SQLiteIDBTransaction::begin):
(WebCore::IDBServer::SQLiteIDBTransaction::commit):
(WebCore::IDBServer::SQLiteIDBTransaction::abort):
(WebCore::IDBServer::SQLiteIDBTransaction::reset):
(WebCore::IDBServer::SQLiteIDBTransaction::rollback): Deleted.
* Modules/indexeddb/server/SQLiteIDBTransaction.h:
(WebCore::IDBServer::SQLiteIDBTransaction::transactionIdentifier):
(WebCore::IDBServer::SQLiteIDBTransaction::mode):

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

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

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

* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::identifier):

LayoutTests:

* platform/mac-wk1/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.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="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.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="#trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/LayoutTests/ChangeLog        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-01-22  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Add transactions and create/delete object store to SQLite backend
+        https://bugs.webkit.org/show_bug.cgi?id=153359
+
+        Reviewed by Alex Christensen.
+
+        * platform/mac-wk1/TestExpectations:
+
</ins><span class="cx"> 2016-01-22  Chris Fleizach  &lt;cfleizach@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: &lt;code&gt; group and friends should have a custom subrole
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -441,8 +441,6 @@
</span><span class="cx"> imported/w3c/indexeddb/value.htm [ Failure ]
</span><span class="cx"> imported/w3c/indexeddb/value_recursive.htm [ Failure ]
</span><span class="cx"> imported/w3c/indexeddb/writer-starvation.htm [ Failure ]
</span><del>-storage/indexeddb/aborted-versionchange-closes.html [ Failure ]
-storage/indexeddb/basics.html [ Failure ]
</del><span class="cx"> storage/indexeddb/closed-cursor.html [ Failure ]
</span><span class="cx"> storage/indexeddb/create-and-remove-object-store.html [ Failure ]
</span><span class="cx"> storage/indexeddb/create-object-store-options.html [ Failure ]
</span><span class="lines">@@ -468,21 +466,11 @@
</span><span class="cx"> storage/indexeddb/cursor-update-value-argument-required.html [ Failure ]
</span><span class="cx"> storage/indexeddb/cursor-update.html [ Failure ]
</span><span class="cx"> storage/indexeddb/cursor-value.html [ Failure ]
</span><del>-storage/indexeddb/database-basics.html [ Failure ]
</del><span class="cx"> storage/indexeddb/database-close.html [ Failure ]
</span><del>-storage/indexeddb/database-closepending-flag.html [ Failure ]
-storage/indexeddb/database-deletepending-flag.html [ Failure ]
-storage/indexeddb/database-odd-names.html [ Failure ]
</del><span class="cx"> storage/indexeddb/database-wrapper.html [ Failure ]
</span><del>-storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html [ Failure ]
</del><span class="cx"> storage/indexeddb/delete-range.html [ Failure ]
</span><span class="cx"> storage/indexeddb/deleteIndex.html [ Failure ]
</span><span class="cx"> storage/indexeddb/deleted-objects.html [ Failure ]
</span><del>-storage/indexeddb/deletedatabase-blocked.html [ Failure ]
-storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html [ Failure ]
-storage/indexeddb/deletedatabase-not-blocked.html [ Failure ]
-storage/indexeddb/deletedatabase-transaction.html [ Failure ]
-storage/indexeddb/dont-wedge.html [ Failure ]
</del><span class="cx"> storage/indexeddb/duplicates.html [ Failure ]
</span><span class="cx"> storage/indexeddb/error-causes-abort-by-default.html [ Failure ]
</span><span class="cx"> storage/indexeddb/exception-in-event-aborts.html [ Failure ]
</span><span class="lines">@@ -496,28 +484,10 @@
</span><span class="cx"> storage/indexeddb/index-multientry.html [ Failure ]
</span><span class="cx"> storage/indexeddb/index-population.html [ Failure ]
</span><span class="cx"> storage/indexeddb/index-unique.html [ Failure ]
</span><del>-storage/indexeddb/intversion-blocked.html [ Failure ]
-storage/indexeddb/intversion-close-between-events.html [ Failure ]
-storage/indexeddb/intversion-close-in-oncomplete.html [ Failure ]
-storage/indexeddb/intversion-close-in-upgradeneeded.html [ Failure ]
-storage/indexeddb/intversion-encoding.html [ Failure ]
-storage/indexeddb/intversion-gated-on-delete.html [ Failure ]
-storage/indexeddb/intversion-long-queue.html [ Failure ]
-storage/indexeddb/intversion-omit-parameter.html [ Failure ]
-storage/indexeddb/intversion-open-in-upgradeneeded.html [ Failure ]
-storage/indexeddb/intversion-open-with-version.html [ Failure ]
-storage/indexeddb/intversion-pending-version-changes-ascending.html [ Failure ]
-storage/indexeddb/intversion-pending-version-changes-descending.html [ Failure ]
-storage/indexeddb/intversion-pending-version-changes-same.html [ Failure ]
-storage/indexeddb/intversion-persistence.html [ Failure ]
-storage/indexeddb/intversion-revert-on-abort.html [ Failure ]
-storage/indexeddb/intversion-two-opens-no-versions.html [ Failure ]
-storage/indexeddb/intversion-upgrades.html [ Failure ]
</del><span class="cx"> storage/indexeddb/key-generator.html [ Failure ]
</span><span class="cx"> storage/indexeddb/key-sort-order-across-types.html [ Failure ]
</span><span class="cx"> storage/indexeddb/key-sort-order-date.html [ Failure ]
</span><span class="cx"> storage/indexeddb/key-type-array.html [ Failure ]
</span><del>-storage/indexeddb/key-type-binary.html [ Failure ]
</del><span class="cx"> storage/indexeddb/key-type-infinity.html [ Failure ]
</span><span class="cx"> storage/indexeddb/keypath-arrays.html [ Failure ]
</span><span class="cx"> storage/indexeddb/keypath-edges.html [ Failure ]
</span><span class="lines">@@ -534,10 +504,8 @@
</span><span class="cx"> storage/indexeddb/modern/autoincrement-abort.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/basic-add.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/basic-put.html [ Failure ]
</span><del>-storage/indexeddb/modern/blocked-open-db-requests.html [ Failure ]
</del><span class="cx"> storage/indexeddb/modern/create-index-failures.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/createobjectstore-basic.html [ Failure ]
</span><del>-storage/indexeddb/modern/createobjectstore-failures.html [ Failure ]
</del><span class="cx"> storage/indexeddb/modern/cursor-1.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/cursor-2.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/cursor-3.html [ Failure ]
</span><span class="lines">@@ -552,7 +520,6 @@
</span><span class="cx"> storage/indexeddb/modern/deleteindex-1.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/deleteindex-2.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/deleteobjectstore-1.html [ Failure ]
</span><del>-storage/indexeddb/modern/double-open.html [ Failure ]
</del><span class="cx"> storage/indexeddb/modern/get-index-failures.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/get-keyrange.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html [ Failure ]
</span><span class="lines">@@ -583,18 +550,13 @@
</span><span class="cx"> storage/indexeddb/modern/objectstore-cursor-advance-failures.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/objectstore-cursor-continue-failures.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/opencursor-failures.html [ Failure ]
</span><del>-storage/indexeddb/modern/opendatabase-success-after-versionchange.html [ Failure ]
-storage/indexeddb/modern/opendatabase-versions.html [ Failure ]
</del><span class="cx"> storage/indexeddb/modern/request-readystate.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/transaction-scheduler-1.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/transaction-scheduler-2.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/transaction-scheduler-3.html [ Failure ]
</span><del>-storage/indexeddb/modern/transaction-scheduler-4.html [ Failure ]
</del><span class="cx"> storage/indexeddb/modern/transaction-scheduler-5.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/transaction-scheduler-6.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/transactions-stop-on-navigation.html [ Failure ]
</span><del>-storage/indexeddb/modern/versionchange-abort-then-reopen.html [ Failure ]
-storage/indexeddb/modern/versionchange-event.html [ Failure ]
</del><span class="cx"> storage/indexeddb/mozilla/add-twice-failure.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/autoincrement-indexes.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/bad-keypath.html [ Failure ]
</span><span class="lines">@@ -606,7 +568,6 @@
</span><span class="cx"> storage/indexeddb/mozilla/cursors.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/delete-result.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/event-source.html [ Failure ]
</span><del>-storage/indexeddb/mozilla/global-data.html [ Failure ]
</del><span class="cx"> storage/indexeddb/mozilla/index-prev-no-duplicate.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/indexes.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/key-requirements.html [ Failure ]
</span><span class="lines">@@ -615,15 +576,12 @@
</span><span class="cx"> storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/object-store-remove-values.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/odd-result-order.html [ Failure ]
</span><del>-storage/indexeddb/mozilla/open-database-null-name.html [ Failure ]
</del><span class="cx"> storage/indexeddb/mozilla/put-get-values.html [ Failure ]
</span><del>-storage/indexeddb/mozilla/readonly-transactions.html [ Failure ]
</del><span class="cx"> storage/indexeddb/mozilla/readwrite-transactions.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/readyState.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mozilla/remove-objectstore.html [ Failure ]
</span><span class="cx"> storage/indexeddb/mutating-cursor.html [ Failure ]
</span><span class="cx"> storage/indexeddb/noblobs.html [ Failure ]
</span><del>-storage/indexeddb/object-lookups-in-versionchange.html [ Failure ]
</del><span class="cx"> storage/indexeddb/objectstore-autoincrement.html [ Failure ]
</span><span class="cx"> storage/indexeddb/objectstore-basics.html [ Failure ]
</span><span class="cx"> storage/indexeddb/objectstore-clear.html [ Failure ]
</span><span class="lines">@@ -633,50 +591,36 @@
</span><span class="cx"> storage/indexeddb/odd-strings.html [ Failure ]
</span><span class="cx"> storage/indexeddb/open-cursor.html [ Failure ]
</span><span class="cx"> storage/indexeddb/open-during-transaction.html [ Failure ]
</span><del>-storage/indexeddb/open-ordering.html [ Failure ]
</del><span class="cx"> storage/indexeddb/opencursor-key.html [ Failure ]
</span><span class="cx"> storage/indexeddb/optional-arguments.html [ Failure ]
</span><span class="cx"> storage/indexeddb/pending-activity.html [ Failure ]
</span><del>-storage/indexeddb/persistence.html [ Failure ]
</del><span class="cx"> storage/indexeddb/prefetch-bugfix-108071.html [ Failure ]
</span><del>-storage/indexeddb/prefetch-invalidation.html [ Failure ]
</del><span class="cx"> storage/indexeddb/prefetch-race.html [ Failure ]
</span><span class="cx"> storage/indexeddb/queued-commands.html [ Failure ]
</span><span class="cx"> storage/indexeddb/readonly.html [ Failure ]
</span><span class="cx"> storage/indexeddb/request-continue-abort.html [ Failure ]
</span><span class="cx"> storage/indexeddb/request-event-propagation.html [ Failure ]
</span><span class="cx"> storage/indexeddb/request-result-cache.html [ Failure ]
</span><del>-storage/indexeddb/set_version_blocked.html [ Failure ]
-storage/indexeddb/setversion-blocked-by-versionchange-close.html [ Failure ]
-storage/indexeddb/setversion-not-blocked.html [ Failure ]
</del><span class="cx"> storage/indexeddb/structured-clone.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-abort.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-active-flag.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-after-close.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-and-objectstore-calls.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-basics.html [ Failure ]
</span><del>-storage/indexeddb/transaction-complete-with-js-recursion-cross-frame.html [ Failure ]
-storage/indexeddb/transaction-complete-with-js-recursion.html [ Failure ]
</del><span class="cx"> storage/indexeddb/transaction-coordination-across-databases.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-coordination-within-database.html [ Failure ]
</span><del>-storage/indexeddb/transaction-crash-on-abort.html [ Failure ]
</del><span class="cx"> storage/indexeddb/transaction-error.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-event-propagation.html [ Failure ]
</span><del>-storage/indexeddb/transaction-ordering.html [ Failure ]
</del><span class="cx"> storage/indexeddb/transaction-overlapping.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-read-only.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-readwrite-exclusive.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-rollback.html [ Failure ]
</span><span class="cx"> storage/indexeddb/transaction-scope-sequencing.html [ Failure ]
</span><del>-storage/indexeddb/unblocked-version-changes.html [ Failure ]
</del><span class="cx"> storage/indexeddb/value-undefined.html [ Failure ]
</span><span class="cx"> storage/indexeddb/values-odd-types.html [ Failure ]
</span><del>-storage/indexeddb/version-change-abort.html [ Failure ]
-storage/indexeddb/version-change-event.html [ Failure ]
</del><span class="cx"> storage/indexeddb/version-change-exclusive.html [ Failure ]
</span><del>-storage/indexeddb/versionchangerequest-activedomobject.html [ Failure ]
</del><span class="cx"> 
</span><del>-#SQLite backend tests that timeout
</del><ins>+# SQLite backend tests that timeout
</ins><span class="cx"> crypto/subtle/rsa-indexeddb.html [ Skip ]
</span><span class="cx"> imported/w3c/indexeddb/idbcursor-advance-continue-async.htm [ Skip ]
</span><span class="cx"> imported/w3c/indexeddb/idbcursor-advance-invalid.htm [ Skip ]
</span><span class="lines">@@ -687,7 +631,16 @@
</span><span class="cx"> imported/w3c/indexeddb/idbindex-multientry-big.htm [ Skip ]
</span><span class="cx"> imported/w3c/indexeddb/idbobjectstore_openCursor_invalid.htm [ Skip ]
</span><span class="cx"> imported/w3c/indexeddb/keypath.htm [ Skip ]
</span><ins>+storage/indexeddb/deletedatabase-transaction.html [ Skip ]
+storage/indexeddb/modern/blocked-open-db-requests.html [ Skip ]
+storage/indexeddb/modern/transaction-scheduler-4.html [ Skip ]
+storage/indexeddb/prefetch-invalidation.html [ Skip ]
</ins><span class="cx"> storage/indexeddb/primary-key-unique-to-objectstore.html [ Skip ]
</span><ins>+storage/indexeddb/transaction-ordering.html [ Skip ]
</ins><span class="cx"> 
</span><ins>+# SQLite backend tests that ASSERT
+storage/indexeddb/database-odd-names.html [ Skip ]
+storage/indexeddb/dont-wedge.html [ Skip ]
+
</ins><span class="cx"> ### END OF (3) IndexedDB failures with SQLite
</span><span class="cx"> ########################################
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/ChangeLog        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -1,3 +1,65 @@
</span><ins>+2016-01-22  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Add transactions and create/delete object store to SQLite backend
+        https://bugs.webkit.org/show_bug.cgi?id=153359
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Covered by many tests now passing).
+
+        * Modules/indexeddb/server/IDBBackingStore.h: Change deleteObjectStore to work on an ID instead of name.
+
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
+        (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByIdentifier):
+        (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName): Deleted.
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+
+        Clean up filename generation a bit to actually match the previous directory structure.
+        Add begin/commit/abort transaction support.
+        Add create/delete object store support:
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::filenameForDatabaseName):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectory):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabasePath):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
+        
+        Clean up SQLiteIDBTransaction to fit with the new WebCore backing store model, which is slightly
+        different from the old WebKit2 backing store model:
+        * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
+        (WebCore::IDBServer::SQLiteIDBTransaction::SQLiteIDBTransaction):
+        (WebCore::IDBServer::SQLiteIDBTransaction::begin):
+        (WebCore::IDBServer::SQLiteIDBTransaction::commit):
+        (WebCore::IDBServer::SQLiteIDBTransaction::abort):
+        (WebCore::IDBServer::SQLiteIDBTransaction::reset):
+        (WebCore::IDBServer::SQLiteIDBTransaction::rollback): Deleted.
+        * Modules/indexeddb/server/SQLiteIDBTransaction.h:
+        (WebCore::IDBServer::SQLiteIDBTransaction::transactionIdentifier):
+        (WebCore::IDBServer::SQLiteIDBTransaction::mode):
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
+        (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteObjectStore):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+        
+        * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
+        (WebCore::IDBDatabaseInfo::deleteObjectStore):
+        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
+        
+        * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
+        (WebCore::IDBObjectStoreInfo::maxIndexID):
+        
+        * Modules/indexeddb/shared/IDBTransactionInfo.h:
+        (WebCore::IDBTransactionInfo::identifier):
+
</ins><span class="cx"> 2016-01-22  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Style resolver initialization cleanups
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -61,7 +61,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><del>-    virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName) = 0;
</del><ins>+    virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</ins><span class="cx">     virtual IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx">     virtual IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) = 0;
</span><span class="cx">     virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -145,24 +145,24 @@
</span><span class="cx">     return IDBError();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError MemoryIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName)
</del><ins>+IDBError MemoryIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::deleteObjectStore&quot;);
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_databaseInfo);
</span><del>-    if (!m_databaseInfo-&gt;hasObjectStore(objectStoreName))
</del><ins>+    if (!m_databaseInfo-&gt;infoForExistingObjectStore(objectStoreIdentifier))
</ins><span class="cx">         return IDBError(IDBDatabaseException::ConstraintError);
</span><span class="cx"> 
</span><span class="cx">     auto transaction = m_transactions.get(transactionIdentifier);
</span><span class="cx">     ASSERT(transaction);
</span><span class="cx">     ASSERT(transaction-&gt;isVersionChange());
</span><span class="cx"> 
</span><del>-    auto objectStore = takeObjectStoreByName(objectStoreName);
</del><ins>+    auto objectStore = takeObjectStoreByIdentifier(objectStoreIdentifier);
</ins><span class="cx">     ASSERT(objectStore);
</span><span class="cx">     if (!objectStore)
</span><span class="cx">         return IDBError(IDBDatabaseException::ConstraintError);
</span><span class="cx"> 
</span><del>-    m_databaseInfo-&gt;deleteObjectStore(objectStoreName);
</del><ins>+    m_databaseInfo-&gt;deleteObjectStore(objectStore-&gt;info().name());
</ins><span class="cx">     transaction-&gt;objectStoreDeleted(*objectStore);
</span><span class="cx"> 
</span><span class="cx">     return IDBError();
</span><span class="lines">@@ -469,16 +469,16 @@
</span><span class="cx">     m_objectStoresByIdentifier.remove(objectStore.info().identifier());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;MemoryObjectStore&gt; MemoryIDBBackingStore::takeObjectStoreByName(const String&amp; name)
</del><ins>+RefPtr&lt;MemoryObjectStore&gt; MemoryIDBBackingStore::takeObjectStoreByIdentifier(uint64_t identifier)
</ins><span class="cx"> {
</span><del>-    auto objectStoreByName = m_objectStoresByName.take(name);
-    if (!objectStoreByName)
</del><ins>+    auto objectStoreByIdentifier = m_objectStoresByIdentifier.take(identifier);
+    if (!objectStoreByIdentifier)
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    auto objectStore = m_objectStoresByIdentifier.take(objectStoreByName-&gt;info().identifier());
-    ASSERT(objectStore);
</del><ins>+    auto objectStore = m_objectStoresByName.take(objectStoreByIdentifier-&gt;info().name());
+    ASSERT_UNUSED(objectStore, objectStore);
</ins><span class="cx"> 
</span><del>-    return objectStore;
</del><ins>+    return objectStoreByIdentifier;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MemoryIDBBackingStore::deleteBackingStore()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -53,7 +53,7 @@
</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><del>-    virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName) override final;
</del><ins>+    virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</ins><span class="cx">     virtual IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</span><span class="cx">     virtual IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) override final;
</span><span class="cx">     virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName) override final;
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> private:
</span><span class="cx">     MemoryIDBBackingStore(const IDBDatabaseIdentifier&amp;);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;MemoryObjectStore&gt; takeObjectStoreByName(const String&amp; name);
</del><ins>+    RefPtr&lt;MemoryObjectStore&gt; takeObjectStoreByIdentifier(uint64_t identifier);
</ins><span class="cx"> 
</span><span class="cx">     IDBDatabaseIdentifier m_identifier;
</span><span class="cx">     std::unique_ptr&lt;IDBDatabaseInfo&gt; m_databaseInfo;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -29,10 +29,12 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FileSystem.h&quot;
</span><ins>+#include &quot;IDBBindingUtilities.h&quot;
</ins><span class="cx"> #include &quot;IDBDatabaseException.h&quot;
</span><span class="cx"> #include &quot;IDBKeyData.h&quot;
</span><span class="cx"> #include &quot;IDBSerialization.h&quot;
</span><span class="cx"> #include &quot;IDBTransactionInfo.h&quot;
</span><ins>+#include &quot;IndexKey.h&quot;
</ins><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;SQLiteDatabase.h&quot;
</span><span class="cx"> #include &quot;SQLiteFileSystem.h&quot;
</span><span class="lines">@@ -41,6 +43,8 @@
</span><span class="cx"> #include &quot;SQLiteTransaction.h&quot;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><ins>+using namespace JSC;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><span class="lines">@@ -390,6 +394,33 @@
</span><span class="cx">     return databaseInfo;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String SQLiteIDBBackingStore::filenameForDatabaseName() const
+{
+    ASSERT(!m_identifier.databaseName().isNull());
+
+    if (m_identifier.databaseName().isEmpty())
+        return &quot;%00&quot;;
+
+    String filename = encodeForFileName(m_identifier.databaseName());
+    filename.replace('.', &quot;%2E&quot;);
+
+    return filename;
+}
+
+String SQLiteIDBBackingStore::fullDatabaseDirectory() const
+{
+    ASSERT(!m_identifier.databaseName().isNull());
+
+    return pathByAppendingComponent(m_absoluteDatabaseDirectory, filenameForDatabaseName());
+}
+
+String SQLiteIDBBackingStore::fullDatabasePath() const
+{
+    ASSERT(!m_identifier.databaseName().isNull());
+
+    return pathByAppendingComponent(fullDatabaseDirectory(), &quot;IndexedDB.sqlite3&quot;);
+}
+
</ins><span class="cx"> const IDBDatabaseInfo&amp; SQLiteIDBBackingStore::getOrEstablishDatabaseInfo()
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::getOrEstablishDatabaseInfo - database %s&quot;, m_identifier.databaseName().utf8().data());
</span><span class="lines">@@ -399,10 +430,9 @@
</span><span class="cx"> 
</span><span class="cx">     m_databaseInfo = std::make_unique&lt;IDBDatabaseInfo&gt;(m_identifier.databaseName(), 0);
</span><span class="cx"> 
</span><del>-    makeAllDirectories(m_absoluteDatabaseDirectory);
</del><ins>+    makeAllDirectories(fullDatabaseDirectory());
+    String dbFilename = fullDatabasePath();
</ins><span class="cx"> 
</span><del>-    String dbFilename = pathByAppendingComponent(m_absoluteDatabaseDirectory, &quot;IndexedDB.sqlite3&quot;);
-
</del><span class="cx">     m_sqliteDB = std::make_unique&lt;SQLiteDatabase&gt;();
</span><span class="cx">     if (!m_sqliteDB-&gt;open(dbFilename)) {
</span><span class="cx">         LOG_ERROR(&quot;Failed to open SQLite database at path '%s'&quot;, dbFilename.utf8().data());
</span><span class="lines">@@ -437,38 +467,175 @@
</span><span class="cx"> IDBError SQLiteIDBBackingStore::beginTransaction(const IDBTransactionInfo&amp; info)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::beginTransaction - %s&quot;, info.identifier().loggingString().utf8().data());
</span><del>-    UNUSED_PARAM(info);
</del><span class="cx"> 
</span><del>-    return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Not implemented&quot;) };
</del><ins>+    ASSERT(m_sqliteDB);
+    ASSERT(m_sqliteDB-&gt;isOpen());
+
+    auto addResult = m_transactions.add(info.identifier(), nullptr);
+    if (!addResult.isNewEntry) {
+        LOG_ERROR(&quot;Attempt to establish transaction identifier that already exists&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to establish transaction identifier that already exists&quot;) };
+    }
+
+    addResult.iterator-&gt;value = std::make_unique&lt;SQLiteIDBTransaction&gt;(*this, info);
+    return addResult.iterator-&gt;value-&gt;begin(*m_sqliteDB);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IDBError SQLiteIDBBackingStore::abortTransaction(const IDBResourceIdentifier&amp; identifier)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::abortTransaction - %s&quot;, identifier.loggingString().utf8().data());
</span><del>-    UNUSED_PARAM(identifier);
</del><span class="cx"> 
</span><del>-    return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Not implemented&quot;) };
</del><ins>+    ASSERT(m_sqliteDB);
+    ASSERT(m_sqliteDB-&gt;isOpen());
+
+    auto transaction = m_transactions.take(identifier);
+    if (!transaction) {
+        LOG_ERROR(&quot;Attempt to commit a transaction that hasn't been established&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to abort a transaction that hasn't been established&quot;) };
+    }
+
+    return transaction-&gt;abort();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IDBError SQLiteIDBBackingStore::commitTransaction(const IDBResourceIdentifier&amp; identifier)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::commitTransaction - %s&quot;, identifier.loggingString().utf8().data());
</span><del>-    UNUSED_PARAM(identifier);
</del><span class="cx"> 
</span><del>-    return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Not implemented&quot;) };
</del><ins>+    ASSERT(m_sqliteDB);
+    ASSERT(m_sqliteDB-&gt;isOpen());
+
+    auto transaction = m_transactions.take(identifier);
+    if (!transaction) {
+        LOG_ERROR(&quot;Attempt to commit a transaction that hasn't been established&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to commit a transaction that hasn't been established&quot;) };
+    }
+
+    return transaction-&gt;commit();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError SQLiteIDBBackingStore::createObjectStore(const IDBResourceIdentifier&amp;, const IDBObjectStoreInfo&amp; info)
</del><ins>+IDBError SQLiteIDBBackingStore::createObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp; info)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::createObjectStore - adding OS %s with ID %&quot; PRIu64, info.name().utf8().data(), info.identifier());
</span><del>-    UNUSED_PARAM(info);
</del><span class="cx"> 
</span><del>-    return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Not implemented&quot;) };
</del><ins>+    ASSERT(m_sqliteDB);
+    ASSERT(m_sqliteDB-&gt;isOpen());
+
+    auto* transaction = m_transactions.get(transactionIdentifier);
+    if (!transaction || !transaction-&gt;inProgress()) {
+        LOG_ERROR(&quot;Attempt to create an object store without an in-progress transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to create an object store without an in-progress transaction&quot;) };
+    }
+    if (transaction-&gt;mode() != IndexedDB::TransactionMode::VersionChange) {
+        LOG_ERROR(&quot;Attempt to create an object store in a non-version-change transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to create an object store in a non-version-change transaction&quot;) };
+    }
+
+    RefPtr&lt;SharedBuffer&gt; keyPathBlob = serializeIDBKeyPath(info.keyPath());
+    if (!keyPathBlob) {
+        LOG_ERROR(&quot;Unable to serialize IDBKeyPath to save in database for new object store&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Unable to serialize IDBKeyPath to save in database for new object store&quot;) };
+    }
+
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;INSERT INTO ObjectStoreInfo VALUES (?, ?, ?, ?, ?);&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, info.identifier()) != SQLITE_OK
+            || sql.bindText(2, info.name()) != SQLITE_OK
+            || sql.bindBlob(3, keyPathBlob-&gt;data(), keyPathBlob-&gt;size()) != SQLITE_OK
+            || sql.bindInt(4, info.autoIncrement()) != SQLITE_OK
+            || sql.bindInt64(5, info.maxIndexID()) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not add object store '%s' to ObjectStoreInfo table (%i) - %s&quot;, info.name().utf8().data(), m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not create object store&quot;) };
+        }
+    }
+
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;INSERT INTO KeyGenerators VALUES (?, 0);&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, info.identifier()) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not seed initial key generator value for ObjectStoreInfo table (%i) - %s&quot;, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not seed initial key generator value for object store&quot;) };
+        }
+    }
+
+    return { };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError SQLiteIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier&amp;, const String&amp;)
</del><ins>+IDBError SQLiteIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier)
</ins><span class="cx"> {
</span><del>-    return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Not implemented&quot;) };
</del><ins>+    LOG(IndexedDB, &quot;SQLiteIDBBackingStore::deleteObjectStore - object store %&quot; PRIu64, objectStoreIdentifier);
+
+    ASSERT(m_sqliteDB);
+    ASSERT(m_sqliteDB-&gt;isOpen());
+
+    auto* transaction = m_transactions.get(transactionIdentifier);
+    if (!transaction || !transaction-&gt;inProgress()) {
+        LOG_ERROR(&quot;Attempt to delete an object store without an in-progress transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to delete an object store without an in-progress transaction&quot;) };
+    }
+    if (transaction-&gt;mode() != IndexedDB::TransactionMode::VersionChange) {
+        LOG_ERROR(&quot;Attempt to delete an object store in a non-version-change transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to delete an object store in a non-version-change transaction&quot;) };
+    }
+
+    // Delete the ObjectStore record
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;DELETE FROM ObjectStoreInfo WHERE id = ?;&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not delete object store id %&quot; PRIi64 &quot; from ObjectStoreInfo table (%i) - %s&quot;, objectStoreIdentifier, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not delete object store&quot;) };
+        }
+    }
+
+    // Delete the ObjectStore's key generator record if there is one.
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;DELETE FROM KeyGenerators WHERE objectStoreID = ?;&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not delete object store from KeyGenerators table (%i) - %s&quot;, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not delete key generator for deleted object store&quot;) };
+        }
+    }
+
+    // Delete all associated records
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;DELETE FROM Records WHERE objectStoreID = ?;&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not delete records for object store %&quot; PRIi64 &quot; (%i) - %s&quot;, objectStoreIdentifier, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not delete records for deleted object store&quot;) };
+        }
+    }
+
+    // Delete all associated Indexes
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;DELETE FROM IndexInfo WHERE objectStoreID = ?;&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not delete index from IndexInfo table (%i) - %s&quot;, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not delete IDBIndex for deleted object store&quot;) };
+        }
+    }
+
+    // Delete all associated Index records
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;DELETE FROM IndexRecords WHERE objectStoreID = ?;&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not delete index records(%i) - %s&quot;, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not delete IDBIndex records for deleted object store&quot;) };
+        }
+    }
+
+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IDBError SQLiteIDBBackingStore::clearObjectStore(const IDBResourceIdentifier&amp;, uint64_t)
</span><span class="lines">@@ -543,7 +710,7 @@
</span><span class="cx"> 
</span><span class="cx"> void SQLiteIDBBackingStore::deleteBackingStore()
</span><span class="cx"> {
</span><del>-    String dbFilename = pathByAppendingComponent(m_absoluteDatabaseDirectory, &quot;IndexedDB.sqlite3&quot;);
</del><ins>+    String dbFilename = fullDatabasePath();
</ins><span class="cx"> 
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::deleteBackingStore deleting file '%s' on disk&quot;, dbFilename.utf8().data());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -55,7 +55,7 @@
</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><del>-    virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName) override final;
</del><ins>+    virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</ins><span class="cx">     virtual IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</span><span class="cx">     virtual IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) override final;
</span><span class="cx">     virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName) override final;
</span><span class="lines">@@ -76,6 +76,10 @@
</span><span class="cx">     void unregisterCursor(SQLiteIDBCursor&amp;);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    String filenameForDatabaseName() const;
+    String fullDatabaseDirectory() const;
+    String fullDatabasePath() const;
+
</ins><span class="cx">     bool ensureValidRecordsTable();
</span><span class="cx">     std::unique_ptr&lt;IDBDatabaseInfo&gt; createAndPopulateInitialDatabaseInfo();
</span><span class="cx">     std::unique_ptr&lt;IDBDatabaseInfo&gt; extractExistingDatabaseInfo();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -36,9 +36,8 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><del>-SQLiteIDBTransaction::SQLiteIDBTransaction(SQLiteIDBBackingStore&amp; backingStore, const IDBResourceIdentifier&amp; transactionIdentifier, IndexedDB::TransactionMode mode)
-    : m_identifier(transactionIdentifier)
-    , m_mode(mode)
</del><ins>+SQLiteIDBTransaction::SQLiteIDBTransaction(SQLiteIDBBackingStore&amp; backingStore, const IDBTransactionInfo&amp; info)
+    : m_info(info)
</ins><span class="cx">     , m_backingStore(backingStore)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -53,45 +52,53 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-bool SQLiteIDBTransaction::begin(SQLiteDatabase&amp; database)
</del><ins>+IDBError SQLiteIDBTransaction::begin(SQLiteDatabase&amp; database)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!m_sqliteTransaction);
</span><del>-    m_sqliteTransaction = std::make_unique&lt;SQLiteTransaction&gt;(database, m_mode == IndexedDB::TransactionMode::ReadOnly);
</del><span class="cx"> 
</span><ins>+    m_sqliteTransaction = std::make_unique&lt;SQLiteTransaction&gt;(database, m_info.mode() == IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx">     m_sqliteTransaction-&gt;begin();
</span><span class="cx"> 
</span><del>-    return m_sqliteTransaction-&gt;inProgress();
</del><ins>+    if (m_sqliteTransaction-&gt;inProgress())
+        return { };
+
+    return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Could not start SQLite transaction in database backend&quot;) };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SQLiteIDBTransaction::commit()
</del><ins>+IDBError SQLiteIDBTransaction::commit()
</ins><span class="cx"> {
</span><del>-    // It's okay to not have a SQLite transaction or not have started it yet because it's okay for a WebProcess
-    // to request the commit of a transaction immediately after creating it before it has even been used.
</del><span class="cx">     if (!m_sqliteTransaction || !m_sqliteTransaction-&gt;inProgress())
</span><del>-        return false;
</del><ins>+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No SQLite transaction in progress to commit&quot;) };
</ins><span class="cx"> 
</span><span class="cx">     m_sqliteTransaction-&gt;commit();
</span><span class="cx"> 
</span><del>-    return !m_sqliteTransaction-&gt;inProgress();
</del><ins>+    if (m_sqliteTransaction-&gt;inProgress())
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Unable to commit SQLite transaction in database backend&quot;) };
+
+    reset();
+    return { };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SQLiteIDBTransaction::reset()
</del><ins>+IDBError SQLiteIDBTransaction::abort()
</ins><span class="cx"> {
</span><del>-    m_sqliteTransaction = nullptr;
-    clearCursors();
</del><ins>+    if (!m_sqliteTransaction || !m_sqliteTransaction-&gt;inProgress())
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No SQLite transaction in progress to abort&quot;) };
</ins><span class="cx"> 
</span><del>-    return true;
-}
</del><ins>+    m_sqliteTransaction-&gt;rollback();
</ins><span class="cx"> 
</span><del>-bool SQLiteIDBTransaction::rollback()
-{
-    ASSERT(m_sqliteTransaction);
</del><span class="cx">     if (m_sqliteTransaction-&gt;inProgress())
</span><del>-        m_sqliteTransaction-&gt;rollback();
</del><ins>+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Unable to abort SQLite transaction in database backend&quot;) };
</ins><span class="cx"> 
</span><del>-    return true;
</del><ins>+    reset();
+    return { };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void SQLiteIDBTransaction::reset()
+{
+    m_sqliteTransaction = nullptr;
+    clearCursors();
+}
+
</ins><span class="cx"> SQLiteIDBCursor* SQLiteIDBTransaction::maybeOpenCursor(const IDBCursorInfo&amp; info)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_sqliteTransaction);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -28,7 +28,9 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBError.h&quot;
</ins><span class="cx"> #include &quot;IDBResourceIdentifier.h&quot;
</span><ins>+#include &quot;IDBTransactionInfo.h&quot;
</ins><span class="cx"> #include &quot;IndexedDB.h&quot;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="lines">@@ -48,31 +50,30 @@
</span><span class="cx"> class SQLiteIDBTransaction {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(SQLiteIDBTransaction);
</span><span class="cx"> public:
</span><del>-    SQLiteIDBTransaction(SQLiteIDBBackingStore&amp;, const IDBResourceIdentifier&amp; transactionIdentifier, IndexedDB::TransactionMode);
</del><ins>+    SQLiteIDBTransaction(SQLiteIDBBackingStore&amp;, const IDBTransactionInfo&amp;);
</ins><span class="cx">     ~SQLiteIDBTransaction();
</span><span class="cx"> 
</span><del>-    const IDBResourceIdentifier&amp; transactionIdentifier() const { return m_identifier; }
</del><ins>+    const IDBResourceIdentifier&amp; transactionIdentifier() const { return m_info.identifier(); }
</ins><span class="cx"> 
</span><del>-    bool begin(SQLiteDatabase&amp;);
-    bool commit();
-    bool reset();
-    bool rollback();
</del><ins>+    IDBError begin(SQLiteDatabase&amp;);
+    IDBError commit();
+    IDBError abort();
</ins><span class="cx"> 
</span><span class="cx">     SQLiteIDBCursor* maybeOpenCursor(const IDBCursorInfo&amp;);
</span><span class="cx"> 
</span><span class="cx">     void closeCursor(SQLiteIDBCursor&amp;);
</span><span class="cx">     void notifyCursorsOfChanges(int64_t objectStoreID);
</span><span class="cx"> 
</span><del>-    IndexedDB::TransactionMode mode() const { return m_mode; }
</del><ins>+    IndexedDB::TransactionMode mode() const { return m_info.mode(); }
</ins><span class="cx">     bool inProgress() const;
</span><span class="cx"> 
</span><span class="cx">     SQLiteTransaction* sqliteTransaction() const { return m_sqliteTransaction.get(); }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void clearCursors();
</span><ins>+    void reset();
</ins><span class="cx"> 
</span><del>-    IDBResourceIdentifier m_identifier;
-    IndexedDB::TransactionMode m_mode;
</del><ins>+    IDBTransactionInfo m_info;
</ins><span class="cx"> 
</span><span class="cx">     SQLiteIDBBackingStore&amp; m_backingStore;
</span><span class="cx">     std::unique_ptr&lt;SQLiteTransaction&gt; m_sqliteTransaction;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -502,28 +502,35 @@
</span><span class="cx">     LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::deleteObjectStore&quot;);
</span><span class="cx"> 
</span><span class="cx">     uint64_t callbackID = storeCallback(callback);
</span><del>-    m_server.postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performDeleteObjectStore, callbackID, transaction.info().identifier(), objectStoreName));
</del><ins>+
+    auto* info = m_databaseInfo-&gt;infoForExistingObjectStore(objectStoreName);
+    if (!info) {
+        performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to delete non-existant object store&quot;) });
+        return;
+    }
+
+    m_server.postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performDeleteObjectStore, callbackID, transaction.info().identifier(), info-&gt;identifier()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName)
</del><ins>+void UniqueIDBDatabase::performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(db) UniqueIDBDatabase::performDeleteObjectStore&quot;);
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_backingStore);
</span><del>-    m_backingStore-&gt;deleteObjectStore(transactionIdentifier, objectStoreName);
</del><ins>+    m_backingStore-&gt;deleteObjectStore(transactionIdentifier, objectStoreIdentifier);
</ins><span class="cx"> 
</span><span class="cx">     IDBError error;
</span><del>-    m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformDeleteObjectStore, callbackIdentifier, error, objectStoreName));
</del><ins>+    m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformDeleteObjectStore, callbackIdentifier, error, objectStoreIdentifier));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&amp; error, const String&amp; objectStoreName)
</del><ins>+void UniqueIDBDatabase::didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&amp; error, uint64_t objectStoreIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::didPerformDeleteObjectStore&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (error.isNull())
</span><del>-        m_databaseInfo-&gt;deleteObjectStore(objectStoreName);
</del><ins>+        m_databaseInfo-&gt;deleteObjectStore(objectStoreIdentifier);
</ins><span class="cx"> 
</span><span class="cx">     performErrorCallback(callbackIdentifier, error);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -131,7 +131,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><del>-    void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName);
</del><ins>+    void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier);
</ins><span class="cx">     void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier);
</span><span class="cx">     void performCreateIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;);
</span><span class="cx">     void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName);
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">     void didDeleteBackingStore();
</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><del>-    void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&amp;, const String&amp; objectStoreName);
</del><ins>+    void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t objectStoreIdentifier);
</ins><span class="cx">     void didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError&amp;);
</span><span class="cx">     void didPerformCreateIndex(uint64_t callbackIdentifier, const IDBError&amp;, const IDBIndexInfo&amp;);
</span><span class="cx">     void didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -135,6 +135,11 @@
</span><span class="cx">     m_objectStoreMap.remove(info-&gt;identifier());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBDatabaseInfo::deleteObjectStore(uint64_t objectStoreIdentifier)
+{
+    m_objectStoreMap.remove(objectStoreIdentifier);
+}
+
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> String IDBDatabaseInfo::loggingString() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx">     Vector&lt;String&gt; objectStoreNames() const;
</span><span class="cx"> 
</span><span class="cx">     void deleteObjectStore(const String&amp; objectStoreName);
</span><ins>+    void deleteObjectStore(uint64_t objectStoreIdentifier);
</ins><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     String loggingString() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">     const String&amp; name() const { return m_name; }
</span><span class="cx">     const IDBKeyPath&amp; keyPath() const { return m_keyPath; }
</span><span class="cx">     bool autoIncrement() const { return m_autoIncrement; }
</span><ins>+    uint64_t maxIndexID() const { return m_maxIndexID; }
</ins><span class="cx"> 
</span><span class="cx">     IDBObjectStoreInfo isolatedCopy() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h (195466 => 195467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h        2016-01-22 20:03:01 UTC (rev 195466)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h        2016-01-22 20:37:42 UTC (rev 195467)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> 
</span><span class="cx">     IDBTransactionInfo isolatedCopy() const;
</span><span class="cx"> 
</span><del>-    IDBResourceIdentifier identifier() const { return m_identifier; }
</del><ins>+    const IDBResourceIdentifier&amp; identifier() const { return m_identifier; }
</ins><span class="cx"> 
</span><span class="cx">     IndexedDB::TransactionMode mode() const { return m_mode; }
</span><span class="cx">     uint64_t newVersion() const { return m_newVersion; }
</span></span></pre>
</div>
</div>

</body>
</html>