<!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 <beidson@apple.com>
+
+ 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 <cfleizach@apple.com>
</span><span class="cx">
</span><span class="cx"> AX: <code> 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 <beidson@apple.com>
+
+ 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 <antti@apple.com>
</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& transactionIdentifier) = 0;
</span><span class="cx">
</span><span class="cx"> virtual IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) = 0;
</span><del>- virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, const String& objectStoreName) = 0;
</del><ins>+ virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</ins><span class="cx"> virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx"> virtual IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) = 0;
</span><span class="cx"> virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& 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& transactionIdentifier, const String& objectStoreName)
</del><ins>+IDBError MemoryIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "MemoryIDBBackingStore::deleteObjectStore");
</span><span class="cx">
</span><span class="cx"> ASSERT(m_databaseInfo);
</span><del>- if (!m_databaseInfo->hasObjectStore(objectStoreName))
</del><ins>+ if (!m_databaseInfo->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->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->deleteObjectStore(objectStoreName);
</del><ins>+ m_databaseInfo->deleteObjectStore(objectStore->info().name());
</ins><span class="cx"> transaction->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<MemoryObjectStore> MemoryIDBBackingStore::takeObjectStoreByName(const String& name)
</del><ins>+RefPtr<MemoryObjectStore> 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->info().identifier());
- ASSERT(objectStore);
</del><ins>+ auto objectStore = m_objectStoresByName.take(objectStoreByIdentifier->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& transactionIdentifier) override final;
</span><span class="cx"> virtual IDBError commitTransaction(const IDBResourceIdentifier& transactionIdentifier) override final;
</span><span class="cx"> virtual IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) override final;
</span><del>- virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, const String& objectStoreName) override final;
</del><ins>+ virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</ins><span class="cx"> virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</span><span class="cx"> virtual IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) override final;
</span><span class="cx"> virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName) override final;
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> private:
</span><span class="cx"> MemoryIDBBackingStore(const IDBDatabaseIdentifier&);
</span><span class="cx">
</span><del>- RefPtr<MemoryObjectStore> takeObjectStoreByName(const String& name);
</del><ins>+ RefPtr<MemoryObjectStore> takeObjectStoreByIdentifier(uint64_t identifier);
</ins><span class="cx">
</span><span class="cx"> IDBDatabaseIdentifier m_identifier;
</span><span class="cx"> std::unique_ptr<IDBDatabaseInfo> 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 "FileSystem.h"
</span><ins>+#include "IDBBindingUtilities.h"
</ins><span class="cx"> #include "IDBDatabaseException.h"
</span><span class="cx"> #include "IDBKeyData.h"
</span><span class="cx"> #include "IDBSerialization.h"
</span><span class="cx"> #include "IDBTransactionInfo.h"
</span><ins>+#include "IndexKey.h"
</ins><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "SQLiteDatabase.h"
</span><span class="cx"> #include "SQLiteFileSystem.h"
</span><span class="lines">@@ -41,6 +43,8 @@
</span><span class="cx"> #include "SQLiteTransaction.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</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 "%00";
+
+ String filename = encodeForFileName(m_identifier.databaseName());
+ filename.replace('.', "%2E");
+
+ 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(), "IndexedDB.sqlite3");
+}
+
</ins><span class="cx"> const IDBDatabaseInfo& SQLiteIDBBackingStore::getOrEstablishDatabaseInfo()
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::getOrEstablishDatabaseInfo - database %s", 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<IDBDatabaseInfo>(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, "IndexedDB.sqlite3");
-
</del><span class="cx"> m_sqliteDB = std::make_unique<SQLiteDatabase>();
</span><span class="cx"> if (!m_sqliteDB->open(dbFilename)) {
</span><span class="cx"> LOG_ERROR("Failed to open SQLite database at path '%s'", dbFilename.utf8().data());
</span><span class="lines">@@ -437,38 +467,175 @@
</span><span class="cx"> IDBError SQLiteIDBBackingStore::beginTransaction(const IDBTransactionInfo& info)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::beginTransaction - %s", info.identifier().loggingString().utf8().data());
</span><del>- UNUSED_PARAM(info);
</del><span class="cx">
</span><del>- return { IDBDatabaseException::UnknownError, ASCIILiteral("Not implemented") };
</del><ins>+ ASSERT(m_sqliteDB);
+ ASSERT(m_sqliteDB->isOpen());
+
+ auto addResult = m_transactions.add(info.identifier(), nullptr);
+ if (!addResult.isNewEntry) {
+ LOG_ERROR("Attempt to establish transaction identifier that already exists");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to establish transaction identifier that already exists") };
+ }
+
+ addResult.iterator->value = std::make_unique<SQLiteIDBTransaction>(*this, info);
+ return addResult.iterator->value->begin(*m_sqliteDB);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBError SQLiteIDBBackingStore::abortTransaction(const IDBResourceIdentifier& identifier)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::abortTransaction - %s", identifier.loggingString().utf8().data());
</span><del>- UNUSED_PARAM(identifier);
</del><span class="cx">
</span><del>- return { IDBDatabaseException::UnknownError, ASCIILiteral("Not implemented") };
</del><ins>+ ASSERT(m_sqliteDB);
+ ASSERT(m_sqliteDB->isOpen());
+
+ auto transaction = m_transactions.take(identifier);
+ if (!transaction) {
+ LOG_ERROR("Attempt to commit a transaction that hasn't been established");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to abort a transaction that hasn't been established") };
+ }
+
+ return transaction->abort();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBError SQLiteIDBBackingStore::commitTransaction(const IDBResourceIdentifier& identifier)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::commitTransaction - %s", identifier.loggingString().utf8().data());
</span><del>- UNUSED_PARAM(identifier);
</del><span class="cx">
</span><del>- return { IDBDatabaseException::UnknownError, ASCIILiteral("Not implemented") };
</del><ins>+ ASSERT(m_sqliteDB);
+ ASSERT(m_sqliteDB->isOpen());
+
+ auto transaction = m_transactions.take(identifier);
+ if (!transaction) {
+ LOG_ERROR("Attempt to commit a transaction that hasn't been established");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to commit a transaction that hasn't been established") };
+ }
+
+ return transaction->commit();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-IDBError SQLiteIDBBackingStore::createObjectStore(const IDBResourceIdentifier&, const IDBObjectStoreInfo& info)
</del><ins>+IDBError SQLiteIDBBackingStore::createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo& info)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::createObjectStore - adding OS %s with ID %" PRIu64, info.name().utf8().data(), info.identifier());
</span><del>- UNUSED_PARAM(info);
</del><span class="cx">
</span><del>- return { IDBDatabaseException::UnknownError, ASCIILiteral("Not implemented") };
</del><ins>+ ASSERT(m_sqliteDB);
+ ASSERT(m_sqliteDB->isOpen());
+
+ auto* transaction = m_transactions.get(transactionIdentifier);
+ if (!transaction || !transaction->inProgress()) {
+ LOG_ERROR("Attempt to create an object store without an in-progress transaction");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to create an object store without an in-progress transaction") };
+ }
+ if (transaction->mode() != IndexedDB::TransactionMode::VersionChange) {
+ LOG_ERROR("Attempt to create an object store in a non-version-change transaction");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to create an object store in a non-version-change transaction") };
+ }
+
+ RefPtr<SharedBuffer> keyPathBlob = serializeIDBKeyPath(info.keyPath());
+ if (!keyPathBlob) {
+ LOG_ERROR("Unable to serialize IDBKeyPath to save in database for new object store");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Unable to serialize IDBKeyPath to save in database for new object store") };
+ }
+
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("INSERT INTO ObjectStoreInfo VALUES (?, ?, ?, ?, ?);"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, info.identifier()) != SQLITE_OK
+ || sql.bindText(2, info.name()) != SQLITE_OK
+ || sql.bindBlob(3, keyPathBlob->data(), keyPathBlob->size()) != SQLITE_OK
+ || sql.bindInt(4, info.autoIncrement()) != SQLITE_OK
+ || sql.bindInt64(5, info.maxIndexID()) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not add object store '%s' to ObjectStoreInfo table (%i) - %s", info.name().utf8().data(), m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not create object store") };
+ }
+ }
+
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("INSERT INTO KeyGenerators VALUES (?, 0);"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, info.identifier()) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not seed initial key generator value for ObjectStoreInfo table (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not seed initial key generator value for object store") };
+ }
+ }
+
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-IDBError SQLiteIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier&, const String&)
</del><ins>+IDBError SQLiteIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier)
</ins><span class="cx"> {
</span><del>- return { IDBDatabaseException::UnknownError, ASCIILiteral("Not implemented") };
</del><ins>+ LOG(IndexedDB, "SQLiteIDBBackingStore::deleteObjectStore - object store %" PRIu64, objectStoreIdentifier);
+
+ ASSERT(m_sqliteDB);
+ ASSERT(m_sqliteDB->isOpen());
+
+ auto* transaction = m_transactions.get(transactionIdentifier);
+ if (!transaction || !transaction->inProgress()) {
+ LOG_ERROR("Attempt to delete an object store without an in-progress transaction");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to delete an object store without an in-progress transaction") };
+ }
+ if (transaction->mode() != IndexedDB::TransactionMode::VersionChange) {
+ LOG_ERROR("Attempt to delete an object store in a non-version-change transaction");
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to delete an object store in a non-version-change transaction") };
+ }
+
+ // Delete the ObjectStore record
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM ObjectStoreInfo WHERE id = ?;"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not delete object store id %" PRIi64 " from ObjectStoreInfo table (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not delete object store") };
+ }
+ }
+
+ // Delete the ObjectStore's key generator record if there is one.
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM KeyGenerators WHERE objectStoreID = ?;"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not delete object store from KeyGenerators table (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not delete key generator for deleted object store") };
+ }
+ }
+
+ // Delete all associated records
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ?;"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not delete records for object store %" PRIi64 " (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not delete records for deleted object store") };
+ }
+ }
+
+ // Delete all associated Indexes
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM IndexInfo WHERE objectStoreID = ?;"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not delete index from IndexInfo table (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not delete IDBIndex for deleted object store") };
+ }
+ }
+
+ // Delete all associated Index records
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM IndexRecords WHERE objectStoreID = ?;"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, objectStoreIdentifier) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not delete index records(%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not delete IDBIndex records for deleted object store") };
+ }
+ }
+
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBError SQLiteIDBBackingStore::clearObjectStore(const IDBResourceIdentifier&, 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, "IndexedDB.sqlite3");
</del><ins>+ String dbFilename = fullDatabasePath();
</ins><span class="cx">
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::deleteBackingStore deleting file '%s' on disk", 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& transactionIdentifier) override final;
</span><span class="cx"> virtual IDBError commitTransaction(const IDBResourceIdentifier& transactionIdentifier) override final;
</span><span class="cx"> virtual IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) override final;
</span><del>- virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, const String& objectStoreName) override final;
</del><ins>+ virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</ins><span class="cx"> virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</span><span class="cx"> virtual IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) override final;
</span><span class="cx"> virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName) override final;
</span><span class="lines">@@ -76,6 +76,10 @@
</span><span class="cx"> void unregisterCursor(SQLiteIDBCursor&);
</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<IDBDatabaseInfo> createAndPopulateInitialDatabaseInfo();
</span><span class="cx"> std::unique_ptr<IDBDatabaseInfo> 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& backingStore, const IDBResourceIdentifier& transactionIdentifier, IndexedDB::TransactionMode mode)
- : m_identifier(transactionIdentifier)
- , m_mode(mode)
</del><ins>+SQLiteIDBTransaction::SQLiteIDBTransaction(SQLiteIDBBackingStore& backingStore, const IDBTransactionInfo& 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& database)
</del><ins>+IDBError SQLiteIDBTransaction::begin(SQLiteDatabase& database)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!m_sqliteTransaction);
</span><del>- m_sqliteTransaction = std::make_unique<SQLiteTransaction>(database, m_mode == IndexedDB::TransactionMode::ReadOnly);
</del><span class="cx">
</span><ins>+ m_sqliteTransaction = std::make_unique<SQLiteTransaction>(database, m_info.mode() == IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx"> m_sqliteTransaction->begin();
</span><span class="cx">
</span><del>- return m_sqliteTransaction->inProgress();
</del><ins>+ if (m_sqliteTransaction->inProgress())
+ return { };
+
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not start SQLite transaction in database backend") };
</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->inProgress())
</span><del>- return false;
</del><ins>+ return { IDBDatabaseException::UnknownError, ASCIILiteral("No SQLite transaction in progress to commit") };
</ins><span class="cx">
</span><span class="cx"> m_sqliteTransaction->commit();
</span><span class="cx">
</span><del>- return !m_sqliteTransaction->inProgress();
</del><ins>+ if (m_sqliteTransaction->inProgress())
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Unable to commit SQLite transaction in database backend") };
+
+ 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->inProgress())
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("No SQLite transaction in progress to abort") };
</ins><span class="cx">
</span><del>- return true;
-}
</del><ins>+ m_sqliteTransaction->rollback();
</ins><span class="cx">
</span><del>-bool SQLiteIDBTransaction::rollback()
-{
- ASSERT(m_sqliteTransaction);
</del><span class="cx"> if (m_sqliteTransaction->inProgress())
</span><del>- m_sqliteTransaction->rollback();
</del><ins>+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Unable to abort SQLite transaction in database backend") };
</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& 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 "IDBError.h"
</ins><span class="cx"> #include "IDBResourceIdentifier.h"
</span><ins>+#include "IDBTransactionInfo.h"
</ins><span class="cx"> #include "IndexedDB.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</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&, const IDBResourceIdentifier& transactionIdentifier, IndexedDB::TransactionMode);
</del><ins>+ SQLiteIDBTransaction(SQLiteIDBBackingStore&, const IDBTransactionInfo&);
</ins><span class="cx"> ~SQLiteIDBTransaction();
</span><span class="cx">
</span><del>- const IDBResourceIdentifier& transactionIdentifier() const { return m_identifier; }
</del><ins>+ const IDBResourceIdentifier& transactionIdentifier() const { return m_info.identifier(); }
</ins><span class="cx">
</span><del>- bool begin(SQLiteDatabase&);
- bool commit();
- bool reset();
- bool rollback();
</del><ins>+ IDBError begin(SQLiteDatabase&);
+ IDBError commit();
+ IDBError abort();
</ins><span class="cx">
</span><span class="cx"> SQLiteIDBCursor* maybeOpenCursor(const IDBCursorInfo&);
</span><span class="cx">
</span><span class="cx"> void closeCursor(SQLiteIDBCursor&);
</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& m_backingStore;
</span><span class="cx"> std::unique_ptr<SQLiteTransaction> 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, "(main) UniqueIDBDatabase::deleteObjectStore");
</span><span class="cx">
</span><span class="cx"> uint64_t callbackID = storeCallback(callback);
</span><del>- m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performDeleteObjectStore, callbackID, transaction.info().identifier(), objectStoreName));
</del><ins>+
+ auto* info = m_databaseInfo->infoForExistingObjectStore(objectStoreName);
+ if (!info) {
+ performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to delete non-existant object store") });
+ return;
+ }
+
+ m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performDeleteObjectStore, callbackID, transaction.info().identifier(), info->identifier()));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void UniqueIDBDatabase::performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const String& objectStoreName)
</del><ins>+void UniqueIDBDatabase::performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!isMainThread());
</span><span class="cx"> LOG(IndexedDB, "(db) UniqueIDBDatabase::performDeleteObjectStore");
</span><span class="cx">
</span><span class="cx"> ASSERT(m_backingStore);
</span><del>- m_backingStore->deleteObjectStore(transactionIdentifier, objectStoreName);
</del><ins>+ m_backingStore->deleteObjectStore(transactionIdentifier, objectStoreIdentifier);
</ins><span class="cx">
</span><span class="cx"> IDBError error;
</span><del>- m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformDeleteObjectStore, callbackIdentifier, error, objectStoreName));
</del><ins>+ m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformDeleteObjectStore, callbackIdentifier, error, objectStoreIdentifier));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void UniqueIDBDatabase::didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError& error, const String& objectStoreName)
</del><ins>+void UniqueIDBDatabase::didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError& error, uint64_t objectStoreIdentifier)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="cx"> LOG(IndexedDB, "(main) UniqueIDBDatabase::didPerformDeleteObjectStore");
</span><span class="cx">
</span><span class="cx"> if (error.isNull())
</span><del>- m_databaseInfo->deleteObjectStore(objectStoreName);
</del><ins>+ m_databaseInfo->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& transactionIdentifier);
</span><span class="cx"> void beginTransactionInBackingStore(const IDBTransactionInfo&);
</span><span class="cx"> void performCreateObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&);
</span><del>- void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const String& objectStoreName);
</del><ins>+ void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier);
</ins><span class="cx"> void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier);
</span><span class="cx"> void performCreateIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&);
</span><span class="cx"> void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName);
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> void didDeleteBackingStore();
</span><span class="cx"> void didOpenBackingStore(const IDBDatabaseInfo&);
</span><span class="cx"> void didPerformCreateObjectStore(uint64_t callbackIdentifier, const IDBError&, const IDBObjectStoreInfo&);
</span><del>- void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&, const String& objectStoreName);
</del><ins>+ void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier);
</ins><span class="cx"> void didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError&);
</span><span class="cx"> void didPerformCreateIndex(uint64_t callbackIdentifier, const IDBError&, const IDBIndexInfo&);
</span><span class="cx"> void didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier, const String& 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->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<String> objectStoreNames() const;
</span><span class="cx">
</span><span class="cx"> void deleteObjectStore(const String& 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& name() const { return m_name; }
</span><span class="cx"> const IDBKeyPath& 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& 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>