<!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>[160732] trunk/Source</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/160732">160732</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2013-12-17 16:12:50 -0800 (Tue, 17 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>DatabaseProcess: Pipe through object store IDs and transaction mode for "openTransaction"
https://bugs.webkit.org/show_bug.cgi?id=125872
Reviewed by Alexey Proskuryakov.
Source/WebCore:
Make these enums into enum classes.
Add const maximums for each enum class that might be serialized to allow for conversion later:
* Modules/indexeddb/IndexedDB.h:
Add cross-thread copying for these new enum classes.
* platform/CrossThreadCopier.cpp:
(WebCore::::copy):
* platform/CrossThreadCopier.h:
Adopt the new enum classes throughout the rest of WebCore:
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::stringToDirection):
(WebCore::IDBCursor::directionToString):
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursorBackend.cpp:
(WebCore::IDBCursorBackend::deleteFunction):
* Modules/indexeddb/IDBCursorBackend.h:
(WebCore::IDBCursorBackend::value):
* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::createObjectStore):
(WebCore::IDBDatabaseBackend::deleteObjectStore):
(WebCore::IDBDatabaseBackend::createIndex):
(WebCore::IDBDatabaseBackend::deleteIndex):
(WebCore::IDBDatabaseBackend::get):
(WebCore::IDBDatabaseBackend::put):
(WebCore::IDBDatabaseBackend::setIndexKeys):
(WebCore::IDBDatabaseBackend::openCursor):
(WebCore::IDBDatabaseBackend::deleteRange):
(WebCore::IDBDatabaseBackend::clearObjectStore):
(WebCore::IDBDatabaseBackend::transactionStarted):
(WebCore::IDBDatabaseBackend::transactionFinished):
(WebCore::IDBDatabaseBackend::transactionFinishedAndAbortFired):
(WebCore::IDBDatabaseBackend::transactionFinishedAndCompleteFired):
(WebCore::IDBDatabaseBackend::createTransaction):
(WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
(WebCore::IDBDatabaseBackend::deleteDatabase):
* Modules/indexeddb/IDBDatabaseBackend.h:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::openCursor):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::setResultCursor):
(WebCore::IDBRequest::onSuccess):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::create):
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::stringToMode):
(WebCore::IDBTransaction::modeToString):
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::PutOperation::perform):
* Modules/indexeddb/IDBTransactionCoordinator.cpp:
(WebCore::IDBTransactionCoordinator::processStartedTransactions):
(WebCore::IDBTransactionCoordinator::canRunTransaction):
* Modules/indexeddb/IDBVersionChangeEvent.h:
(WebCore::IDBVersionChangeEvent::create):
(WebCore::IDBVersionChangeEvent::newVersion):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::objectStoreCursorOptions):
(WebCore::indexCursorOptions):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::get):
(WebCore::IDBServerConnectionLevelDB::openCursor):
(WebCore::IDBServerConnectionLevelDB::count):
(WebCore::IDBServerConnectionLevelDB::deleteRange):
(WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
* WebCore.exp.in:
Source/WebKit2:
Pipe through the objectStoreIDs and mode:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::openTransaction):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
Rework postTransactionOperation to take a pre-made AsyncTask to allow for different
transaction operation function signatures:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::openTransaction): Pipe through the objectStoreIDs and mode:
(WebKit::UniqueIDBDatabase::beginTransaction):
(WebKit::UniqueIDBDatabase::commitTransaction):
(WebKit::UniqueIDBDatabase::resetTransaction):
(WebKit::UniqueIDBDatabase::rollbackTransaction):
(WebKit::UniqueIDBDatabase::postTransactionOperation):
(WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
Pipe through the objectStoreIDs and mode:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
* Platform/Logging.h: Add an IDB logging channel.
* Shared/AsyncTask.h:
(WebKit::createAsyncTask): Add a 3-argument variant.
* Shared/WebCrossThreadCopier.cpp:
(WebCore::::copy): Add a Vector<int64_t> copier.
* Shared/WebCrossThreadCopier.h:
Add logging throughout currently implemented methods:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
(WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
(WebKit::WebIDBServerConnection::openTransaction): Pipe through the objectStoreIDs and mode.
(WebKit::WebIDBServerConnection::didOpenTransaction):
(WebKit::WebIDBServerConnection::beginTransaction):
(WebKit::WebIDBServerConnection::didBeginTransaction):
(WebKit::WebIDBServerConnection::commitTransaction):
(WebKit::WebIDBServerConnection::didCommitTransaction):
(WebKit::WebIDBServerConnection::resetTransaction):
(WebKit::WebIDBServerConnection::didResetTransaction):
(WebKit::WebIDBServerConnection::rollbackTransaction):
(WebKit::WebIDBServerConnection::didRollbackTransaction):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorh">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorBackendcpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorBackendh">trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendcpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactorycpp">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexcpp">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBOpenDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationscpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionCoordinatorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventh">trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIndexedDBh">trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbleveldbIDBBackingStoreLevelDBcpp">trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbleveldbIDBServerConnectionLevelDBcpp">trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreplatformCrossThreadCopiercpp">trunk/Source/WebCore/platform/CrossThreadCopier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformCrossThreadCopierh">trunk/Source/WebCore/platform/CrossThreadCopier.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectioncpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectionh">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectionmessagesin">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseh">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseBackingStoreh">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBsqliteUniqueIDBDatabaseBackingStoreSQLitecpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBsqliteUniqueIDBDatabaseBackingStoreSQLiteh">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformLoggingh">trunk/Source/WebKit2/Platform/Logging.h</a></li>
<li><a href="#trunkSourceWebKit2SharedAsyncTaskh">trunk/Source/WebKit2/Shared/AsyncTask.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCrossThreadCopiercpp">trunk/Source/WebKit2/Shared/WebCrossThreadCopier.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCrossThreadCopierh">trunk/Source/WebKit2/Shared/WebCrossThreadCopier.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectioncpp">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/ChangeLog        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -1,3 +1,89 @@
</span><ins>+2013-12-17 Brady Eidson <beidson@apple.com>
+
+ DatabaseProcess: Pipe through object store IDs and transaction mode for "openTransaction"
+ https://bugs.webkit.org/show_bug.cgi?id=125872
+
+ Reviewed by Alexey Proskuryakov.
+
+ Make these enums into enum classes.
+ Add const maximums for each enum class that might be serialized to allow for conversion later:
+ * Modules/indexeddb/IndexedDB.h:
+
+ Add cross-thread copying for these new enum classes.
+ * platform/CrossThreadCopier.cpp:
+ (WebCore::::copy):
+ * platform/CrossThreadCopier.h:
+
+ Adopt the new enum classes throughout the rest of WebCore:
+ * Modules/indexeddb/IDBCursor.cpp:
+ (WebCore::IDBCursor::continueFunction):
+ (WebCore::IDBCursor::stringToDirection):
+ (WebCore::IDBCursor::directionToString):
+ * Modules/indexeddb/IDBCursor.h:
+ * Modules/indexeddb/IDBCursorBackend.cpp:
+ (WebCore::IDBCursorBackend::deleteFunction):
+ * Modules/indexeddb/IDBCursorBackend.h:
+ (WebCore::IDBCursorBackend::value):
+ * Modules/indexeddb/IDBDatabaseBackend.cpp:
+ (WebCore::IDBDatabaseBackend::createObjectStore):
+ (WebCore::IDBDatabaseBackend::deleteObjectStore):
+ (WebCore::IDBDatabaseBackend::createIndex):
+ (WebCore::IDBDatabaseBackend::deleteIndex):
+ (WebCore::IDBDatabaseBackend::get):
+ (WebCore::IDBDatabaseBackend::put):
+ (WebCore::IDBDatabaseBackend::setIndexKeys):
+ (WebCore::IDBDatabaseBackend::openCursor):
+ (WebCore::IDBDatabaseBackend::deleteRange):
+ (WebCore::IDBDatabaseBackend::clearObjectStore):
+ (WebCore::IDBDatabaseBackend::transactionStarted):
+ (WebCore::IDBDatabaseBackend::transactionFinished):
+ (WebCore::IDBDatabaseBackend::transactionFinishedAndAbortFired):
+ (WebCore::IDBDatabaseBackend::transactionFinishedAndCompleteFired):
+ (WebCore::IDBDatabaseBackend::createTransaction):
+ (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
+ (WebCore::IDBDatabaseBackend::deleteDatabase):
+ * Modules/indexeddb/IDBDatabaseBackend.h:
+ * Modules/indexeddb/IDBFactory.cpp:
+ (WebCore::IDBFactory::open):
+ (WebCore::IDBFactory::openInternal):
+ (WebCore::IDBFactory::deleteDatabase):
+ * Modules/indexeddb/IDBIndex.cpp:
+ (WebCore::IDBIndex::openCursor):
+ (WebCore::IDBIndex::openKeyCursor):
+ * Modules/indexeddb/IDBObjectStore.cpp:
+ (WebCore::IDBObjectStore::openCursor):
+ * Modules/indexeddb/IDBOpenDBRequest.cpp:
+ (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::IDBRequest):
+ (WebCore::IDBRequest::setResultCursor):
+ (WebCore::IDBRequest::onSuccess):
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::create):
+ (WebCore::IDBTransaction::IDBTransaction):
+ (WebCore::IDBTransaction::stringToMode):
+ (WebCore::IDBTransaction::modeToString):
+ * Modules/indexeddb/IDBTransaction.h:
+ * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
+ (WebCore::PutOperation::perform):
+ * Modules/indexeddb/IDBTransactionCoordinator.cpp:
+ (WebCore::IDBTransactionCoordinator::processStartedTransactions):
+ (WebCore::IDBTransactionCoordinator::canRunTransaction):
+ * Modules/indexeddb/IDBVersionChangeEvent.h:
+ (WebCore::IDBVersionChangeEvent::create):
+ (WebCore::IDBVersionChangeEvent::newVersion):
+ * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
+ (WebCore::objectStoreCursorOptions):
+ (WebCore::indexCursorOptions):
+ * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
+ (WebCore::IDBServerConnectionLevelDB::get):
+ (WebCore::IDBServerConnectionLevelDB::openCursor):
+ (WebCore::IDBServerConnectionLevelDB::count):
+ (WebCore::IDBServerConnectionLevelDB::deleteRange):
+ (WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
+
+ * WebCore.exp.in:
+
</ins><span class="cx"> 2013-12-17 Gavin Barraclough <barraclough@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove PageVisibilityStateUnloaded
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx">
</span><span class="cx"> if (key) {
</span><span class="cx"> ASSERT(m_currentKey);
</span><del>- if (m_direction == IndexedDB::CursorNext || m_direction == IndexedDB::CursorNextNoDuplicate) {
</del><ins>+ if (m_direction == IndexedDB::CursorDirection::Next || m_direction == IndexedDB::CursorDirection::NextNoDuplicate) {
</ins><span class="cx"> if (!m_currentKey->isLessThan(key.get())) {
</span><span class="cx"> ec = IDBDatabaseException::DataError;
</span><span class="cx"> return;
</span><span class="lines">@@ -300,31 +300,31 @@
</span><span class="cx"> IndexedDB::CursorDirection IDBCursor::stringToDirection(const String& directionString, ExceptionCode& ec)
</span><span class="cx"> {
</span><span class="cx"> if (directionString == IDBCursor::directionNext())
</span><del>- return IndexedDB::CursorNext;
</del><ins>+ return IndexedDB::CursorDirection::Next;
</ins><span class="cx"> if (directionString == IDBCursor::directionNextUnique())
</span><del>- return IndexedDB::CursorNextNoDuplicate;
</del><ins>+ return IndexedDB::CursorDirection::NextNoDuplicate;
</ins><span class="cx"> if (directionString == IDBCursor::directionPrev())
</span><del>- return IndexedDB::CursorPrev;
</del><ins>+ return IndexedDB::CursorDirection::Prev;
</ins><span class="cx"> if (directionString == IDBCursor::directionPrevUnique())
</span><del>- return IndexedDB::CursorPrevNoDuplicate;
</del><ins>+ return IndexedDB::CursorDirection::PrevNoDuplicate;
</ins><span class="cx">
</span><span class="cx"> ec = TypeError;
</span><del>- return IndexedDB::CursorNext;
</del><ins>+ return IndexedDB::CursorDirection::Next;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-const AtomicString& IDBCursor::directionToString(unsigned short direction)
</del><ins>+const AtomicString& IDBCursor::directionToString(IndexedDB::CursorDirection direction)
</ins><span class="cx"> {
</span><span class="cx"> switch (direction) {
</span><del>- case IndexedDB::CursorNext:
</del><ins>+ case IndexedDB::CursorDirection::Next:
</ins><span class="cx"> return IDBCursor::directionNext();
</span><span class="cx">
</span><del>- case IndexedDB::CursorNextNoDuplicate:
</del><ins>+ case IndexedDB::CursorDirection::NextNoDuplicate:
</ins><span class="cx"> return IDBCursor::directionNextUnique();
</span><span class="cx">
</span><del>- case IndexedDB::CursorPrev:
</del><ins>+ case IndexedDB::CursorDirection::Prev:
</ins><span class="cx"> return IDBCursor::directionPrev();
</span><span class="cx">
</span><del>- case IndexedDB::CursorPrevNoDuplicate:
</del><ins>+ case IndexedDB::CursorDirection::PrevNoDuplicate:
</ins><span class="cx"> return IDBCursor::directionPrevUnique();
</span><span class="cx">
</span><span class="cx"> default:
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> static const AtomicString& directionPrevUnique();
</span><span class="cx">
</span><span class="cx"> static IndexedDB::CursorDirection stringToDirection(const String& modeString, ExceptionCode&);
</span><del>- static const AtomicString& directionToString(unsigned short mode);
</del><ins>+ static const AtomicString& directionToString(IndexedDB::CursorDirection mode);
</ins><span class="cx">
</span><span class="cx"> static PassRefPtr<IDBCursor> create(PassRefPtr<IDBCursorBackend>, IndexedDB::CursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
</span><span class="cx"> virtual ~IDBCursor();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> void IDBCursorBackend::deleteFunction(PassRefPtr<IDBCallbacks> prpCallbacks, ExceptionCode&)
</span><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "IDBCursorBackend::delete");
</span><del>- ASSERT(m_transaction->mode() != IndexedDB::TransactionReadOnly);
</del><ins>+ ASSERT(m_transaction->mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx"> RefPtr<IDBKeyRange> keyRange = IDBKeyRange::create(primaryKey());
</span><span class="cx"> m_transaction->database().deleteRange(m_transaction->id(), m_objectStoreID, keyRange.release(), prpCallbacks);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">
</span><span class="cx"> IDBKey* key() const { return m_currentKey.get(); }
</span><span class="cx"> IDBKey* primaryKey() const { return m_currentPrimaryKey.get(); }
</span><del>- SharedBuffer* value() const { return (m_cursorType == IndexedDB::CursorKeyOnly) ? 0 : m_currentValue.get(); }
</del><ins>+ SharedBuffer* value() const { return (m_cursorType == IndexedDB::CursorType::KeyOnly) ? 0 : m_currentValue.get(); }
</ins><span class="cx"> void updateCursorData(IDBKey*, IDBKey* primaryKey, SharedBuffer* value);
</span><span class="cx">
</span><span class="cx"> void close();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> IDBTransactionBackend* transaction = m_transactions.get(transactionId);
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><del>- ASSERT(transaction->mode() == IndexedDB::TransactionVersionChange);
</del><ins>+ ASSERT(transaction->mode() == IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx">
</span><span class="cx"> ASSERT(!m_metadata.objectStores.contains(objectStoreId));
</span><span class="cx"> IDBObjectStoreMetadata objectStoreMetadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackend::MinimumIndexId);
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> IDBTransactionBackend* transaction = m_transactions.get(transactionId);
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><del>- ASSERT(transaction->mode() == IndexedDB::TransactionVersionChange);
</del><ins>+ ASSERT(transaction->mode() == IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx">
</span><span class="cx"> ASSERT(m_metadata.objectStores.contains(objectStoreId));
</span><span class="cx"> const IDBObjectStoreMetadata& objectStoreMetadata = m_metadata.objectStores.get(objectStoreId);
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx"> IDBTransactionBackend* transaction = m_transactions.get(transactionId);
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><del>- ASSERT(transaction->mode() == IndexedDB::TransactionVersionChange);
</del><ins>+ ASSERT(transaction->mode() == IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx">
</span><span class="cx"> ASSERT(m_metadata.objectStores.contains(objectStoreId));
</span><span class="cx"> const IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx"> IDBTransactionBackend* transaction = m_transactions.get(transactionId);
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><del>- ASSERT(transaction->mode() == IndexedDB::TransactionVersionChange);
</del><ins>+ ASSERT(transaction->mode() == IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx">
</span><span class="cx"> ASSERT(m_metadata.objectStores.contains(objectStoreId));
</span><span class="cx"> const IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
</span><span class="lines">@@ -223,7 +223,7 @@
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- transaction->scheduleGetOperation(m_metadata, objectStoreId, indexId, keyRange, keyOnly ? IndexedDB::CursorKeyOnly : IndexedDB::CursorKeyAndValue, callbacks);
</del><ins>+ transaction->scheduleGetOperation(m_metadata, objectStoreId, indexId, keyRange, keyOnly ? IndexedDB::CursorType::KeyOnly : IndexedDB::CursorType::KeyAndValue, callbacks);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBDatabaseBackend::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
</span><span class="lines">@@ -232,7 +232,7 @@
</span><span class="cx"> IDBTransactionBackend* transaction = m_transactions.get(transactionId);
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><del>- ASSERT(transaction->mode() != IndexedDB::TransactionReadOnly);
</del><ins>+ ASSERT(transaction->mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx">
</span><span class="cx"> const IDBObjectStoreMetadata objectStoreMetadata = m_metadata.objectStores.get(objectStoreId);
</span><span class="cx">
</span><span class="lines">@@ -250,7 +250,7 @@
</span><span class="cx"> RefPtr<IDBTransactionBackend> transaction = m_transactions.get(transactionID);
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><del>- ASSERT(transaction->mode() == IndexedDB::TransactionVersionChange);
</del><ins>+ ASSERT(transaction->mode() == IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx">
</span><span class="cx"> RefPtr<IDBKey> primaryKey = prpPrimaryKey;
</span><span class="cx"> m_serverConnection->setIndexKeys(transactionID, m_metadata.id, objectStoreID, m_metadata.objectStores.get(objectStoreID), *primaryKey, indexIDs, indexKeys, [transaction](PassRefPtr<IDBDatabaseError> error) {
</span><span class="lines">@@ -277,7 +277,7 @@
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- transaction->scheduleOpenCursorOperation(objectStoreId, indexId, keyRange, direction, keyOnly ? IndexedDB::CursorKeyOnly : IndexedDB::CursorKeyAndValue, taskType, callbacks);
</del><ins>+ transaction->scheduleOpenCursorOperation(objectStoreId, indexId, keyRange, direction, keyOnly ? IndexedDB::CursorType::KeyOnly : IndexedDB::CursorType::KeyAndValue, taskType, callbacks);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBDatabaseBackend::count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx"> IDBTransactionBackend* transaction = m_transactions.get(transactionId);
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><del>- ASSERT(transaction->mode() != IndexedDB::TransactionReadOnly);
</del><ins>+ ASSERT(transaction->mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx">
</span><span class="cx"> transaction->scheduleDeleteRangeOperation(objectStoreId, keyRange, callbacks);
</span><span class="cx"> }
</span><span class="lines">@@ -309,14 +309,14 @@
</span><span class="cx"> IDBTransactionBackend* transaction = m_transactions.get(transactionId);
</span><span class="cx"> if (!transaction)
</span><span class="cx"> return;
</span><del>- ASSERT(transaction->mode() != IndexedDB::TransactionReadOnly);
</del><ins>+ ASSERT(transaction->mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx">
</span><span class="cx"> transaction->scheduleClearObjectStoreOperation(objectStoreId, callbacks);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBDatabaseBackend::transactionStarted(IDBTransactionBackend* transaction)
</span><span class="cx"> {
</span><del>- if (transaction->mode() == IndexedDB::TransactionVersionChange) {
</del><ins>+ if (transaction->mode() == IndexedDB::TransactionMode::VersionChange) {
</ins><span class="cx"> ASSERT(!m_runningVersionChangeTransaction);
</span><span class="cx"> m_runningVersionChangeTransaction = transaction;
</span><span class="cx"> }
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> ASSERT(m_transactions.contains(transaction->id()));
</span><span class="cx"> ASSERT(m_transactions.get(transaction->id()) == transaction.get());
</span><span class="cx"> m_transactions.remove(transaction->id());
</span><del>- if (transaction->mode() == IndexedDB::TransactionVersionChange) {
</del><ins>+ if (transaction->mode() == IndexedDB::TransactionMode::VersionChange) {
</ins><span class="cx"> ASSERT(transaction.get() == m_runningVersionChangeTransaction.get());
</span><span class="cx"> m_runningVersionChangeTransaction.clear();
</span><span class="cx"> }
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx"> void IDBDatabaseBackend::transactionFinishedAndAbortFired(IDBTransactionBackend* rawTransaction)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<IDBTransactionBackend> transaction = rawTransaction;
</span><del>- if (transaction->mode() == IndexedDB::TransactionVersionChange) {
</del><ins>+ if (transaction->mode() == IndexedDB::TransactionMode::VersionChange) {
</ins><span class="cx"> // If this was an open-with-version call, there will be a "second
</span><span class="cx"> // half" open call waiting for us in processPendingCalls.
</span><span class="cx"> // FIXME: When we no longer support setVersion, assert such a thing.
</span><span class="lines">@@ -352,7 +352,7 @@
</span><span class="cx"> void IDBDatabaseBackend::transactionFinishedAndCompleteFired(IDBTransactionBackend* rawTransaction)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<IDBTransactionBackend> transaction = rawTransaction;
</span><del>- if (transaction->mode() == IndexedDB::TransactionVersionChange)
</del><ins>+ if (transaction->mode() == IndexedDB::TransactionMode::VersionChange)
</ins><span class="cx"> processPendingCalls();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -430,9 +430,9 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBDatabaseBackend::createTransaction(int64_t transactionID, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIDs, unsigned short mode)
</del><ins>+void IDBDatabaseBackend::createTransaction(int64_t transactionID, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIDs, IndexedDB::TransactionMode mode)
</ins><span class="cx"> {
</span><del>- RefPtr<IDBTransactionBackend> transaction = IDBTransactionBackend::create(this, transactionID, callbacks, objectStoreIDs, static_cast<IndexedDB::TransactionMode>(mode));
</del><ins>+ RefPtr<IDBTransactionBackend> transaction = IDBTransactionBackend::create(this, transactionID, callbacks, objectStoreIDs, mode);
</ins><span class="cx">
</span><span class="cx"> ASSERT(!m_transactions.contains(transactionID));
</span><span class="cx"> m_transactions.add(transactionID, transaction.get());
</span><span class="lines">@@ -501,7 +501,7 @@
</span><span class="cx"> for (DatabaseCallbacksSet::const_iterator it = m_databaseCallbacksSet.begin(); it != m_databaseCallbacksSet.end(); ++it) {
</span><span class="cx"> // Front end ensures the event is not fired at connections that have closePending set.
</span><span class="cx"> if (*it != databaseCallbacks)
</span><del>- (*it)->onVersionChange(m_metadata.version, requestedVersion, IndexedDB::NullVersion);
</del><ins>+ (*it)->onVersionChange(m_metadata.version, requestedVersion, IndexedDB::VersionNullness::Null);
</ins><span class="cx"> }
</span><span class="cx"> // The spec dictates we wait until all the version change events are
</span><span class="cx"> // delivered and then check m_databaseCallbacks.empty() before proceeding
</span><span class="lines">@@ -519,7 +519,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Vector<int64_t> objectStoreIds;
</span><del>- createTransaction(transactionId, databaseCallbacks, objectStoreIds, IndexedDB::TransactionVersionChange);
</del><ins>+ createTransaction(transactionId, databaseCallbacks, objectStoreIds, IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx"> RefPtr<IDBTransactionBackend> transaction = m_transactions.get(transactionId);
</span><span class="cx">
</span><span class="cx"> transaction->scheduleVersionChangeOperation(requestedVersion, callbacks, databaseCallbacks, m_metadata);
</span><span class="lines">@@ -534,7 +534,7 @@
</span><span class="cx"> if (isDeleteDatabaseBlocked()) {
</span><span class="cx"> for (DatabaseCallbacksSet::const_iterator it = m_databaseCallbacksSet.begin(); it != m_databaseCallbacksSet.end(); ++it) {
</span><span class="cx"> // Front end ensures the event is not fired at connections that have closePending set.
</span><del>- (*it)->onVersionChange(m_metadata.version, 0, IndexedDB::NullVersion);
</del><ins>+ (*it)->onVersionChange(m_metadata.version, 0, IndexedDB::VersionNullness::Null);
</ins><span class="cx"> }
</span><span class="cx"> // FIXME: Only fire onBlocked if there are open connections after the
</span><span class="cx"> // VersionChangeEvents are received, not just set up to fire.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> // IDBDatabaseBackend
</span><span class="cx"> void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoIncrement);
</span><span class="cx"> void deleteObjectStore(int64_t transactionId, int64_t objectStoreId);
</span><del>- void createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, unsigned short mode);
</del><ins>+ void createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
</ins><span class="cx"> void close(PassRefPtr<IDBDatabaseCallbacks>);
</span><span class="cx">
</span><span class="cx"> void commit(int64_t transactionId);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
</span><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "IDBFactory::open");
</span><del>- return openInternal(context, name, 0, IndexedDB::NullVersion, ec);
</del><ins>+ return openInternal(context, name, 0, IndexedDB::VersionNullness::Null, ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, unsigned long long version, ExceptionCode& ec)
</span><span class="lines">@@ -120,13 +120,13 @@
</span><span class="cx"> ec = TypeError;
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><del>- return openInternal(context, name, version, IndexedDB::NonNullVersion, ec);
</del><ins>+ return openInternal(context, name, version, IndexedDB::VersionNullness::NonNull, ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<IDBOpenDBRequest> IDBFactory::openInternal(ScriptExecutionContext* context, const String& name, uint64_t version, IndexedDB::VersionNullness versionNullness, ExceptionCode& ec)
</span><span class="cx"> {
</span><span class="cx"> HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBOpenCall, IDBMethodsMax);
</span><del>- ASSERT(version >= 1 || versionNullness == IndexedDB::NullVersion);
</del><ins>+ ASSERT(version >= 1 || versionNullness == IndexedDB::VersionNullness::Null);
</ins><span class="cx"> if (name.isNull()) {
</span><span class="cx"> ec = TypeError;
</span><span class="cx"> return 0;
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, 0, 0, 0, IndexedDB::NullVersion);
</del><ins>+ RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, 0, 0, 0, IndexedDB::VersionNullness::Null);
</ins><span class="cx"> m_backend->deleteDatabase(name, request, context->securityOrigin(), context, getIndexedDBDatabasePath(context));
</span><span class="cx"> return request;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
</span><del>- request->setCursorDetails(IndexedDB::CursorKeyAndValue, direction);
</del><ins>+ request->setCursorDetails(IndexedDB::CursorType::KeyAndValue, direction);
</ins><span class="cx"> backendDB()->openCursor(m_transaction->id(), m_objectStore->id(), m_metadata.id, keyRange, direction, false, IDBDatabaseBackend::NormalTask, request);
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
</span><del>- request->setCursorDetails(IndexedDB::CursorKeyOnly, direction);
</del><ins>+ request->setCursorDetails(IndexedDB::CursorType::KeyOnly, direction);
</ins><span class="cx"> backendDB()->openCursor(m_transaction->id(), m_objectStore->id(), m_metadata.id, keyRange, direction, true, IDBDatabaseBackend::NormalTask, request);
</span><span class="cx"> return request;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -528,7 +528,7 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
</span><del>- request->setCursorDetails(IndexedDB::CursorKeyAndValue, direction);
</del><ins>+ request->setCursorDetails(IndexedDB::CursorType::KeyAndValue, direction);
</ins><span class="cx">
</span><span class="cx"> backendDB()->openCursor(m_transaction->id(), id(), IDBIndexMetadata::InvalidId, range, direction, false, static_cast<IDBDatabaseBackend::TaskType>(taskType), request);
</span><span class="cx"> return request.release();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBOpenDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> m_transaction = IDBTransaction::create(scriptExecutionContext(), m_transactionId, idbDatabase.get(), this, oldMetadata);
</span><span class="cx"> m_result = IDBAny::create(idbDatabase.release());
</span><span class="cx">
</span><del>- if (m_versionNullness == IndexedDB::NullVersion)
</del><ins>+ if (m_versionNullness == IndexedDB::VersionNullness::Null)
</ins><span class="cx"> m_version = 1;
</span><span class="cx"> enqueueEvent(IDBVersionChangeEvent::create(oldVersion, m_version, m_versionNullness, eventNames().upgradeneededEvent));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -78,8 +78,8 @@
</span><span class="cx"> , m_source(source)
</span><span class="cx"> , m_taskType(taskType)
</span><span class="cx"> , m_hasPendingActivity(true)
</span><del>- , m_cursorType(IndexedDB::CursorKeyAndValue)
- , m_cursorDirection(IndexedDB::CursorNext)
</del><ins>+ , m_cursorType(IndexedDB::CursorType::KeyAndValue)
+ , m_cursorDirection(IndexedDB::CursorDirection::Next)
</ins><span class="cx"> , m_cursorFinished(false)
</span><span class="cx"> , m_pendingCursor(0)
</span><span class="cx"> , m_didFireUpgradeNeededEvent(false)
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx"> m_cursorPrimaryKey = primaryKey;
</span><span class="cx"> m_cursorValue = value;
</span><span class="cx">
</span><del>- if (m_cursorType == IndexedDB::CursorKeyOnly) {
</del><ins>+ if (m_cursorType == IndexedDB::CursorType::KeyOnly) {
</ins><span class="cx"> m_result = IDBAny::create(cursor);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -286,10 +286,10 @@
</span><span class="cx"> ASSERT(!m_pendingCursor);
</span><span class="cx"> RefPtr<IDBCursor> cursor;
</span><span class="cx"> switch (m_cursorType) {
</span><del>- case IndexedDB::CursorKeyOnly:
</del><ins>+ case IndexedDB::CursorType::KeyOnly:
</ins><span class="cx"> cursor = IDBCursor::create(backend, m_cursorDirection, this, m_source.get(), m_transaction.get());
</span><span class="cx"> break;
</span><del>- case IndexedDB::CursorKeyAndValue:
</del><ins>+ case IndexedDB::CursorType::KeyAndValue:
</ins><span class="cx"> cursor = IDBCursorWithValue::create(backend, m_cursorDirection, this, m_source.get(), m_transaction.get());
</span><span class="cx"> break;
</span><span class="cx"> default:
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">
</span><span class="cx"> PassRefPtr<IDBTransaction> IDBTransaction::create(ScriptExecutionContext* context, int64_t id, IDBDatabase* db, IDBOpenDBRequest* openDBRequest, const IDBDatabaseMetadata& previousMetadata)
</span><span class="cx"> {
</span><del>- RefPtr<IDBTransaction> transaction(adoptRef(new IDBTransaction(context, id, Vector<String>(), IndexedDB::TransactionVersionChange, db, openDBRequest, previousMetadata)));
</del><ins>+ RefPtr<IDBTransaction> transaction(adoptRef(new IDBTransaction(context, id, Vector<String>(), IndexedDB::TransactionMode::VersionChange, db, openDBRequest, previousMetadata)));
</ins><span class="cx"> transaction->suspendIfNeeded();
</span><span class="cx"> return transaction.release();
</span><span class="cx"> }
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx"> , m_contextStopped(false)
</span><span class="cx"> , m_previousMetadata(previousMetadata)
</span><span class="cx"> {
</span><del>- if (mode == IndexedDB::TransactionVersionChange) {
</del><ins>+ if (mode == IndexedDB::TransactionMode::VersionChange) {
</ins><span class="cx"> // Not active until the callback.
</span><span class="cx"> m_state = Inactive;
</span><span class="cx"> }
</span><span class="lines">@@ -335,26 +335,26 @@
</span><span class="cx"> {
</span><span class="cx"> if (modeString.isNull()
</span><span class="cx"> || modeString == IDBTransaction::modeReadOnly())
</span><del>- return IndexedDB::TransactionReadOnly;
</del><ins>+ return IndexedDB::TransactionMode::ReadOnly;
</ins><span class="cx"> if (modeString == IDBTransaction::modeReadWrite())
</span><del>- return IndexedDB::TransactionReadWrite;
</del><ins>+ return IndexedDB::TransactionMode::ReadWrite;
</ins><span class="cx">
</span><span class="cx"> ec = TypeError;
</span><del>- return IndexedDB::TransactionReadOnly;
</del><ins>+ return IndexedDB::TransactionMode::ReadOnly;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const AtomicString& IDBTransaction::modeToString(IndexedDB::TransactionMode mode)
</span><span class="cx"> {
</span><span class="cx"> switch (mode) {
</span><del>- case IndexedDB::TransactionReadOnly:
</del><ins>+ case IndexedDB::TransactionMode::ReadOnly:
</ins><span class="cx"> return IDBTransaction::modeReadOnly();
</span><span class="cx"> break;
</span><span class="cx">
</span><del>- case IndexedDB::TransactionReadWrite:
</del><ins>+ case IndexedDB::TransactionMode::ReadWrite:
</ins><span class="cx"> return IDBTransaction::modeReadWrite();
</span><span class="cx"> break;
</span><span class="cx">
</span><del>- case IndexedDB::TransactionVersionChange:
</del><ins>+ case IndexedDB::TransactionMode::VersionChange:
</ins><span class="cx"> return IDBTransaction::modeVersionChange();
</span><span class="cx"> break;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -70,8 +70,8 @@
</span><span class="cx"> int64_t id() const { return m_id; }
</span><span class="cx"> bool isActive() const { return m_state == Active; }
</span><span class="cx"> bool isFinished() const { return m_state == Finished; }
</span><del>- bool isReadOnly() const { return m_mode == IndexedDB::TransactionReadOnly; }
- bool isVersionChange() const { return m_mode == IndexedDB::TransactionVersionChange; }
</del><ins>+ bool isReadOnly() const { return m_mode == IndexedDB::TransactionMode::ReadOnly; }
+ bool isVersionChange() const { return m_mode == IndexedDB::TransactionMode::VersionChange; }
</ins><span class="cx">
</span><span class="cx"> // Implement the IDBTransaction IDL
</span><span class="cx"> const String& mode() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> void PutOperation::perform(std::function<void()> completionCallback)
</span><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "PutOperation");
</span><del>- ASSERT(m_transaction->mode() != IndexedDB::TransactionReadOnly);
</del><ins>+ ASSERT(m_transaction->mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx"> ASSERT(m_indexIDs.size() == m_indexKeys.size());
</span><span class="cx">
</span><span class="cx"> RefPtr<PutOperation> operation(this);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> if (m_queuedTransactions.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- ASSERT(m_startedTransactions.isEmpty() || (*m_startedTransactions.begin())->mode() != IndexedDB::TransactionVersionChange);
</del><ins>+ ASSERT(m_startedTransactions.isEmpty() || (*m_startedTransactions.begin())->mode() != IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx">
</span><span class="cx"> ListHashSet<IDBTransactionBackend*>::const_iterator it = m_queuedTransactions.begin();
</span><span class="cx"> while (it != m_queuedTransactions.end()) {
</span><span class="lines">@@ -123,22 +123,22 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_queuedTransactions.contains(transaction));
</span><span class="cx"> switch (transaction->mode()) {
</span><del>- case IndexedDB::TransactionVersionChange:
</del><ins>+ case IndexedDB::TransactionMode::VersionChange:
</ins><span class="cx"> ASSERT(m_queuedTransactions.size() == 1);
</span><span class="cx"> ASSERT(m_startedTransactions.isEmpty());
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- case IndexedDB::TransactionReadOnly:
</del><ins>+ case IndexedDB::TransactionMode::ReadOnly:
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- case IndexedDB::TransactionReadWrite:
</del><ins>+ case IndexedDB::TransactionMode::ReadWrite:
</ins><span class="cx"> for (HashSet<IDBTransactionBackend*>::const_iterator it = m_startedTransactions.begin(); it != m_startedTransactions.end(); ++it) {
</span><del>- if ((*it)->mode() == IndexedDB::TransactionReadWrite && doScopesOverlap(transaction->scope(), (*it)->scope()))
</del><ins>+ if ((*it)->mode() == IndexedDB::TransactionMode::ReadWrite && doScopesOverlap(transaction->scope(), (*it)->scope()))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> for (ListHashSet<IDBTransactionBackend*>::const_iterator it = m_queuedTransactions.begin(); *it != transaction; ++it) {
</span><span class="cx"> ASSERT(it != m_queuedTransactions.end());
</span><del>- if ((*it)->mode() == IndexedDB::TransactionReadWrite && doScopesOverlap(transaction->scope(), (*it)->scope()))
</del><ins>+ if ((*it)->mode() == IndexedDB::TransactionMode::ReadWrite && doScopesOverlap(transaction->scope(), (*it)->scope()))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">
</span><span class="cx"> class IDBVersionChangeEvent : public Event {
</span><span class="cx"> public:
</span><del>- static PassRefPtr<IDBVersionChangeEvent> create(unsigned long long oldVersion = 0, unsigned long long newVersion = 0, IndexedDB::VersionNullness newVersionNullness = IndexedDB::NullVersion, const AtomicString& eventType = AtomicString())
</del><ins>+ static PassRefPtr<IDBVersionChangeEvent> create(unsigned long long oldVersion = 0, unsigned long long newVersion = 0, IndexedDB::VersionNullness newVersionNullness = IndexedDB::VersionNullness::Null, const AtomicString& eventType = AtomicString())
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(new IDBVersionChangeEvent(oldVersion, newVersion, newVersionNullness, eventType));
</span><span class="cx"> }
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> virtual ~IDBVersionChangeEvent();
</span><span class="cx">
</span><span class="cx"> virtual unsigned long long oldVersion() { return m_oldVersion; }
</span><del>- virtual unsigned long long newVersion(bool& isNull) { isNull = (m_newVersionNullness == IndexedDB::NullVersion); return m_newVersion; }
</del><ins>+ virtual unsigned long long newVersion(bool& isNull) { isNull = (m_newVersionNullness == IndexedDB::VersionNullness::Null); return m_newVersion; }
</ins><span class="cx">
</span><span class="cx"> virtual EventInterface eventInterface() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIndexedDBh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -32,27 +32,30 @@
</span><span class="cx">
</span><span class="cx"> namespace IndexedDB {
</span><span class="cx">
</span><del>-enum TransactionMode {
- TransactionReadOnly = 0,
- TransactionReadWrite = 1,
- TransactionVersionChange = 2
</del><ins>+enum class TransactionMode {
+ ReadOnly = 0,
+ ReadWrite = 1,
+ VersionChange = 2,
</ins><span class="cx"> };
</span><ins>+const unsigned TransactionModeMaximum = 2;
</ins><span class="cx">
</span><del>-enum CursorDirection {
- CursorNext = 0,
- CursorNextNoDuplicate = 1,
- CursorPrev = 2,
- CursorPrevNoDuplicate = 3,
</del><ins>+enum class CursorDirection {
+ Next = 0,
+ NextNoDuplicate = 1,
+ Prev = 2,
+ PrevNoDuplicate = 3,
</ins><span class="cx"> };
</span><ins>+const unsigned CursorDirectionMaximum = 3;
</ins><span class="cx">
</span><del>-enum CursorType {
- CursorKeyAndValue = 0,
- CursorKeyOnly
</del><ins>+enum class CursorType {
+ KeyAndValue = 0,
+ KeyOnly = 1,
</ins><span class="cx"> };
</span><ins>+const unsigned CursorTypeMaximum = 1;
</ins><span class="cx">
</span><del>-enum VersionNullness {
- NullVersion,
- NonNullVersion
</del><ins>+enum class VersionNullness {
+ Null,
+ NonNull,
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace IndexedDB
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbleveldbIDBBackingStoreLevelDBcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -1765,8 +1765,8 @@
</span><span class="cx">
</span><span class="cx"> bool lowerBound = range && range->lower();
</span><span class="cx"> bool upperBound = range && range->upper();
</span><del>- cursorOptions.forward = (direction == IndexedDB::CursorNextNoDuplicate || direction == IndexedDB::CursorNext);
- cursorOptions.unique = (direction == IndexedDB::CursorNextNoDuplicate || direction == IndexedDB::CursorPrevNoDuplicate);
</del><ins>+ cursorOptions.forward = (direction == IndexedDB::CursorDirection::NextNoDuplicate || direction == IndexedDB::CursorDirection::Next);
+ cursorOptions.unique = (direction == IndexedDB::CursorDirection::NextNoDuplicate || direction == IndexedDB::CursorDirection::PrevNoDuplicate);
</ins><span class="cx">
</span><span class="cx"> if (!lowerBound) {
</span><span class="cx"> cursorOptions.lowKey = ObjectStoreDataKey::encode(databaseId, objectStoreId, minIDBKey());
</span><span class="lines">@@ -1820,8 +1820,8 @@
</span><span class="cx">
</span><span class="cx"> bool lowerBound = range && range->lower();
</span><span class="cx"> bool upperBound = range && range->upper();
</span><del>- cursorOptions.forward = (direction == IndexedDB::CursorNextNoDuplicate || direction == IndexedDB::CursorNext);
- cursorOptions.unique = (direction == IndexedDB::CursorNextNoDuplicate || direction == IndexedDB::CursorPrevNoDuplicate);
</del><ins>+ cursorOptions.forward = (direction == IndexedDB::CursorDirection::NextNoDuplicate || direction == IndexedDB::CursorDirection::Next);
+ cursorOptions.unique = (direction == IndexedDB::CursorDirection::NextNoDuplicate || direction == IndexedDB::CursorDirection::PrevNoDuplicate);
</ins><span class="cx">
</span><span class="cx"> if (!lowerBound) {
</span><span class="cx"> cursorOptions.lowKey = IndexDataKey::encodeMinKey(databaseId, objectStoreId, indexId);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbleveldbIDBServerConnectionLevelDBcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -253,16 +253,16 @@
</span><span class="cx"> int64_t cursorID = m_nextCursorID++;
</span><span class="cx">
</span><span class="cx"> if (operation.indexID() == IDBIndexMetadata::InvalidId) {
</span><del>- ASSERT(operation.cursorType() != IndexedDB::CursorKeyOnly);
</del><ins>+ ASSERT(operation.cursorType() != IndexedDB::CursorType::KeyOnly);
</ins><span class="cx"> // ObjectStore Retrieval Operation
</span><del>- backingStoreCursor = m_backingStore->openObjectStoreCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+ backingStoreCursor = m_backingStore->openObjectStoreCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorDirection::Next);
</ins><span class="cx"> } else {
</span><del>- if (operation.cursorType() == IndexedDB::CursorKeyOnly) {
</del><ins>+ if (operation.cursorType() == IndexedDB::CursorType::KeyOnly) {
</ins><span class="cx"> // Index Value Retrieval Operation
</span><del>- backingStoreCursor = m_backingStore->openIndexKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+ backingStoreCursor = m_backingStore->openIndexKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorDirection::Next);
</ins><span class="cx"> } else {
</span><span class="cx"> // Index Referenced Value Retrieval Operation
</span><del>- backingStoreCursor = m_backingStore->openIndexCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+ backingStoreCursor = m_backingStore->openIndexCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorDirection::Next);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx"> ASYNC_COMPLETION_CALLBACK_WITH_NULL_ARG(completionCallback);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- if (operation.cursorType() == IndexedDB::CursorKeyOnly) {
</del><ins>+ if (operation.cursorType() == IndexedDB::CursorType::KeyOnly) {
</ins><span class="cx"> // Index Value Retrieval Operation
</span><span class="cx"> operation.callbacks()->onSuccess(primaryKey.get());
</span><span class="cx"> ASYNC_COMPLETION_CALLBACK_WITH_NULL_ARG(completionCallback);
</span><span class="lines">@@ -442,11 +442,11 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBBackingStoreCursorLevelDB> backingStoreCursor;
</span><span class="cx"> if (operation.indexID() == IDBIndexMetadata::InvalidId) {
</span><del>- ASSERT(operation.cursorType() != IndexedDB::CursorKeyOnly);
</del><ins>+ ASSERT(operation.cursorType() != IndexedDB::CursorType::KeyOnly);
</ins><span class="cx"> backingStoreCursor = m_backingStore->openObjectStoreCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), operation.direction());
</span><span class="cx"> } else {
</span><span class="cx"> ASSERT(operation.taskType() == IDBDatabaseBackend::NormalTask);
</span><del>- if (operation.cursorType() == IndexedDB::CursorKeyOnly)
</del><ins>+ if (operation.cursorType() == IndexedDB::CursorType::KeyOnly)
</ins><span class="cx"> backingStoreCursor = m_backingStore->openIndexKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), operation.direction());
</span><span class="cx"> else
</span><span class="cx"> backingStoreCursor = m_backingStore->openIndexCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), operation.direction());
</span><span class="lines">@@ -480,9 +480,9 @@
</span><span class="cx"> int64_t cursorID = m_nextCursorID++;
</span><span class="cx">
</span><span class="cx"> if (operation.indexID() == IDBIndexMetadata::InvalidId)
</span><del>- backingStoreCursor = m_backingStore->openObjectStoreKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+ backingStoreCursor = m_backingStore->openObjectStoreKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorDirection::Next);
</ins><span class="cx"> else
</span><del>- backingStoreCursor = m_backingStore->openIndexKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+ backingStoreCursor = m_backingStore->openIndexKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorDirection::Next);
</ins><span class="cx"> if (!backingStoreCursor) {
</span><span class="cx"> operation.callbacks()->onSuccess(count);
</span><span class="cx"> callOnMainThread([completionCallback]() {
</span><span class="lines">@@ -506,7 +506,7 @@
</span><span class="cx">
</span><span class="cx"> int64_t cursorID = m_nextCursorID++;
</span><span class="cx">
</span><del>- RefPtr<IDBBackingStoreCursorLevelDB> backingStoreCursor = m_backingStore->openObjectStoreCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+ RefPtr<IDBBackingStoreCursorLevelDB> backingStoreCursor = m_backingStore->openObjectStoreCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorDirection::Next);
</ins><span class="cx"> if (backingStoreCursor) {
</span><span class="cx"> do {
</span><span class="cx"> if (!m_backingStore->deleteRecord(*backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), backingStoreCursor->recordIdentifier())) {
</span><span class="lines">@@ -657,10 +657,10 @@
</span><span class="cx"> foundPrimaryKeys.append(backingStoreCursor->primaryKey());
</span><span class="cx">
</span><span class="cx"> switch (cursor.cursorType()) {
</span><del>- case IndexedDB::CursorKeyOnly:
</del><ins>+ case IndexedDB::CursorType::KeyOnly:
</ins><span class="cx"> foundValues.append(SharedBuffer::create());
</span><span class="cx"> break;
</span><del>- case IndexedDB::CursorKeyAndValue:
</del><ins>+ case IndexedDB::CursorType::KeyAndValue:
</ins><span class="cx"> sizeEstimate += backingStoreCursor->value()->size();
</span><span class="cx"> foundValues.append(backingStoreCursor->value());
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/WebCore.exp.in        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -2923,4 +2923,5 @@
</span><span class="cx"> __ZN7WebCore18IDBDatabaseBackend14openConnectionEN3WTF10PassRefPtrINS_12IDBCallbacksEEENS2_INS_20IDBDatabaseCallbacksEEExy
</span><span class="cx"> __ZN7WebCore18IDBDatabaseBackend6createERKN3WTF6StringES4_PNS_26IDBFactoryBackendInterfaceERNS_19IDBServerConnectionE
</span><span class="cx"> __ZN7WebCore18IDBDatabaseBackendD1Ev
</span><ins>+__ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_9IndexedDB15TransactionModeEE4copyERKS2_
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCrossThreadCopiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CrossThreadCopier.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CrossThreadCopier.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -73,6 +73,21 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><ins>+IndexedDB::TransactionMode CrossThreadCopierBase<false, false, IndexedDB::TransactionMode>::copy(const IndexedDB::TransactionMode& mode)
+{
+ return mode;
+}
+
+IndexedDB::CursorDirection CrossThreadCopierBase<false, false, IndexedDB::CursorDirection>::copy(const IndexedDB::CursorDirection& direction)
+{
+ return direction;
+}
+
+IndexedDB::CursorType CrossThreadCopierBase<false, false, IndexedDB::CursorType>::copy(const IndexedDB::CursorType& type)
+{
+ return type;
+}
+
</ins><span class="cx"> CrossThreadCopierBase<false, false, IDBDatabaseMetadata>::Type CrossThreadCopierBase<false, false, IDBDatabaseMetadata>::copy(const IDBDatabaseMetadata& metadata)
</span><span class="cx"> {
</span><span class="cx"> return metadata.isolatedCopy();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCrossThreadCopierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CrossThreadCopier.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CrossThreadCopier.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -146,6 +146,21 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><ins>+ namespace IndexedDB {
+ enum class TransactionMode;
+ enum class CursorDirection;
+ enum class CursorType;
+ }
+ template<> struct CrossThreadCopierBase<false, false, IndexedDB::TransactionMode> {
+ static IndexedDB::TransactionMode copy(const IndexedDB::TransactionMode&);
+ };
+ template<> struct CrossThreadCopierBase<false, false, IndexedDB::CursorDirection> {
+ static IndexedDB::CursorDirection copy(const IndexedDB::CursorDirection&);
+ };
+ template<> struct CrossThreadCopierBase<false, false, IndexedDB::CursorType> {
+ static IndexedDB::CursorType copy(const IndexedDB::CursorType&);
+ };
+
</ins><span class="cx"> struct IDBDatabaseMetadata;
</span><span class="cx"> template<> struct CrossThreadCopierBase<false, false, IDBDatabaseMetadata> {
</span><span class="cx"> typedef IDBDatabaseMetadata Type;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/ChangeLog        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -1,3 +1,58 @@
</span><ins>+2013-12-17 Brady Eidson <beidson@apple.com>
+
+ DatabaseProcess: Pipe through object store IDs and transaction mode for "openTransaction"
+ https://bugs.webkit.org/show_bug.cgi?id=125872
+
+ Reviewed by Alexey Proskuryakov.
+
+ Pipe through the objectStoreIDs and mode:
+ * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
+ (WebKit::DatabaseProcessIDBConnection::openTransaction):
+ * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
+ * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
+
+ Rework postTransactionOperation to take a pre-made AsyncTask to allow for different
+ transaction operation function signatures:
+ * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
+ (WebKit::UniqueIDBDatabase::openTransaction): Pipe through the objectStoreIDs and mode:
+ (WebKit::UniqueIDBDatabase::beginTransaction):
+ (WebKit::UniqueIDBDatabase::commitTransaction):
+ (WebKit::UniqueIDBDatabase::resetTransaction):
+ (WebKit::UniqueIDBDatabase::rollbackTransaction):
+ (WebKit::UniqueIDBDatabase::postTransactionOperation):
+ (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
+ * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
+
+ Pipe through the objectStoreIDs and mode:
+ * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
+ * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
+ (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
+ * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
+
+ * Platform/Logging.h: Add an IDB logging channel.
+
+ * Shared/AsyncTask.h:
+ (WebKit::createAsyncTask): Add a 3-argument variant.
+
+ * Shared/WebCrossThreadCopier.cpp:
+ (WebCore::::copy): Add a Vector<int64_t> copier.
+ * Shared/WebCrossThreadCopier.h:
+
+ Add logging throughout currently implemented methods:
+ * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
+ (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
+ (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
+ (WebKit::WebIDBServerConnection::openTransaction): Pipe through the objectStoreIDs and mode.
+ (WebKit::WebIDBServerConnection::didOpenTransaction):
+ (WebKit::WebIDBServerConnection::beginTransaction):
+ (WebKit::WebIDBServerConnection::didBeginTransaction):
+ (WebKit::WebIDBServerConnection::commitTransaction):
+ (WebKit::WebIDBServerConnection::didCommitTransaction):
+ (WebKit::WebIDBServerConnection::resetTransaction):
+ (WebKit::WebIDBServerConnection::didResetTransaction):
+ (WebKit::WebIDBServerConnection::rollbackTransaction):
+ (WebKit::WebIDBServerConnection::didRollbackTransaction):
+
</ins><span class="cx"> 2013-12-17 Gavin Barraclough <barraclough@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove PageVisibilityStateUnloaded
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebIDBServerConnectionMessages.h"
</span><span class="cx"> #include <WebCore/IDBDatabaseMetadata.h>
</span><ins>+#include <WebCore/IndexedDB.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -73,12 +74,18 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DatabaseProcessIDBConnection::openTransaction(uint64_t requestID, int64_t transactionID, int64_t)
</del><ins>+void DatabaseProcessIDBConnection::openTransaction(uint64_t requestID, int64_t transactionID, const Vector<int64_t>& objectStoreIDs, uint64_t intMode)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_uniqueIDBDatabase);
</span><span class="cx">
</span><ins>+ if (intMode > IndexedDB::TransactionModeMaximum) {
+ send(Messages::WebIDBServerConnection::DidOpenTransaction(requestID, false));
+ return;
+ }
+
+ IndexedDB::TransactionMode mode = static_cast<IndexedDB::TransactionMode>(intMode);
</ins><span class="cx"> RefPtr<DatabaseProcessIDBConnection> connection(this);
</span><del>- m_uniqueIDBDatabase->openTransaction(IDBTransactionIdentifier(*this, transactionID), [connection, requestID](bool success) {
</del><ins>+ m_uniqueIDBDatabase->openTransaction(IDBTransactionIdentifier(*this, transactionID), objectStoreIDs, mode, [connection, requestID](bool success) {
</ins><span class="cx"> connection->send(Messages::WebIDBServerConnection::DidOpenTransaction(requestID, success));
</span><span class="cx"> });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> // Message handlers.
</span><span class="cx"> void establishConnection(const String& databaseName, const SecurityOriginData& openingOrigin, const SecurityOriginData& mainFrameOrigin);
</span><span class="cx"> void getOrEstablishIDBDatabaseMetadata(uint64_t requestID);
</span><del>- void openTransaction(uint64_t requestID, int64_t transactionID, int64_t transactionMode);
</del><ins>+ void openTransaction(uint64_t requestID, int64_t transactionID, const Vector<int64_t>& objectStoreIDs, uint64_t transactionMode);
</ins><span class="cx"> void beginTransaction(uint64_t requestID, int64_t transactionID);
</span><span class="cx"> void commitTransaction(uint64_t requestID, int64_t transactionID);
</span><span class="cx"> void resetTransaction(uint64_t requestID, int64_t transactionID);
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectionmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> EstablishConnection(String databaseName, WebKit::SecurityOriginData openingOrigin, WebKit::SecurityOriginData mainFrameOrigin)
</span><span class="cx"> GetOrEstablishIDBDatabaseMetadata(uint64_t requestID)
</span><span class="cx">
</span><del>- OpenTransaction(uint64_t requestID, int64_t transactionID, int64_t transactionMode)
</del><ins>+ OpenTransaction(uint64_t requestID, int64_t transactionID, Vector<int64_t> objectStoreIDs, uint64_t transactionMode)
</ins><span class="cx"> BeginTransaction(uint64_t requestID, int64_t transactionID)
</span><span class="cx"> CommitTransaction(uint64_t requestID, int64_t transactionID)
</span><span class="cx"> ResetTransaction(uint64_t requestID, int64_t transactionID)
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -196,32 +196,32 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void UniqueIDBDatabase::openTransaction(const IDBTransactionIdentifier& identifier, std::function<void(bool)> successCallback)
</del><ins>+void UniqueIDBDatabase::openTransaction(const IDBTransactionIdentifier& identifier, const Vector<int64_t>& objectStoreIDs, WebCore::IndexedDB::TransactionMode mode, std::function<void(bool)> successCallback)
</ins><span class="cx"> {
</span><del>- postTransactionOperation(&UniqueIDBDatabase::openBackingStoreTransaction, identifier, successCallback);
</del><ins>+ postTransactionOperation(identifier, createAsyncTask(*this, &UniqueIDBDatabase::openBackingStoreTransaction, identifier, objectStoreIDs, mode), successCallback);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UniqueIDBDatabase::beginTransaction(const IDBTransactionIdentifier& identifier, std::function<void(bool)> successCallback)
</span><span class="cx"> {
</span><del>- postTransactionOperation(&UniqueIDBDatabase::beginBackingStoreTransaction, identifier, successCallback);
</del><ins>+ postTransactionOperation(identifier, createAsyncTask(*this, &UniqueIDBDatabase::beginBackingStoreTransaction, identifier), successCallback);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UniqueIDBDatabase::commitTransaction(const IDBTransactionIdentifier& identifier, std::function<void(bool)> successCallback)
</span><span class="cx"> {
</span><del>- postTransactionOperation(&UniqueIDBDatabase::commitBackingStoreTransaction, identifier, successCallback);
</del><ins>+ postTransactionOperation(identifier, createAsyncTask(*this, &UniqueIDBDatabase::commitBackingStoreTransaction, identifier), successCallback);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UniqueIDBDatabase::resetTransaction(const IDBTransactionIdentifier& identifier, std::function<void(bool)> successCallback)
</span><span class="cx"> {
</span><del>- postTransactionOperation(&UniqueIDBDatabase::resetBackingStoreTransaction, identifier, successCallback);
</del><ins>+ postTransactionOperation(identifier, createAsyncTask(*this, &UniqueIDBDatabase::resetBackingStoreTransaction, identifier), successCallback);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UniqueIDBDatabase::rollbackTransaction(const IDBTransactionIdentifier& identifier, std::function<void(bool)> successCallback)
</span><span class="cx"> {
</span><del>- postTransactionOperation(&UniqueIDBDatabase::rollbackBackingStoreTransaction, identifier, successCallback);
</del><ins>+ postTransactionOperation(identifier, createAsyncTask(*this, &UniqueIDBDatabase::rollbackBackingStoreTransaction, identifier), successCallback);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void UniqueIDBDatabase::postTransactionOperation(TransactionOperationFunction function, const IDBTransactionIdentifier& identifier, std::function<void(bool)> successCallback)
</del><ins>+void UniqueIDBDatabase::postTransactionOperation(const IDBTransactionIdentifier& identifier, std::unique_ptr<AsyncTask> task, std::function<void(bool)> successCallback)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="cx">
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- postDatabaseTask(createAsyncTask(*this, function, identifier));
</del><ins>+ postDatabaseTask(std::move(task));
</ins><span class="cx">
</span><span class="cx"> RefPtr<AsyncRequest> request = AsyncRequestImpl<bool>::create([successCallback](bool success) {
</span><span class="cx"> successCallback(success);
</span><span class="lines">@@ -258,12 +258,12 @@
</span><span class="cx"> request->completeRequest(success);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void UniqueIDBDatabase::openBackingStoreTransaction(const IDBTransactionIdentifier& identifier)
</del><ins>+void UniqueIDBDatabase::openBackingStoreTransaction(const IDBTransactionIdentifier& identifier, const Vector<int64_t>& objectStoreIDs, WebCore::IndexedDB::TransactionMode mode)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!isMainThread());
</span><span class="cx"> ASSERT(m_backingStore);
</span><span class="cx">
</span><del>- bool success = m_backingStore->establishTransaction(identifier);
</del><ins>+ bool success = m_backingStore->establishTransaction(identifier, objectStoreIDs, mode);
</ins><span class="cx">
</span><span class="cx"> postMainThreadTask(createAsyncTask(*this, &UniqueIDBDatabase::didCompleteTransactionOperation, identifier, success));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">
</span><span class="cx"> #include "IDBTransactionIdentifier.h"
</span><span class="cx"> #include "UniqueIDBDatabaseIdentifier.h"
</span><ins>+#include <WebCore/IndexedDB.h>
</ins><span class="cx"> #include <functional>
</span><span class="cx"> #include <wtf/Deque.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="lines">@@ -66,7 +67,7 @@
</span><span class="cx">
</span><span class="cx"> void getOrEstablishIDBDatabaseMetadata(std::function<void(bool, const WebCore::IDBDatabaseMetadata&)> completionCallback);
</span><span class="cx">
</span><del>- void openTransaction(const IDBTransactionIdentifier&, std::function<void(bool)> successCallback);
</del><ins>+ void openTransaction(const IDBTransactionIdentifier&, const Vector<int64_t>& objectStoreIDs, WebCore::IndexedDB::TransactionMode, std::function<void(bool)> successCallback);
</ins><span class="cx"> void beginTransaction(const IDBTransactionIdentifier&, std::function<void(bool)> successCallback);
</span><span class="cx"> void commitTransaction(const IDBTransactionIdentifier&, std::function<void(bool)> successCallback);
</span><span class="cx"> void resetTransaction(const IDBTransactionIdentifier&, std::function<void(bool)> successCallback);
</span><span class="lines">@@ -97,14 +98,13 @@
</span><span class="cx"> // Returns true if this origin can use the same databases as the given origin.
</span><span class="cx"> bool canShareDatabases(const SecurityOriginData&, const SecurityOriginData&) const;
</span><span class="cx">
</span><del>- typedef void (UniqueIDBDatabase::*TransactionOperationFunction)(const IDBTransactionIdentifier&);
- void postTransactionOperation(TransactionOperationFunction, const IDBTransactionIdentifier&, std::function<void(bool)> successCallback);
</del><ins>+ void postTransactionOperation(const IDBTransactionIdentifier&, std::unique_ptr<AsyncTask>, std::function<void(bool)> successCallback);
</ins><span class="cx">
</span><span class="cx"> // To be called from the database workqueue thread only
</span><span class="cx"> void performNextDatabaseTask();
</span><span class="cx"> void postMainThreadTask(std::unique_ptr<AsyncTask>);
</span><span class="cx"> void openBackingStoreAndReadMetadata(const UniqueIDBDatabaseIdentifier&, const String& databaseDirectory);
</span><del>- void openBackingStoreTransaction(const IDBTransactionIdentifier&);
</del><ins>+ void openBackingStoreTransaction(const IDBTransactionIdentifier&, const Vector<int64_t>& objectStoreIDs, WebCore::IndexedDB::TransactionMode);
</ins><span class="cx"> void beginBackingStoreTransaction(const IDBTransactionIdentifier&);
</span><span class="cx"> void commitBackingStoreTransaction(const IDBTransactionIdentifier&);
</span><span class="cx"> void resetBackingStoreTransaction(const IDBTransactionIdentifier&);
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)
</span><span class="cx">
</span><ins>+#include <WebCore/IndexedDB.h>
</ins><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -44,7 +45,7 @@
</span><span class="cx">
</span><span class="cx"> virtual std::unique_ptr<WebCore::IDBDatabaseMetadata> getOrEstablishMetadata() = 0;
</span><span class="cx">
</span><del>- virtual bool establishTransaction(const IDBTransactionIdentifier&) = 0;
</del><ins>+ virtual bool establishTransaction(const IDBTransactionIdentifier&, const Vector<int64_t>& objectStoreIDs, WebCore::IndexedDB::TransactionMode) = 0;
</ins><span class="cx"> virtual bool beginTransaction(const IDBTransactionIdentifier&) = 0;
</span><span class="cx"> virtual bool commitTransaction(const IDBTransactionIdentifier&) = 0;
</span><span class="cx"> virtual bool resetTransaction(const IDBTransactionIdentifier&) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBsqliteUniqueIDBDatabaseBackingStoreSQLitecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -193,10 +193,10 @@
</span><span class="cx"> return metadata;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool UniqueIDBDatabaseBackingStoreSQLite::establishTransaction(const IDBTransactionIdentifier& identifier)
</del><ins>+bool UniqueIDBDatabaseBackingStoreSQLite::establishTransaction(const IDBTransactionIdentifier& identifier, const Vector<int64_t>&, WebCore::IndexedDB::TransactionMode)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!isMainThread());
</span><del>-
</del><ins>+
</ins><span class="cx"> if (!m_transactions.add(identifier, SQLiteIDBTransaction::create(identifier)).isNewEntry) {
</span><span class="cx"> LOG_ERROR("Attempt to establish transaction identifier that already exists");
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBsqliteUniqueIDBDatabaseBackingStoreSQLiteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">
</span><span class="cx"> virtual std::unique_ptr<WebCore::IDBDatabaseMetadata> getOrEstablishMetadata() OVERRIDE;
</span><span class="cx">
</span><del>- virtual bool establishTransaction(const IDBTransactionIdentifier&) OVERRIDE;
</del><ins>+ virtual bool establishTransaction(const IDBTransactionIdentifier&, const Vector<int64_t>& objectStoreIDs, WebCore::IndexedDB::TransactionMode) OVERRIDE;
</ins><span class="cx"> virtual bool beginTransaction(const IDBTransactionIdentifier&) OVERRIDE;
</span><span class="cx"> virtual bool commitTransaction(const IDBTransactionIdentifier&) OVERRIDE;
</span><span class="cx"> virtual bool resetTransaction(const IDBTransactionIdentifier&) OVERRIDE;
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformLoggingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/Logging.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/Logging.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/Platform/Logging.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> M(StorageAPI) \
</span><span class="cx"> M(TextInput) \
</span><span class="cx"> M(View) \
</span><ins>+ M(IDB) \
</ins><span class="cx">
</span><span class="cx"> #define DECLARE_LOG_CHANNEL(name) \
</span><span class="cx"> extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAsyncTaskh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/AsyncTask.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/AsyncTask.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/Shared/AsyncTask.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -100,6 +100,22 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+template<typename T, typename P1, typename MP1, typename P2, typename MP2, typename P3, typename MP3>
+std::unique_ptr<AsyncTask> createAsyncTask(
+ T& callee,
+ void (T::*method)(MP1, MP2, MP3),
+ const P1& parameter1,
+ const P2& parameter2,
+ const P3& parameter3)
+{
+ return std::make_unique<AsyncTaskImpl<T, MP1, MP2, MP3>>(
+ &callee,
+ method,
+ WebCore::CrossThreadCopier<P1>::copy(parameter1),
+ WebCore::CrossThreadCopier<P2>::copy(parameter2),
+ WebCore::CrossThreadCopier<P3>::copy(parameter3));
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx">
</span><span class="cx"> #endif // AsyncTask_h
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCrossThreadCopiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCrossThreadCopier.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCrossThreadCopier.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/Shared/WebCrossThreadCopier.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -44,6 +44,13 @@
</span><span class="cx"> return identifier.isolatedCopy();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+Vector<int64_t> CrossThreadCopierBase<false, false, Vector<int64_t>>::copy(const Vector<int64_t>& vector)
+{
+ Vector<int64_t> result;
+ result.appendVector(vector);
+ return result;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCrossThreadCopierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCrossThreadCopier.h (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCrossThreadCopier.h        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/Shared/WebCrossThreadCopier.h        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #define WebCrossThreadCopier_h
</span><span class="cx">
</span><span class="cx"> #include <WebCore/CrossThreadCopier.h>
</span><ins>+#include <wtf/Vector.h>
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><span class="lines">@@ -45,6 +46,10 @@
</span><span class="cx"> static WebKit::IDBTransactionIdentifier copy(const WebKit::IDBTransactionIdentifier&);
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+template<> struct CrossThreadCopierBase<false, false, Vector<int64_t>> {
+ static Vector<int64_t> copy(const Vector<int64_t>&);
+};
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp (160731 => 160732)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp        2013-12-17 23:42:56 UTC (rev 160731)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp        2013-12-18 00:12:50 UTC (rev 160732)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "AsyncRequest.h"
</span><span class="cx"> #include "DatabaseProcessIDBConnectionMessages.h"
</span><span class="cx"> #include "DatabaseToWebProcessConnectionMessages.h"
</span><ins>+#include "Logging.h"
</ins><span class="cx"> #include "SecurityOriginData.h"
</span><span class="cx"> #include "WebProcess.h"
</span><span class="cx"> #include "WebToDatabaseProcessConnection.h"
</span><span class="lines">@@ -95,11 +96,15 @@
</span><span class="cx"> ASSERT(!m_serverRequests.contains(requestID));
</span><span class="cx"> m_serverRequests.add(requestID, serverRequest.release());
</span><span class="cx">
</span><ins>+ LOG(IDB, "WebProcess getOrEstablishIDBDatabaseMetadata request ID %llu", requestID);
+
</ins><span class="cx"> send(Messages::DatabaseProcessIDBConnection::GetOrEstablishIDBDatabaseMetadata(requestID));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata(uint64_t requestID, bool success, const IDBDatabaseMetadata& metadata)
</span><span class="cx"> {
</span><ins>+ LOG(IDB, "WebProcess didGetOrEstablishIDBDatabaseMetadata request ID %llu", requestID);
+
</ins><span class="cx"> RefPtr<AsyncRequest> serverRequest = m_serverRequests.take(requestID);
</span><span class="cx">
</span><span class="cx"> if (!serverRequest)
</span><span class="lines">@@ -112,7 +117,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebIDBServerConnection::openTransaction(int64_t transactionID, const HashSet<int64_t>&, IndexedDB::TransactionMode mode, BoolCallbackFunction successCallback)
</del><ins>+void WebIDBServerConnection::openTransaction(int64_t transactionID, const HashSet<int64_t>& objectStoreIDs, IndexedDB::TransactionMode mode, BoolCallbackFunction successCallback)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<AsyncRequest> serverRequest = AsyncRequestImpl<bool>::create(successCallback);
</span><span class="cx">
</span><span class="lines">@@ -124,11 +129,17 @@
</span><span class="cx"> ASSERT(!m_serverRequests.contains(requestID));
</span><span class="cx"> m_serverRequests.add(requestID, serverRequest.release());
</span><span class="cx">
</span><del>- send(Messages::DatabaseProcessIDBConnection::OpenTransaction(requestID, transactionID, mode));
</del><ins>+ LOG(IDB, "WebProcess openTransaction ID %lli (request ID %llu)", transactionID, requestID);
+
+ Vector<int64_t> objectStoreIDVector;
+ copyToVector(objectStoreIDs, objectStoreIDVector);
+ send(Messages::DatabaseProcessIDBConnection::OpenTransaction(requestID, transactionID, objectStoreIDVector, static_cast<uint64_t>(mode)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebIDBServerConnection::didOpenTransaction(uint64_t requestID, bool success)
</span><span class="cx"> {
</span><ins>+ LOG(IDB, "WebProcess didOpenTransaction request ID %llu", requestID);
+
</ins><span class="cx"> RefPtr<AsyncRequest> serverRequest = m_serverRequests.take(requestID);
</span><span class="cx">
</span><span class="cx"> if (!serverRequest)
</span><span class="lines">@@ -145,11 +156,15 @@
</span><span class="cx"> ASSERT(!m_serverRequests.contains(requestID));
</span><span class="cx"> m_serverRequests.add(requestID, serverRequest.release());
</span><span class="cx">
</span><ins>+ LOG(IDB, "WebProcess beginTransaction ID %lli (request ID %llu)", transactionID, requestID);
+
</ins><span class="cx"> send(Messages::DatabaseProcessIDBConnection::BeginTransaction(requestID, transactionID));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebIDBServerConnection::didBeginTransaction(uint64_t requestID, bool)
</span><span class="cx"> {
</span><ins>+ LOG(IDB, "WebProcess didBeginTransaction request ID %llu", requestID);
+
</ins><span class="cx"> RefPtr<AsyncRequest> serverRequest = m_serverRequests.take(requestID);
</span><span class="cx">
</span><span class="cx"> if (!serverRequest)
</span><span class="lines">@@ -170,11 +185,15 @@
</span><span class="cx"> ASSERT(!m_serverRequests.contains(requestID));
</span><span class="cx"> m_serverRequests.add(requestID, serverRequest.release());
</span><span class="cx">
</span><ins>+ LOG(IDB, "WebProcess commitTransaction ID %lli (request ID %llu)", transactionID, requestID);
+
</ins><span class="cx"> send(Messages::DatabaseProcessIDBConnection::CommitTransaction(requestID, transactionID));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebIDBServerConnection::didCommitTransaction(uint64_t requestID, bool success)
</span><span class="cx"> {
</span><ins>+ LOG(IDB, "WebProcess didCommitTransaction request ID %llu", requestID);
+
</ins><span class="cx"> RefPtr<AsyncRequest> serverRequest = m_serverRequests.take(requestID);
</span><span class="cx">
</span><span class="cx"> if (!serverRequest)
</span><span class="lines">@@ -191,11 +210,15 @@
</span><span class="cx"> ASSERT(!m_serverRequests.contains(requestID));
</span><span class="cx"> m_serverRequests.add(requestID, serverRequest.release());
</span><span class="cx">
</span><ins>+ LOG(IDB, "WebProcess resetTransaction ID %lli (request ID %llu)", transactionID, requestID);
+
</ins><span class="cx"> send(Messages::DatabaseProcessIDBConnection::ResetTransaction(requestID, transactionID));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebIDBServerConnection::didResetTransaction(uint64_t requestID, bool)
</span><span class="cx"> {
</span><ins>+ LOG(IDB, "WebProcess didResetTransaction request ID %llu", requestID);
+
</ins><span class="cx"> RefPtr<AsyncRequest> serverRequest = m_serverRequests.take(requestID);
</span><span class="cx">
</span><span class="cx"> if (!serverRequest)
</span><span class="lines">@@ -212,11 +235,15 @@
</span><span class="cx"> ASSERT(!m_serverRequests.contains(requestID));
</span><span class="cx"> m_serverRequests.add(requestID, serverRequest.release());
</span><span class="cx">
</span><ins>+ LOG(IDB, "WebProcess rollbackTransaction ID %lli (request ID %llu)", transactionID, requestID);
+
</ins><span class="cx"> send(Messages::DatabaseProcessIDBConnection::RollbackTransaction(requestID, transactionID));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebIDBServerConnection::didRollbackTransaction(uint64_t requestID, bool)
</span><span class="cx"> {
</span><ins>+ LOG(IDB, "WebProcess didRollbackTransaction request ID %llu", requestID);
+
</ins><span class="cx"> RefPtr<AsyncRequest> serverRequest = m_serverRequests.take(requestID);
</span><span class="cx">
</span><span class="cx"> if (!serverRequest)
</span></span></pre>
</div>
</div>
</body>
</html>