<!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 &quot;openTransaction&quot;
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&lt;int64_t&gt; 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  &lt;beidson@apple.com&gt;
+
+        DatabaseProcess: Pipe through object store IDs and transaction mode for &quot;openTransaction&quot;
+        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  &lt;barraclough@apple.com&gt;
</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-&gt;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&amp; directionString, ExceptionCode&amp; 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&amp; IDBCursor::directionToString(unsigned short direction)
</del><ins>+const AtomicString&amp; 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&amp; directionPrevUnique();
</span><span class="cx"> 
</span><span class="cx">     static IndexedDB::CursorDirection stringToDirection(const String&amp; modeString, ExceptionCode&amp;);
</span><del>-    static const AtomicString&amp; directionToString(unsigned short mode);
</del><ins>+    static const AtomicString&amp; directionToString(IndexedDB::CursorDirection mode);
</ins><span class="cx"> 
</span><span class="cx">     static PassRefPtr&lt;IDBCursor&gt; create(PassRefPtr&lt;IDBCursorBackend&gt;, 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&lt;IDBCallbacks&gt; prpCallbacks, ExceptionCode&amp;)
</span><span class="cx"> {
</span><span class="cx">     LOG(StorageAPI, &quot;IDBCursorBackend::delete&quot;);
</span><del>-    ASSERT(m_transaction-&gt;mode() != IndexedDB::TransactionReadOnly);
</del><ins>+    ASSERT(m_transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx">     RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::create(primaryKey());
</span><span class="cx">     m_transaction-&gt;database().deleteRange(m_transaction-&gt;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-&gt;mode() == IndexedDB::TransactionVersionChange);
</del><ins>+    ASSERT(transaction-&gt;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-&gt;mode() == IndexedDB::TransactionVersionChange);
</del><ins>+    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(m_metadata.objectStores.contains(objectStoreId));
</span><span class="cx">     const IDBObjectStoreMetadata&amp; 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-&gt;mode() == IndexedDB::TransactionVersionChange);
</del><ins>+    ASSERT(transaction-&gt;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-&gt;mode() == IndexedDB::TransactionVersionChange);
</del><ins>+    ASSERT(transaction-&gt;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-&gt;scheduleGetOperation(m_metadata, objectStoreId, indexId, keyRange, keyOnly ? IndexedDB::CursorKeyOnly : IndexedDB::CursorKeyAndValue, callbacks);
</del><ins>+    transaction-&gt;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&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt; key, PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; 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-&gt;mode() != IndexedDB::TransactionReadOnly);
</del><ins>+    ASSERT(transaction-&gt;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&lt;IDBTransactionBackend&gt; transaction = m_transactions.get(transactionID);
</span><span class="cx">     if (!transaction)
</span><span class="cx">         return;
</span><del>-    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionVersionChange);
</del><ins>+    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;IDBKey&gt; primaryKey = prpPrimaryKey;
</span><span class="cx">     m_serverConnection-&gt;setIndexKeys(transactionID, m_metadata.id, objectStoreID, m_metadata.objectStores.get(objectStoreID), *primaryKey, indexIDs, indexKeys, [transaction](PassRefPtr&lt;IDBDatabaseError&gt; 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-&gt;scheduleOpenCursorOperation(objectStoreId, indexId, keyRange, direction, keyOnly ? IndexedDB::CursorKeyOnly : IndexedDB::CursorKeyAndValue, taskType, callbacks);
</del><ins>+    transaction-&gt;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&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; 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-&gt;mode() != IndexedDB::TransactionReadOnly);
</del><ins>+    ASSERT(transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx"> 
</span><span class="cx">     transaction-&gt;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-&gt;mode() != IndexedDB::TransactionReadOnly);
</del><ins>+    ASSERT(transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx"> 
</span><span class="cx">     transaction-&gt;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-&gt;mode() == IndexedDB::TransactionVersionChange) {
</del><ins>+    if (transaction-&gt;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-&gt;id()));
</span><span class="cx">     ASSERT(m_transactions.get(transaction-&gt;id()) == transaction.get());
</span><span class="cx">     m_transactions.remove(transaction-&gt;id());
</span><del>-    if (transaction-&gt;mode() == IndexedDB::TransactionVersionChange) {
</del><ins>+    if (transaction-&gt;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&lt;IDBTransactionBackend&gt; transaction = rawTransaction;
</span><del>-    if (transaction-&gt;mode() == IndexedDB::TransactionVersionChange) {
</del><ins>+    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange) {
</ins><span class="cx">         // If this was an open-with-version call, there will be a &quot;second
</span><span class="cx">         // half&quot; 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&lt;IDBTransactionBackend&gt; transaction = rawTransaction;
</span><del>-    if (transaction-&gt;mode() == IndexedDB::TransactionVersionChange)
</del><ins>+    if (transaction-&gt;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&lt;IDBDatabaseCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, unsigned short mode)
</del><ins>+void IDBDatabaseBackend::createTransaction(int64_t transactionID, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, IndexedDB::TransactionMode mode)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;IDBTransactionBackend&gt; transaction = IDBTransactionBackend::create(this, transactionID, callbacks, objectStoreIDs, static_cast&lt;IndexedDB::TransactionMode&gt;(mode));
</del><ins>+    RefPtr&lt;IDBTransactionBackend&gt; 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)-&gt;onVersionChange(m_metadata.version, requestedVersion, IndexedDB::NullVersion);
</del><ins>+            (*it)-&gt;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&lt;int64_t&gt; objectStoreIds;
</span><del>-    createTransaction(transactionId, databaseCallbacks, objectStoreIds, IndexedDB::TransactionVersionChange);
</del><ins>+    createTransaction(transactionId, databaseCallbacks, objectStoreIds, IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx">     RefPtr&lt;IDBTransactionBackend&gt; transaction = m_transactions.get(transactionId);
</span><span class="cx"> 
</span><span class="cx">     transaction-&gt;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)-&gt;onVersionChange(m_metadata.version, 0, IndexedDB::NullVersion);
</del><ins>+            (*it)-&gt;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&amp; name, const IDBKeyPath&amp;, bool autoIncrement);
</span><span class="cx">     void deleteObjectStore(int64_t transactionId, int64_t objectStoreId);
</span><del>-    void createTransaction(int64_t transactionId, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; objectStoreIds, unsigned short mode);
</del><ins>+    void createTransaction(int64_t transactionId, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode);
</ins><span class="cx">     void close(PassRefPtr&lt;IDBDatabaseCallbacks&gt;);
</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&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext* context, const String&amp; name, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     LOG(StorageAPI, &quot;IDBFactory::open&quot;);
</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&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext* context, const String&amp; name, unsigned long long version, ExceptionCode&amp; 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&lt;IDBOpenDBRequest&gt; IDBFactory::openInternal(ScriptExecutionContext* context, const String&amp; name, uint64_t version, IndexedDB::VersionNullness versionNullness, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     HistogramSupport::histogramEnumeration(&quot;WebCore.IndexedDB.FrontEndAPICalls&quot;, IDBOpenCall, IDBMethodsMax);
</span><del>-    ASSERT(version &gt;= 1 || versionNullness == IndexedDB::NullVersion);
</del><ins>+    ASSERT(version &gt;= 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&lt;IDBOpenDBRequest&gt; request = IDBOpenDBRequest::create(context, 0, 0, 0, IndexedDB::NullVersion);
</del><ins>+    RefPtr&lt;IDBOpenDBRequest&gt; request = IDBOpenDBRequest::create(context, 0, 0, 0, IndexedDB::VersionNullness::Null);
</ins><span class="cx">     m_backend-&gt;deleteDatabase(name, request, context-&gt;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&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
</span><del>-    request-&gt;setCursorDetails(IndexedDB::CursorKeyAndValue, direction);
</del><ins>+    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyAndValue, direction);
</ins><span class="cx">     backendDB()-&gt;openCursor(m_transaction-&gt;id(), m_objectStore-&gt;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&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
</span><del>-    request-&gt;setCursorDetails(IndexedDB::CursorKeyOnly, direction);
</del><ins>+    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyOnly, direction);
</ins><span class="cx">     backendDB()-&gt;openCursor(m_transaction-&gt;id(), m_objectStore-&gt;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&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
</span><del>-    request-&gt;setCursorDetails(IndexedDB::CursorKeyAndValue, direction);
</del><ins>+    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyAndValue, direction);
</ins><span class="cx"> 
</span><span class="cx">     backendDB()-&gt;openCursor(m_transaction-&gt;id(), id(), IDBIndexMetadata::InvalidId, range, direction, false, static_cast&lt;IDBDatabaseBackend::TaskType&gt;(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&lt;IDBCursor&gt; 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&lt;IDBTransaction&gt; IDBTransaction::create(ScriptExecutionContext* context, int64_t id, IDBDatabase* db, IDBOpenDBRequest* openDBRequest, const IDBDatabaseMetadata&amp; previousMetadata)
</span><span class="cx"> {
</span><del>-    RefPtr&lt;IDBTransaction&gt; transaction(adoptRef(new IDBTransaction(context, id, Vector&lt;String&gt;(), IndexedDB::TransactionVersionChange, db, openDBRequest, previousMetadata)));
</del><ins>+    RefPtr&lt;IDBTransaction&gt; transaction(adoptRef(new IDBTransaction(context, id, Vector&lt;String&gt;(), IndexedDB::TransactionMode::VersionChange, db, openDBRequest, previousMetadata)));
</ins><span class="cx">     transaction-&gt;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&amp; 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&amp; 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&lt;void()&gt; completionCallback)
</span><span class="cx"> {
</span><span class="cx">     LOG(StorageAPI, &quot;PutOperation&quot;);
</span><del>-    ASSERT(m_transaction-&gt;mode() != IndexedDB::TransactionReadOnly);
</del><ins>+    ASSERT(m_transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
</ins><span class="cx">     ASSERT(m_indexIDs.size() == m_indexKeys.size());
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;PutOperation&gt; 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())-&gt;mode() != IndexedDB::TransactionVersionChange);
</del><ins>+    ASSERT(m_startedTransactions.isEmpty() || (*m_startedTransactions.begin())-&gt;mode() != IndexedDB::TransactionMode::VersionChange);
</ins><span class="cx"> 
</span><span class="cx">     ListHashSet&lt;IDBTransactionBackend*&gt;::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-&gt;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&lt;IDBTransactionBackend*&gt;::const_iterator it = m_startedTransactions.begin(); it != m_startedTransactions.end(); ++it) {
</span><del>-            if ((*it)-&gt;mode() == IndexedDB::TransactionReadWrite &amp;&amp; doScopesOverlap(transaction-&gt;scope(), (*it)-&gt;scope()))
</del><ins>+            if ((*it)-&gt;mode() == IndexedDB::TransactionMode::ReadWrite &amp;&amp; doScopesOverlap(transaction-&gt;scope(), (*it)-&gt;scope()))
</ins><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="cx">         for (ListHashSet&lt;IDBTransactionBackend*&gt;::const_iterator it = m_queuedTransactions.begin(); *it != transaction; ++it) {
</span><span class="cx">             ASSERT(it != m_queuedTransactions.end());
</span><del>-            if ((*it)-&gt;mode() == IndexedDB::TransactionReadWrite &amp;&amp; doScopesOverlap(transaction-&gt;scope(), (*it)-&gt;scope()))
</del><ins>+            if ((*it)-&gt;mode() == IndexedDB::TransactionMode::ReadWrite &amp;&amp; doScopesOverlap(transaction-&gt;scope(), (*it)-&gt;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&lt;IDBVersionChangeEvent&gt; create(unsigned long long oldVersion = 0, unsigned long long newVersion = 0, IndexedDB::VersionNullness newVersionNullness = IndexedDB::NullVersion, const AtomicString&amp; eventType = AtomicString())
</del><ins>+    static PassRefPtr&lt;IDBVersionChangeEvent&gt; create(unsigned long long oldVersion = 0, unsigned long long newVersion = 0, IndexedDB::VersionNullness newVersionNullness = IndexedDB::VersionNullness::Null, const AtomicString&amp; 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&amp; isNull) { isNull = (m_newVersionNullness == IndexedDB::NullVersion); return m_newVersion; }
</del><ins>+    virtual unsigned long long newVersion(bool&amp; 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 &amp;&amp; range-&gt;lower();
</span><span class="cx">     bool upperBound = range &amp;&amp; range-&gt;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 &amp;&amp; range-&gt;lower();
</span><span class="cx">     bool upperBound = range &amp;&amp; range-&gt;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-&gt;openObjectStoreCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+            backingStoreCursor = m_backingStore-&gt;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-&gt;openIndexKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+                backingStoreCursor = m_backingStore-&gt;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-&gt;openIndexCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+                backingStoreCursor = m_backingStore-&gt;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()-&gt;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&lt;IDBBackingStoreCursorLevelDB&gt; 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-&gt;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-&gt;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-&gt;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-&gt;openObjectStoreKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+        backingStoreCursor = m_backingStore-&gt;openObjectStoreKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorDirection::Next);
</ins><span class="cx">     else
</span><del>-        backingStoreCursor = m_backingStore-&gt;openIndexKeyCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.indexID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+        backingStoreCursor = m_backingStore-&gt;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()-&gt;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&lt;IDBBackingStoreCursorLevelDB&gt; backingStoreCursor = m_backingStore-&gt;openObjectStoreCursor(cursorID, *backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), operation.keyRange(), IndexedDB::CursorNext);
</del><ins>+    RefPtr&lt;IDBBackingStoreCursorLevelDB&gt; backingStoreCursor = m_backingStore-&gt;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-&gt;deleteRecord(*backingStoreTransaction, transaction.database().id(), operation.objectStoreID(), backingStoreCursor-&gt;recordIdentifier())) {
</span><span class="lines">@@ -657,10 +657,10 @@
</span><span class="cx">         foundPrimaryKeys.append(backingStoreCursor-&gt;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-&gt;value()-&gt;size();
</span><span class="cx">             foundValues.append(backingStoreCursor-&gt;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&lt;false, false, IndexedDB::TransactionMode&gt;::copy(const IndexedDB::TransactionMode&amp; mode)
+{
+    return mode;
+}
+
+IndexedDB::CursorDirection CrossThreadCopierBase&lt;false, false, IndexedDB::CursorDirection&gt;::copy(const IndexedDB::CursorDirection&amp; direction)
+{
+    return direction;
+}
+
+IndexedDB::CursorType CrossThreadCopierBase&lt;false, false, IndexedDB::CursorType&gt;::copy(const IndexedDB::CursorType&amp; type)
+{
+    return type;
+}
+
</ins><span class="cx"> CrossThreadCopierBase&lt;false, false, IDBDatabaseMetadata&gt;::Type CrossThreadCopierBase&lt;false, false, IDBDatabaseMetadata&gt;::copy(const IDBDatabaseMetadata&amp; 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&lt;&gt; struct CrossThreadCopierBase&lt;false, false, IndexedDB::TransactionMode&gt; {
+        static IndexedDB::TransactionMode copy(const IndexedDB::TransactionMode&amp;);
+    };
+    template&lt;&gt; struct CrossThreadCopierBase&lt;false, false, IndexedDB::CursorDirection&gt; {
+        static IndexedDB::CursorDirection copy(const IndexedDB::CursorDirection&amp;);
+    };
+    template&lt;&gt; struct CrossThreadCopierBase&lt;false, false, IndexedDB::CursorType&gt; {
+        static IndexedDB::CursorType copy(const IndexedDB::CursorType&amp;);
+    };
+
</ins><span class="cx">     struct IDBDatabaseMetadata;
</span><span class="cx">     template&lt;&gt; struct CrossThreadCopierBase&lt;false, false, IDBDatabaseMetadata&gt; {
</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  &lt;beidson@apple.com&gt;
+
+        DatabaseProcess: Pipe through object store IDs and transaction mode for &quot;openTransaction&quot;
+        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&lt;int64_t&gt; 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  &lt;barraclough@apple.com&gt;
</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 &quot;WebCoreArgumentCoders.h&quot;
</span><span class="cx"> #include &quot;WebIDBServerConnectionMessages.h&quot;
</span><span class="cx"> #include &lt;WebCore/IDBDatabaseMetadata.h&gt;
</span><ins>+#include &lt;WebCore/IndexedDB.h&gt;
</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&lt;int64_t&gt;&amp; objectStoreIDs, uint64_t intMode)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_uniqueIDBDatabase);
</span><span class="cx"> 
</span><ins>+    if (intMode &gt; IndexedDB::TransactionModeMaximum) {
+        send(Messages::WebIDBServerConnection::DidOpenTransaction(requestID, false));
+        return;
+    }
+
+    IndexedDB::TransactionMode mode = static_cast&lt;IndexedDB::TransactionMode&gt;(intMode);
</ins><span class="cx">     RefPtr&lt;DatabaseProcessIDBConnection&gt; connection(this);
</span><del>-    m_uniqueIDBDatabase-&gt;openTransaction(IDBTransactionIdentifier(*this, transactionID), [connection, requestID](bool success) {
</del><ins>+    m_uniqueIDBDatabase-&gt;openTransaction(IDBTransactionIdentifier(*this, transactionID), objectStoreIDs, mode, [connection, requestID](bool success) {
</ins><span class="cx">         connection-&gt;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&amp; databaseName, const SecurityOriginData&amp; openingOrigin, const SecurityOriginData&amp; 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&lt;int64_t&gt;&amp; 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&lt;int64_t&gt; 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&amp; identifier, std::function&lt;void(bool)&gt; successCallback)
</del><ins>+void UniqueIDBDatabase::openTransaction(const IDBTransactionIdentifier&amp; identifier, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, WebCore::IndexedDB::TransactionMode mode, std::function&lt;void(bool)&gt; successCallback)
</ins><span class="cx"> {
</span><del>-    postTransactionOperation(&amp;UniqueIDBDatabase::openBackingStoreTransaction, identifier, successCallback);
</del><ins>+    postTransactionOperation(identifier, createAsyncTask(*this, &amp;UniqueIDBDatabase::openBackingStoreTransaction, identifier, objectStoreIDs, mode), successCallback);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::beginTransaction(const IDBTransactionIdentifier&amp; identifier, std::function&lt;void(bool)&gt; successCallback)
</span><span class="cx"> {
</span><del>-    postTransactionOperation(&amp;UniqueIDBDatabase::beginBackingStoreTransaction, identifier, successCallback);
</del><ins>+    postTransactionOperation(identifier, createAsyncTask(*this, &amp;UniqueIDBDatabase::beginBackingStoreTransaction, identifier), successCallback);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::commitTransaction(const IDBTransactionIdentifier&amp; identifier, std::function&lt;void(bool)&gt; successCallback)
</span><span class="cx"> {
</span><del>-    postTransactionOperation(&amp;UniqueIDBDatabase::commitBackingStoreTransaction, identifier, successCallback);
</del><ins>+    postTransactionOperation(identifier, createAsyncTask(*this, &amp;UniqueIDBDatabase::commitBackingStoreTransaction, identifier), successCallback);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::resetTransaction(const IDBTransactionIdentifier&amp; identifier, std::function&lt;void(bool)&gt; successCallback)
</span><span class="cx"> {
</span><del>-    postTransactionOperation(&amp;UniqueIDBDatabase::resetBackingStoreTransaction, identifier, successCallback);
</del><ins>+    postTransactionOperation(identifier, createAsyncTask(*this, &amp;UniqueIDBDatabase::resetBackingStoreTransaction, identifier), successCallback);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::rollbackTransaction(const IDBTransactionIdentifier&amp; identifier, std::function&lt;void(bool)&gt; successCallback)
</span><span class="cx"> {
</span><del>-    postTransactionOperation(&amp;UniqueIDBDatabase::rollbackBackingStoreTransaction, identifier, successCallback);
</del><ins>+    postTransactionOperation(identifier, createAsyncTask(*this, &amp;UniqueIDBDatabase::rollbackBackingStoreTransaction, identifier), successCallback);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::postTransactionOperation(TransactionOperationFunction function, const IDBTransactionIdentifier&amp; identifier, std::function&lt;void(bool)&gt; successCallback)
</del><ins>+void UniqueIDBDatabase::postTransactionOperation(const IDBTransactionIdentifier&amp; identifier, std::unique_ptr&lt;AsyncTask&gt; task, std::function&lt;void(bool)&gt; 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&lt;AsyncRequest&gt; request = AsyncRequestImpl&lt;bool&gt;::create([successCallback](bool success) {
</span><span class="cx">         successCallback(success);
</span><span class="lines">@@ -258,12 +258,12 @@
</span><span class="cx">     request-&gt;completeRequest(success);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::openBackingStoreTransaction(const IDBTransactionIdentifier&amp; identifier)
</del><ins>+void UniqueIDBDatabase::openBackingStoreTransaction(const IDBTransactionIdentifier&amp; identifier, const Vector&lt;int64_t&gt;&amp; 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-&gt;establishTransaction(identifier);
</del><ins>+    bool success = m_backingStore-&gt;establishTransaction(identifier, objectStoreIDs, mode);
</ins><span class="cx"> 
</span><span class="cx">     postMainThreadTask(createAsyncTask(*this, &amp;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 &quot;IDBTransactionIdentifier.h&quot;
</span><span class="cx"> #include &quot;UniqueIDBDatabaseIdentifier.h&quot;
</span><ins>+#include &lt;WebCore/IndexedDB.h&gt;
</ins><span class="cx"> #include &lt;functional&gt;
</span><span class="cx"> #include &lt;wtf/Deque.h&gt;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="lines">@@ -66,7 +67,7 @@
</span><span class="cx"> 
</span><span class="cx">     void getOrEstablishIDBDatabaseMetadata(std::function&lt;void(bool, const WebCore::IDBDatabaseMetadata&amp;)&gt; completionCallback);
</span><span class="cx"> 
</span><del>-    void openTransaction(const IDBTransactionIdentifier&amp;, std::function&lt;void(bool)&gt; successCallback);
</del><ins>+    void openTransaction(const IDBTransactionIdentifier&amp;, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, WebCore::IndexedDB::TransactionMode, std::function&lt;void(bool)&gt; successCallback);
</ins><span class="cx">     void beginTransaction(const IDBTransactionIdentifier&amp;, std::function&lt;void(bool)&gt; successCallback);
</span><span class="cx">     void commitTransaction(const IDBTransactionIdentifier&amp;, std::function&lt;void(bool)&gt; successCallback);
</span><span class="cx">     void resetTransaction(const IDBTransactionIdentifier&amp;, std::function&lt;void(bool)&gt; 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&amp;, const SecurityOriginData&amp;) const;
</span><span class="cx"> 
</span><del>-    typedef void (UniqueIDBDatabase::*TransactionOperationFunction)(const IDBTransactionIdentifier&amp;);
-    void postTransactionOperation(TransactionOperationFunction, const IDBTransactionIdentifier&amp;, std::function&lt;void(bool)&gt; successCallback);
</del><ins>+    void postTransactionOperation(const IDBTransactionIdentifier&amp;, std::unique_ptr&lt;AsyncTask&gt;, std::function&lt;void(bool)&gt; 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&lt;AsyncTask&gt;);
</span><span class="cx">     void openBackingStoreAndReadMetadata(const UniqueIDBDatabaseIdentifier&amp;, const String&amp; databaseDirectory);
</span><del>-    void openBackingStoreTransaction(const IDBTransactionIdentifier&amp;);
</del><ins>+    void openBackingStoreTransaction(const IDBTransactionIdentifier&amp;, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, WebCore::IndexedDB::TransactionMode);
</ins><span class="cx">     void beginBackingStoreTransaction(const IDBTransactionIdentifier&amp;);
</span><span class="cx">     void commitBackingStoreTransaction(const IDBTransactionIdentifier&amp;);
</span><span class="cx">     void resetBackingStoreTransaction(const IDBTransactionIdentifier&amp;);
</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) &amp;&amp; ENABLE(DATABASE_PROCESS)
</span><span class="cx"> 
</span><ins>+#include &lt;WebCore/IndexedDB.h&gt;
</ins><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</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&lt;WebCore::IDBDatabaseMetadata&gt; getOrEstablishMetadata() = 0;
</span><span class="cx"> 
</span><del>-    virtual bool establishTransaction(const IDBTransactionIdentifier&amp;) = 0;
</del><ins>+    virtual bool establishTransaction(const IDBTransactionIdentifier&amp;, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, WebCore::IndexedDB::TransactionMode) = 0;
</ins><span class="cx">     virtual bool beginTransaction(const IDBTransactionIdentifier&amp;) = 0;
</span><span class="cx">     virtual bool commitTransaction(const IDBTransactionIdentifier&amp;) = 0;
</span><span class="cx">     virtual bool resetTransaction(const IDBTransactionIdentifier&amp;) = 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&amp; identifier)
</del><ins>+bool UniqueIDBDatabaseBackingStoreSQLite::establishTransaction(const IDBTransactionIdentifier&amp; identifier, const Vector&lt;int64_t&gt;&amp;, 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(&quot;Attempt to establish transaction identifier that already exists&quot;);
</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&lt;WebCore::IDBDatabaseMetadata&gt; getOrEstablishMetadata() OVERRIDE;
</span><span class="cx"> 
</span><del>-    virtual bool establishTransaction(const IDBTransactionIdentifier&amp;) OVERRIDE;
</del><ins>+    virtual bool establishTransaction(const IDBTransactionIdentifier&amp;, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, WebCore::IndexedDB::TransactionMode) OVERRIDE;
</ins><span class="cx">     virtual bool beginTransaction(const IDBTransactionIdentifier&amp;) OVERRIDE;
</span><span class="cx">     virtual bool commitTransaction(const IDBTransactionIdentifier&amp;) OVERRIDE;
</span><span class="cx">     virtual bool resetTransaction(const IDBTransactionIdentifier&amp;) 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&lt;typename T, typename P1, typename MP1, typename P2, typename MP2, typename P3, typename MP3&gt;
+std::unique_ptr&lt;AsyncTask&gt; createAsyncTask(
+    T&amp; callee,
+    void (T::*method)(MP1, MP2, MP3),
+    const P1&amp; parameter1,
+    const P2&amp; parameter2,
+    const P3&amp; parameter3)
+{
+    return std::make_unique&lt;AsyncTaskImpl&lt;T, MP1, MP2, MP3&gt;&gt;(
+        &amp;callee,
+        method,
+        WebCore::CrossThreadCopier&lt;P1&gt;::copy(parameter1),
+        WebCore::CrossThreadCopier&lt;P2&gt;::copy(parameter2),
+        WebCore::CrossThreadCopier&lt;P3&gt;::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&lt;int64_t&gt; CrossThreadCopierBase&lt;false, false, Vector&lt;int64_t&gt;&gt;::copy(const Vector&lt;int64_t&gt;&amp; vector)
+{
+    Vector&lt;int64_t&gt; 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 &lt;WebCore/CrossThreadCopier.h&gt;
</span><ins>+#include &lt;wtf/Vector.h&gt;
</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&amp;);
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+template&lt;&gt; struct CrossThreadCopierBase&lt;false, false, Vector&lt;int64_t&gt;&gt; {
+    static Vector&lt;int64_t&gt; copy(const Vector&lt;int64_t&gt;&amp;);
+};
+
</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 &quot;AsyncRequest.h&quot;
</span><span class="cx"> #include &quot;DatabaseProcessIDBConnectionMessages.h&quot;
</span><span class="cx"> #include &quot;DatabaseToWebProcessConnectionMessages.h&quot;
</span><ins>+#include &quot;Logging.h&quot;
</ins><span class="cx"> #include &quot;SecurityOriginData.h&quot;
</span><span class="cx"> #include &quot;WebProcess.h&quot;
</span><span class="cx"> #include &quot;WebToDatabaseProcessConnection.h&quot;
</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, &quot;WebProcess getOrEstablishIDBDatabaseMetadata request ID %llu&quot;, 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&amp; metadata)
</span><span class="cx"> {
</span><ins>+    LOG(IDB, &quot;WebProcess didGetOrEstablishIDBDatabaseMetadata request ID %llu&quot;, requestID);
+
</ins><span class="cx">     RefPtr&lt;AsyncRequest&gt; 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&lt;int64_t&gt;&amp;, IndexedDB::TransactionMode mode, BoolCallbackFunction successCallback)
</del><ins>+void WebIDBServerConnection::openTransaction(int64_t transactionID, const HashSet&lt;int64_t&gt;&amp; objectStoreIDs, IndexedDB::TransactionMode mode, BoolCallbackFunction successCallback)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;AsyncRequest&gt; serverRequest = AsyncRequestImpl&lt;bool&gt;::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, &quot;WebProcess openTransaction ID %lli (request ID %llu)&quot;, transactionID, requestID);
+
+    Vector&lt;int64_t&gt; objectStoreIDVector;
+    copyToVector(objectStoreIDs, objectStoreIDVector);
+    send(Messages::DatabaseProcessIDBConnection::OpenTransaction(requestID, transactionID, objectStoreIDVector, static_cast&lt;uint64_t&gt;(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, &quot;WebProcess didOpenTransaction request ID %llu&quot;, requestID);
+
</ins><span class="cx">     RefPtr&lt;AsyncRequest&gt; 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, &quot;WebProcess beginTransaction ID %lli (request ID %llu)&quot;, 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, &quot;WebProcess didBeginTransaction request ID %llu&quot;, requestID);
+
</ins><span class="cx">     RefPtr&lt;AsyncRequest&gt; 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, &quot;WebProcess commitTransaction ID %lli (request ID %llu)&quot;, 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, &quot;WebProcess didCommitTransaction request ID %llu&quot;, requestID);
+
</ins><span class="cx">     RefPtr&lt;AsyncRequest&gt; 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, &quot;WebProcess resetTransaction ID %lli (request ID %llu)&quot;, 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, &quot;WebProcess didResetTransaction request ID %llu&quot;, requestID);
+
</ins><span class="cx">     RefPtr&lt;AsyncRequest&gt; 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, &quot;WebProcess rollbackTransaction ID %lli (request ID %llu)&quot;, 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, &quot;WebProcess didRollbackTransaction request ID %llu&quot;, requestID);
+
</ins><span class="cx">     RefPtr&lt;AsyncRequest&gt; serverRequest = m_serverRequests.take(requestID);
</span><span class="cx"> 
</span><span class="cx">     if (!serverRequest)
</span></span></pre>
</div>
</div>

</body>
</html>