<!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>[163612] 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/163612">163612</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2014-02-06 22:37:48 -0800 (Thu, 06 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>IDB: Remove the entirely unnecessary &quot;Value Key&quot; concept
https://bugs.webkit.org/show_bug.cgi?id=128360

Reviewed by Dan Bernstein.

Source/WebCore:

No new tests (No change in behavior)

All cursor operations were set up to pass a value key parameter around, but it was:
1 - Entirely unused
2 - The same thing that the primary key is supposed to be

* Modules/indexeddb/IDBCallbacks.h:

* Modules/indexeddb/IDBCursorBackend.cpp:
(WebCore::IDBCursorBackend::updateCursorData):
(WebCore::IDBCursorBackend::clear):
* Modules/indexeddb/IDBCursorBackend.h:

* Modules/indexeddb/IDBCursorBackendOperations.cpp:
(WebCore::CursorAdvanceOperation::perform):
(WebCore::CursorIterationOperation::perform):

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess):
* Modules/indexeddb/IDBRequest.h:

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::OpenCursorOperation::perform):

* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::openCursor):
(WebCore::IDBServerConnectionLevelDB::cursorAdvance):
(WebCore::IDBServerConnectionLevelDB::cursorIterate):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

Source/WebKit2:

All cursor operations were set up to pass a value key parameter around, but it was:
1 - Entirely unused
2 - The same thing that the primary key is supposed to be

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::openCursor):
(WebKit::DatabaseProcessIDBConnection::cursorAdvance):
(WebKit::DatabaseProcessIDBConnection::cursorIterate):

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance):
(WebKit::UniqueIDBDatabase::cursorIterate):
(WebKit::UniqueIDBDatabase::openCursorInBackingStore):
(WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
(WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
(WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore):
(WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
(WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::advanceOnce): Clean this logic up to not need temporaries,
  and also to save the correct primary key (previously the 'value key')
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didOpenCursor):
(WebKit::WebIDBServerConnection::didAdvanceCursor):
(WebKit::WebIDBServerConnection::didIterateCursor):
(WebKit::WebIDBServerConnection::openCursor):
(WebKit::WebIDBServerConnection::cursorAdvance):
(WebKit::WebIDBServerConnection::cursorIterate):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCallbacksh">trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.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="#trunkSourceWebCoreModulesindexeddbIDBCursorBackendOperationscpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequesth">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBServerConnectionh">trunk/Source/WebCore/Modules/indexeddb/IDBServerConnection.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationscpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbleveldbIDBServerConnectionLevelDBcpp">trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbleveldbIDBServerConnectionLevelDBh">trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.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="#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="#trunkSourceWebKit2DatabaseProcessIndexedDBsqliteSQLiteIDBCursorcpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBsqliteSQLiteIDBCursorh">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.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="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectioncpp">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectionh">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectionmessagesin">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/ChangeLog        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2014-02-06  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IDB: Remove the entirely unnecessary &quot;Value Key&quot; concept
+        https://bugs.webkit.org/show_bug.cgi?id=128360
+
+        Reviewed by Dan Bernstein.
+
+        No new tests (No change in behavior)
+
+        All cursor operations were set up to pass a value key parameter around, but it was:
+        1 - Entirely unused
+        2 - The same thing that the primary key is supposed to be
+
+        * Modules/indexeddb/IDBCallbacks.h:
+
+        * Modules/indexeddb/IDBCursorBackend.cpp:
+        (WebCore::IDBCursorBackend::updateCursorData):
+        (WebCore::IDBCursorBackend::clear):
+        * Modules/indexeddb/IDBCursorBackend.h:
+
+        * Modules/indexeddb/IDBCursorBackendOperations.cpp:
+        (WebCore::CursorAdvanceOperation::perform):
+        (WebCore::CursorIterationOperation::perform):
+
+        * Modules/indexeddb/IDBRequest.cpp:
+        (WebCore::IDBRequest::onSuccess):
+        * Modules/indexeddb/IDBRequest.h:
+
+        * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
+        (WebCore::OpenCursorOperation::perform):
+
+        * Modules/indexeddb/IDBServerConnection.h:
+        * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
+        (WebCore::IDBServerConnectionLevelDB::openCursor):
+        (WebCore::IDBServerConnectionLevelDB::cursorAdvance):
+        (WebCore::IDBServerConnectionLevelDB::cursorIterate):
+        * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
+
</ins><span class="cx"> 2014-02-06  Jeremy Jones  &lt;jeremyj@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for AVKit fullscreen to WebKit2
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCallbacksh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -67,7 +67,6 @@
</span><span class="cx"> 
</span><span class="cx">     // From IDBCursor.advance()/continue()
</span><span class="cx">     virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt;) = 0;
</span><del>-    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt; valueKey) = 0;
</del><span class="cx"> 
</span><span class="cx">     // From IDBCursor.advance()/continue()
</span><span class="cx">     virtual void onSuccessWithPrefetch(const Vector&lt;RefPtr&lt;IDBKey&gt;&gt;&amp; keys, const Vector&lt;RefPtr&lt;IDBKey&gt;&gt;&amp; primaryKeys, const Vector&lt;RefPtr&lt;SharedBuffer&gt;&gt;&amp; values) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -89,12 +89,11 @@
</span><span class="cx">     m_savedCursorID = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBCursorBackend::updateCursorData(IDBKey* key, IDBKey* primaryKey, SharedBuffer* valueBuffer, IDBKey* valueKey)
</del><ins>+void IDBCursorBackend::updateCursorData(IDBKey* key, IDBKey* primaryKey, SharedBuffer* valueBuffer)
</ins><span class="cx"> {
</span><span class="cx">     m_currentKey = key;
</span><span class="cx">     m_currentPrimaryKey = primaryKey;
</span><span class="cx">     m_currentValueBuffer = valueBuffer;
</span><del>-    m_currentValueKey = valueKey;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBCursorBackend::clear()
</span><span class="lines">@@ -103,7 +102,6 @@
</span><span class="cx">     m_currentKey = nullptr;
</span><span class="cx">     m_currentPrimaryKey = nullptr;
</span><span class="cx">     m_currentValueBuffer = nullptr;
</span><del>-    m_currentValueKey = nullptr;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -60,8 +60,7 @@
</span><span class="cx">     IDBKey* key() const { return m_currentKey.get(); }
</span><span class="cx">     IDBKey* primaryKey() const { return m_currentPrimaryKey.get(); }
</span><span class="cx">     SharedBuffer* valueBuffer() const { return (m_cursorType == IndexedDB::CursorType::KeyOnly) ? nullptr : m_currentValueBuffer.get(); }
</span><del>-    IDBKey* valueKey() const { return (m_cursorType == IndexedDB::CursorType::KeyOnly) ? nullptr : m_currentValueKey.get(); }
-    void updateCursorData(IDBKey*, IDBKey* primaryKey, SharedBuffer* valueBuffer, IDBKey* valueKey);
</del><ins>+    void updateCursorData(IDBKey*, IDBKey* primaryKey, SharedBuffer* valueBuffer);
</ins><span class="cx"> 
</span><span class="cx">     void close();
</span><span class="cx"> 
</span><span class="lines">@@ -88,7 +87,6 @@
</span><span class="cx">     RefPtr&lt;IDBKey&gt; m_currentKey;
</span><span class="cx">     RefPtr&lt;IDBKey&gt; m_currentPrimaryKey;
</span><span class="cx">     RefPtr&lt;SharedBuffer&gt; m_currentValueBuffer;
</span><del>-    RefPtr&lt;IDBKey&gt; m_currentValueKey;
</del><span class="cx"> 
</span><span class="cx">     bool m_closed;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -40,15 +40,15 @@
</span><span class="cx">     LOG(StorageAPI, &quot;CursorAdvanceOperation&quot;);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CursorAdvanceOperation&gt; operation(this);
</span><del>-    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBKey&gt; valueKey, PassRefPtr&lt;IDBDatabaseError&gt; error) {
</del><ins>+    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt; error) {
</ins><span class="cx">         if (error) {
</span><span class="cx">             m_cursor-&gt;clear();
</span><span class="cx">             // FIXME: The LevelDB backend calls onSuccess even on failure.
</span><span class="cx">             // This will probably have to change soon (for sanity) and will probably break LevelDB
</span><span class="cx">             m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(0));
</span><span class="cx">         } else {
</span><del>-            m_cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get(), valueKey.get());
-            m_callbacks-&gt;onSuccess(key, primaryKey, valueBuffer, valueKey);
</del><ins>+            m_cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
+            m_callbacks-&gt;onSuccess(key, primaryKey, valueBuffer);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // FIXME: Cursor operations should be able to pass along an error instead of success
</span><span class="lines">@@ -63,15 +63,15 @@
</span><span class="cx">     LOG(StorageAPI, &quot;CursorIterationOperation&quot;);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CursorIterationOperation&gt; operation(this);
</span><del>-    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBKey&gt; valueKey, PassRefPtr&lt;IDBDatabaseError&gt; error) {
</del><ins>+    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt; error) {
</ins><span class="cx">         if (error) {
</span><span class="cx">             m_cursor-&gt;clear();
</span><span class="cx">             // FIXME: The LevelDB backend calls onSuccess even on failure.
</span><span class="cx">             // This will probably have to change soon (for sanity) and will probably break LevelDB
</span><span class="cx">             m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(0));
</span><span class="cx">         } else {
</span><del>-            m_cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get(), valueKey.get());
-            m_callbacks-&gt;onSuccess(key, primaryKey, valueBuffer, valueKey);
</del><ins>+            m_cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
+            m_callbacks-&gt;onSuccess(key, primaryKey, valueBuffer);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // FIXME: Cursor operations should be able to pass along an error instead of success
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -407,12 +407,7 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBRequest::onSuccess(PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; buffer)
</span><span class="cx"> {
</span><del>-    onSuccess(key, primaryKey, buffer, nullptr);
-}
-
-void IDBRequest::onSuccess(PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; buffer, PassRefPtr&lt;IDBKey&gt;)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess(key, primaryKey, valueBuffer, valueKey)&quot;);
</del><ins>+    LOG(StorageAPI, &quot;IDBRequest::onSuccess(key, primaryKey, valueBuffer)&quot;);
</ins><span class="cx">     if (!shouldEnqueueEvent())
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -93,7 +93,6 @@
</span><span class="cx">     virtual void onSuccess(int64_t);
</span><span class="cx">     virtual void onSuccess();
</span><span class="cx">     virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt;);
</span><del>-    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt; valueKey);
</del><span class="cx">     virtual void onSuccessWithPrefetch(const Vector&lt;RefPtr&lt;IDBKey&gt;&gt;&amp;, const Vector&lt;RefPtr&lt;IDBKey&gt;&gt;&amp;, const Vector&lt;RefPtr&lt;SharedBuffer&gt;&gt;&amp;) { ASSERT_NOT_REACHED(); } // Not implemented. Callback should not reach the renderer side.
</span><span class="cx"> 
</span><span class="cx">     // ActiveDOMObject
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBServerConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBServerConnection.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBServerConnection.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBServerConnection.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     virtual void deleteIndex(IDBTransactionBackend&amp;, const DeleteIndexOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</span><span class="cx">     virtual void get(IDBTransactionBackend&amp;, const GetOperation&amp;, std::function&lt;void(const IDBGetResult&amp;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</span><span class="cx">     virtual void put(IDBTransactionBackend&amp;, const PutOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</span><del>-    virtual void openCursor(IDBTransactionBackend&amp;, const OpenCursorOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</del><ins>+    virtual void openCursor(IDBTransactionBackend&amp;, const OpenCursorOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</ins><span class="cx">     virtual void count(IDBTransactionBackend&amp;, const CountOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</span><span class="cx">     virtual void deleteRange(IDBTransactionBackend&amp;, const DeleteRangeOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</span><span class="cx">     virtual void clearObjectStore(IDBTransactionBackend&amp;, const ClearObjectStoreOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</span><span class="lines">@@ -87,8 +87,8 @@
</span><span class="cx">     virtual void changeDatabaseVersion(IDBTransactionBackend&amp;, const IDBDatabaseBackend::VersionChangeOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</span><span class="cx"> 
</span><span class="cx">     // Cursor-level operations
</span><del>-    virtual void cursorAdvance(IDBCursorBackend&amp;, const CursorAdvanceOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
-    virtual void cursorIterate(IDBCursorBackend&amp;, const CursorIterationOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</del><ins>+    virtual void cursorAdvance(IDBCursorBackend&amp;, const CursorAdvanceOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
+    virtual void cursorIterate(IDBCursorBackend&amp;, const CursorIterationOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -151,15 +151,15 @@
</span><span class="cx">     LOG(StorageAPI, &quot;OpenCursorOperation&quot;);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;OpenCursorOperation&gt; operation(this);
</span><del>-    auto callback = [this, operation, completionCallback](int64_t cursorID, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBKey&gt; valueKey, PassRefPtr&lt;IDBDatabaseError&gt;) {
</del><ins>+    auto callback = [this, operation, completionCallback](int64_t cursorID, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt;) {
</ins><span class="cx">         // FIXME: When the LevelDB port fails to open a backing store cursor it calls onSuccess(nullptr);
</span><span class="cx">         // This seems nonsensical and might have to change soon, breaking them.
</span><span class="cx">         if (!cursorID)
</span><span class="cx">             m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(0));
</span><span class="cx">         else {
</span><span class="cx">             RefPtr&lt;IDBCursorBackend&gt; cursor = IDBCursorBackend::create(cursorID, m_cursorType, m_taskType, *m_transaction, m_objectStoreID);
</span><del>-            if (key || primaryKey || valueBuffer || valueKey)
-                cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get(), valueKey.get());
</del><ins>+            if (key || primaryKey || valueBuffer)
+                cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
</ins><span class="cx"> 
</span><span class="cx">             m_callbacks-&gt;onSuccess(cursor.release());
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbleveldbIDBServerConnectionLevelDBcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -429,7 +429,7 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBServerConnectionLevelDB::openCursor(IDBTransactionBackend&amp; transaction, const OpenCursorOperation&amp; operation, std::function&lt;void(int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</del><ins>+void IDBServerConnectionLevelDB::openCursor(IDBTransactionBackend&amp; transaction, const OpenCursorOperation&amp; operation, std::function&lt;void(int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</ins><span class="cx"> {
</span><span class="cx">     IDBBackingStoreTransactionLevelDB* backingStoreTransaction = m_backingStoreTransactions.get(transaction.id());
</span><span class="cx">     ASSERT(backingStoreTransaction);
</span><span class="lines">@@ -462,7 +462,7 @@
</span><span class="cx"> 
</span><span class="cx">     callOnMainThread([completionCallback, cursorID]() {
</span><span class="cx">         // FIXME: Need to actually pass the initial key, primaryKey, and value to the callback.
</span><del>-        completionCallback(cursorID, nullptr, nullptr, nullptr, nullptr, nullptr);
</del><ins>+        completionCallback(cursorID, nullptr, nullptr, nullptr, nullptr);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -569,7 +569,7 @@
</span><span class="cx">     ASYNC_COMPLETION_CALLBACK_WITH_NULL_ARG(completionCallback);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBServerConnectionLevelDB::cursorAdvance(IDBCursorBackend&amp; cursor, const CursorAdvanceOperation&amp; operation, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</del><ins>+void IDBServerConnectionLevelDB::cursorAdvance(IDBCursorBackend&amp; cursor, const CursorAdvanceOperation&amp; operation, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</ins><span class="cx"> {
</span><span class="cx">     IDBBackingStoreCursorLevelDB* backingStoreCursor = cursor.id() ? m_backingStoreCursors.get(cursor.id()) : 0;
</span><span class="cx"> #ifndef NDEBUG
</span><span class="lines">@@ -581,7 +581,7 @@
</span><span class="cx">         m_backingStoreCursors.remove(cursor.id());
</span><span class="cx"> 
</span><span class="cx">         callOnMainThread([completionCallback]() {
</span><del>-            completionCallback(nullptr, nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error advancing cursor&quot;));
</del><ins>+            completionCallback(nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error advancing cursor&quot;));
</ins><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         return;
</span><span class="lines">@@ -591,11 +591,11 @@
</span><span class="cx">     RefPtr&lt;SharedBuffer&gt; value = backingStoreCursor-&gt;value();
</span><span class="cx"> 
</span><span class="cx">     callOnMainThread([completionCallback, key, primaryKey, value]() {
</span><del>-        completionCallback(key, primaryKey, value, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error advancing cursor&quot;));
</del><ins>+        completionCallback(key, primaryKey, value, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error advancing cursor&quot;));
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBServerConnectionLevelDB::cursorIterate(IDBCursorBackend&amp; cursor, const CursorIterationOperation&amp; operation, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</del><ins>+void IDBServerConnectionLevelDB::cursorIterate(IDBCursorBackend&amp; cursor, const CursorIterationOperation&amp; operation, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</ins><span class="cx"> {
</span><span class="cx">     IDBBackingStoreCursorLevelDB* backingStoreCursor = cursor.id() ? m_backingStoreCursors.get(cursor.id()) : 0;
</span><span class="cx"> #ifndef NDEBUG
</span><span class="lines">@@ -607,7 +607,7 @@
</span><span class="cx">         m_backingStoreCursors.remove(cursor.id());
</span><span class="cx"> 
</span><span class="cx">         callOnMainThread([completionCallback]() {
</span><del>-            completionCallback(nullptr, nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error advancing cursor&quot;));
</del><ins>+            completionCallback(nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error advancing cursor&quot;));
</ins><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         return;
</span><span class="lines">@@ -617,7 +617,7 @@
</span><span class="cx">     RefPtr&lt;SharedBuffer&gt; value = backingStoreCursor-&gt;value();
</span><span class="cx"> 
</span><span class="cx">     callOnMainThread([completionCallback, key, primaryKey, value]() {
</span><del>-        completionCallback(key, primaryKey, value, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error advancing cursor&quot;));
</del><ins>+        completionCallback(key, primaryKey, value, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error advancing cursor&quot;));
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbleveldbIDBServerConnectionLevelDBh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">     virtual void deleteIndex(IDBTransactionBackend&amp;, const DeleteIndexOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx">     virtual void get(IDBTransactionBackend&amp;, const GetOperation&amp;, std::function&lt;void(const IDBGetResult&amp;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx">     virtual void put(IDBTransactionBackend&amp;, const PutOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)  override;
</span><del>-    virtual void openCursor(IDBTransactionBackend&amp;, const OpenCursorOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</del><ins>+    virtual void openCursor(IDBTransactionBackend&amp;, const OpenCursorOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</ins><span class="cx">     virtual void count(IDBTransactionBackend&amp;, const CountOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx">     virtual void deleteRange(IDBTransactionBackend&amp;, const DeleteRangeOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx">     virtual void clearObjectStore(IDBTransactionBackend&amp;, const ClearObjectStoreOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="lines">@@ -74,8 +74,8 @@
</span><span class="cx">     virtual void changeDatabaseVersion(IDBTransactionBackend&amp;, const IDBDatabaseBackend::VersionChangeOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx"> 
</span><span class="cx">     // Cursor-level operations
</span><del>-    virtual void cursorAdvance(IDBCursorBackend&amp;, const CursorAdvanceOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
-    virtual void cursorIterate(IDBCursorBackend&amp;, const CursorIterationOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</del><ins>+    virtual void cursorAdvance(IDBCursorBackend&amp;, const CursorAdvanceOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
+    virtual void cursorIterate(IDBCursorBackend&amp;, const CursorIterationOperation&amp;, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     IDBServerConnectionLevelDB(const String&amp; databaseName, IDBBackingStoreLevelDB*);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2014-02-06  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IDB: Remove the entirely unnecessary &quot;Value Key&quot; concept
+        https://bugs.webkit.org/show_bug.cgi?id=128360
+
+        Reviewed by Dan Bernstein.
+
+        All cursor operations were set up to pass a value key parameter around, but it was:
+        1 - Entirely unused
+        2 - The same thing that the primary key is supposed to be
+
+        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
+        (WebKit::DatabaseProcessIDBConnection::openCursor):
+        (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
+        (WebKit::DatabaseProcessIDBConnection::cursorIterate):
+
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
+        (WebKit::UniqueIDBDatabase::openCursor):
+        (WebKit::UniqueIDBDatabase::cursorAdvance):
+        (WebKit::UniqueIDBDatabase::cursorIterate):
+        (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
+        (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
+        (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
+        (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore):
+        (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
+        (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore):
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
+
+        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
+        (WebKit::SQLiteIDBCursor::advanceOnce): Clean this logic up to not need temporaries,
+          and also to save the correct primary key (previously the 'value key')
+        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
+
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
+        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
+        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):
+        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
+        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
+        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor):
+        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
+
+        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
+        (WebKit::WebIDBServerConnection::didOpenCursor):
+        (WebKit::WebIDBServerConnection::didAdvanceCursor):
+        (WebKit::WebIDBServerConnection::didIterateCursor):
+        (WebKit::WebIDBServerConnection::openCursor):
+        (WebKit::WebIDBServerConnection::cursorAdvance):
+        (WebKit::WebIDBServerConnection::cursorIterate):
+        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
+        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
+
</ins><span class="cx"> 2014-02-06  Ryuan Choi  &lt;ryuan.choi@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed build fix on GTK build since r163597
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -296,9 +296,9 @@
</span><span class="cx"> 
</span><span class="cx">     LOG(IDB, &quot;DatabaseProcess openCursor request ID %llu, object store id %lli&quot;, requestID, objectStoreID);
</span><span class="cx">     RefPtr&lt;DatabaseProcessIDBConnection&gt; connection(this);
</span><del>-    m_uniqueIDBDatabase-&gt;openCursor(IDBIdentifier(*this, transactionID), objectStoreID, indexID, static_cast&lt;IndexedDB::CursorDirection&gt;(cursorDirection), static_cast&lt;IndexedDB::CursorType&gt;(cursorType), static_cast&lt;IDBDatabaseBackend::TaskType&gt;(taskType), keyRangeData, [connection, requestID](int64_t cursorID, const IDBKeyData&amp; resultKey, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage) {
</del><ins>+    m_uniqueIDBDatabase-&gt;openCursor(IDBIdentifier(*this, transactionID), objectStoreID, indexID, static_cast&lt;IndexedDB::CursorDirection&gt;(cursorDirection), static_cast&lt;IndexedDB::CursorType&gt;(cursorType), static_cast&lt;IDBDatabaseBackend::TaskType&gt;(taskType), keyRangeData, [connection, requestID](int64_t cursorID, const IDBKeyData&amp; resultKey, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, uint32_t errorCode, const String&amp; errorMessage) {
</ins><span class="cx">         IPC::DataReference data = value ? IPC::DataReference(reinterpret_cast&lt;const uint8_t*&gt;(value-&gt;data()), value-&gt;size()) : IPC::DataReference();
</span><del>-        connection-&gt;send(Messages::WebIDBServerConnection::DidOpenCursor(requestID, cursorID, resultKey, primaryKey, data, valueKey, errorCode, errorMessage));
</del><ins>+        connection-&gt;send(Messages::WebIDBServerConnection::DidOpenCursor(requestID, cursorID, resultKey, primaryKey, data, errorCode, errorMessage));
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -308,9 +308,9 @@
</span><span class="cx"> 
</span><span class="cx">     LOG(IDB, &quot;DatabaseProcess cursorAdvance request ID %llu, cursor id %lli&quot;, requestID, cursorID);
</span><span class="cx">     RefPtr&lt;DatabaseProcessIDBConnection&gt; connection(this);
</span><del>-    m_uniqueIDBDatabase-&gt;cursorAdvance(IDBIdentifier(*this, cursorID), count, [connection, requestID](const IDBKeyData&amp; resultKey, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage) {
</del><ins>+    m_uniqueIDBDatabase-&gt;cursorAdvance(IDBIdentifier(*this, cursorID), count, [connection, requestID](const IDBKeyData&amp; resultKey, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, uint32_t errorCode, const String&amp; errorMessage) {
</ins><span class="cx">         IPC::DataReference data = value ? IPC::DataReference(reinterpret_cast&lt;const uint8_t*&gt;(value-&gt;data()), value-&gt;size()) : IPC::DataReference();
</span><del>-        connection-&gt;send(Messages::WebIDBServerConnection::DidAdvanceCursor(requestID, resultKey, primaryKey, data, valueKey, errorCode, errorMessage));
</del><ins>+        connection-&gt;send(Messages::WebIDBServerConnection::DidAdvanceCursor(requestID, resultKey, primaryKey, data, errorCode, errorMessage));
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -320,9 +320,9 @@
</span><span class="cx"> 
</span><span class="cx">     LOG(IDB, &quot;DatabaseProcess cursorIterate request ID %llu, cursor id %lli&quot;, requestID, cursorID);
</span><span class="cx">     RefPtr&lt;DatabaseProcessIDBConnection&gt; connection(this);
</span><del>-    m_uniqueIDBDatabase-&gt;cursorIterate(IDBIdentifier(*this, cursorID), key, [connection, requestID](const IDBKeyData&amp; resultKey, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage) {
</del><ins>+    m_uniqueIDBDatabase-&gt;cursorIterate(IDBIdentifier(*this, cursorID), key, [connection, requestID](const IDBKeyData&amp; resultKey, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, uint32_t errorCode, const String&amp; errorMessage) {
</ins><span class="cx">         IPC::DataReference data = value ? IPC::DataReference(reinterpret_cast&lt;const uint8_t*&gt;(value-&gt;data()), value-&gt;size()) : IPC::DataReference();
</span><del>-        connection-&gt;send(Messages::WebIDBServerConnection::DidIterateCursor(requestID, resultKey, primaryKey, data, valueKey, errorCode, errorMessage));
</del><ins>+        connection-&gt;send(Messages::WebIDBServerConnection::DidIterateCursor(requestID, resultKey, primaryKey, data, errorCode, errorMessage));
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -596,21 +596,21 @@
</span><span class="cx">     postDatabaseTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::getRecordFromBackingStore, requestID, transactionIdentifier, m_metadata-&gt;objectStores.get(objectStoreID), indexID, keyRangeData, cursorType));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, IndexedDB::CursorDirection cursorDirection, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, const IDBKeyRangeData&amp; keyRangeData, std::function&lt;void(int64_t, const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, const IDBKeyData&amp;, uint32_t, const String&amp;)&gt; callback)
</del><ins>+void UniqueIDBDatabase::openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, IndexedDB::CursorDirection cursorDirection, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, const IDBKeyRangeData&amp; keyRangeData, std::function&lt;void(int64_t, const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, uint32_t, const String&amp;)&gt; callback)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> 
</span><span class="cx">     if (!m_acceptingNewRequests) {
</span><del>-        callback(0, nullptr, nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to open cursor in database because it has shut down&quot;);
</del><ins>+        callback(0, nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to open cursor in database because it has shut down&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_metadata-&gt;objectStores.contains(objectStoreID));
</span><span class="cx"> 
</span><del>-    RefPtr&lt;AsyncRequest&gt; request = AsyncRequestImpl&lt;int64_t, const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, const IDBKeyData&amp;, uint32_t, const String&amp;&gt;::create([this, callback](int64_t cursorID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage) {
-        callback(cursorID, key, primaryKey, value, valueKey, errorCode, errorMessage);
</del><ins>+    RefPtr&lt;AsyncRequest&gt; request = AsyncRequestImpl&lt;int64_t, const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, uint32_t, const String&amp;&gt;::create([this, callback](int64_t cursorID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, uint32_t errorCode, const String&amp; errorMessage) {
+        callback(cursorID, key, primaryKey, value, errorCode, errorMessage);
</ins><span class="cx">     }, [this, callback]() {
</span><del>-        callback(0, nullptr, nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to get record from database&quot;);
</del><ins>+        callback(0, nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to get record from database&quot;);
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     uint64_t requestID = request-&gt;requestID();
</span><span class="lines">@@ -619,19 +619,19 @@
</span><span class="cx">     postDatabaseTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::openCursorInBackingStore, requestID, transactionIdentifier, objectStoreID, indexID, cursorDirection, cursorType, taskType, keyRangeData));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::cursorAdvance(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, std::function&lt;void(const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, const IDBKeyData&amp;, uint32_t, const String&amp;)&gt; callback)
</del><ins>+void UniqueIDBDatabase::cursorAdvance(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, std::function&lt;void(const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, uint32_t, const String&amp;)&gt; callback)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> 
</span><span class="cx">     if (!m_acceptingNewRequests) {
</span><del>-        callback(nullptr, nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to advance cursor in database because it has shut down&quot;);
</del><ins>+        callback(nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to advance cursor in database because it has shut down&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;AsyncRequest&gt; request = AsyncRequestImpl&lt;const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, const IDBKeyData&amp;, uint32_t, const String&amp;&gt;::create([this, callback](const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage) {
-        callback(key, primaryKey, value, valueKey, errorCode, errorMessage);
</del><ins>+    RefPtr&lt;AsyncRequest&gt; request = AsyncRequestImpl&lt;const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, uint32_t, const String&amp;&gt;::create([this, callback](const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, uint32_t errorCode, const String&amp; errorMessage) {
+        callback(key, primaryKey, value, errorCode, errorMessage);
</ins><span class="cx">     }, [this, callback]() {
</span><del>-        callback(nullptr, nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to advance cursor in database&quot;);
</del><ins>+        callback(nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to advance cursor in database&quot;);
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     uint64_t requestID = request-&gt;requestID();
</span><span class="lines">@@ -640,19 +640,19 @@
</span><span class="cx">     postDatabaseTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::advanceCursorInBackingStore, requestID, cursorIdentifier, count));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::cursorIterate(const IDBIdentifier&amp; cursorIdentifier, const IDBKeyData&amp; key, std::function&lt;void(const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, const IDBKeyData&amp;, uint32_t, const String&amp;)&gt; callback)
</del><ins>+void UniqueIDBDatabase::cursorIterate(const IDBIdentifier&amp; cursorIdentifier, const IDBKeyData&amp; key, std::function&lt;void(const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, uint32_t, const String&amp;)&gt; callback)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> 
</span><span class="cx">     if (!m_acceptingNewRequests) {
</span><del>-        callback(nullptr, nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to iterate cursor in database because it has shut down&quot;);
</del><ins>+        callback(nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to iterate cursor in database because it has shut down&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;AsyncRequest&gt; request = AsyncRequestImpl&lt;const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, const IDBKeyData&amp;, uint32_t, const String&amp;&gt;::create([this, callback](const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage) {
-        callback(key, primaryKey, value, valueKey, errorCode, errorMessage);
</del><ins>+    RefPtr&lt;AsyncRequest&gt; request = AsyncRequestImpl&lt;const IDBKeyData&amp;, const IDBKeyData&amp;, PassRefPtr&lt;SharedBuffer&gt;, uint32_t, const String&amp;&gt;::create([this, callback](const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, PassRefPtr&lt;SharedBuffer&gt; value, uint32_t errorCode, const String&amp; errorMessage) {
+        callback(key, primaryKey, value, errorCode, errorMessage);
</ins><span class="cx">     }, [this, callback]() {
</span><del>-        callback(nullptr, nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to iterate cursor in database&quot;);
</del><ins>+        callback(nullptr, nullptr, nullptr, INVALID_STATE_ERR, &quot;Unable to iterate cursor in database&quot;);
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     uint64_t requestID = request-&gt;requestID();
</span><span class="lines">@@ -952,25 +952,24 @@
</span><span class="cx">     IDBKeyData key;
</span><span class="cx">     IDBKeyData primaryKey;
</span><span class="cx">     Vector&lt;char&gt; valueBuffer;
</span><del>-    IDBKeyData valueKey;
</del><span class="cx">     int32_t errorCode = 0;
</span><span class="cx">     String errorMessage;
</span><del>-    bool success = m_backingStore-&gt;openCursor(transactionIdentifier, objectStoreID, indexID, cursorDirection, cursorType, taskType, keyRange, cursorID, key, primaryKey, valueBuffer, valueKey);
</del><ins>+    bool success = m_backingStore-&gt;openCursor(transactionIdentifier, objectStoreID, indexID, cursorDirection, cursorType, taskType, keyRange, cursorID, key, primaryKey, valueBuffer);
</ins><span class="cx"> 
</span><span class="cx">     if (!success) {
</span><span class="cx">         errorCode = IDBDatabaseException::UnknownError;
</span><span class="cx">         errorMessage = ASCIILiteral(&quot;Unknown error opening cursor in backing store&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    postMainThreadTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::didOpenCursorInBackingStore, requestID, cursorID, key, primaryKey, valueBuffer, valueKey, errorCode, errorMessage));
</del><ins>+    postMainThreadTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::didOpenCursorInBackingStore, requestID, cursorID, key, primaryKey, valueBuffer, errorCode, errorMessage));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::didOpenCursorInBackingStore(uint64_t requestID, int64_t cursorID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const Vector&lt;char&gt;&amp; valueBuffer, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage)
</del><ins>+void UniqueIDBDatabase::didOpenCursorInBackingStore(uint64_t requestID, int64_t cursorID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const Vector&lt;char&gt;&amp; valueBuffer, uint32_t errorCode, const String&amp; errorMessage)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;AsyncRequest&gt; request = m_pendingDatabaseTasks.take(requestID);
</span><span class="cx">     ASSERT(request);
</span><span class="cx"> 
</span><del>-    request-&gt;completeRequest(cursorID, key, primaryKey, SharedBuffer::create(valueBuffer.data(), valueBuffer.size()), valueKey, errorCode, errorMessage);
</del><ins>+    request-&gt;completeRequest(cursorID, key, primaryKey, SharedBuffer::create(valueBuffer.data(), valueBuffer.size()), errorCode, errorMessage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::advanceCursorInBackingStore(uint64_t requestID, const IDBIdentifier&amp; cursorIdentifier, uint64_t count)
</span><span class="lines">@@ -978,25 +977,24 @@
</span><span class="cx">     IDBKeyData key;
</span><span class="cx">     IDBKeyData primaryKey;
</span><span class="cx">     Vector&lt;char&gt; valueBuffer;
</span><del>-    IDBKeyData valueKey;
</del><span class="cx">     int32_t errorCode = 0;
</span><span class="cx">     String errorMessage;
</span><del>-    bool success = m_backingStore-&gt;advanceCursor(cursorIdentifier, count, key, primaryKey, valueBuffer, valueKey);
</del><ins>+    bool success = m_backingStore-&gt;advanceCursor(cursorIdentifier, count, key, primaryKey, valueBuffer);
</ins><span class="cx"> 
</span><span class="cx">     if (!success) {
</span><span class="cx">         errorCode = IDBDatabaseException::UnknownError;
</span><span class="cx">         errorMessage = ASCIILiteral(&quot;Unknown error advancing cursor in backing store&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    postMainThreadTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::didAdvanceCursorInBackingStore, requestID, key, primaryKey, valueBuffer, valueKey, errorCode, errorMessage));
</del><ins>+    postMainThreadTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::didAdvanceCursorInBackingStore, requestID, key, primaryKey, valueBuffer, errorCode, errorMessage));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::didAdvanceCursorInBackingStore(uint64_t requestID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const Vector&lt;char&gt;&amp; valueBuffer, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage)
</del><ins>+void UniqueIDBDatabase::didAdvanceCursorInBackingStore(uint64_t requestID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const Vector&lt;char&gt;&amp; valueBuffer, uint32_t errorCode, const String&amp; errorMessage)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;AsyncRequest&gt; request = m_pendingDatabaseTasks.take(requestID);
</span><span class="cx">     ASSERT(request);
</span><span class="cx"> 
</span><del>-    request-&gt;completeRequest(key, primaryKey, SharedBuffer::create(valueBuffer.data(), valueBuffer.size()), valueKey, errorCode, errorMessage);
</del><ins>+    request-&gt;completeRequest(key, primaryKey, SharedBuffer::create(valueBuffer.data(), valueBuffer.size()), errorCode, errorMessage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::iterateCursorInBackingStore(uint64_t requestID, const IDBIdentifier&amp; cursorIdentifier, const IDBKeyData&amp; iterateKey)
</span><span class="lines">@@ -1004,25 +1002,24 @@
</span><span class="cx">     IDBKeyData key;
</span><span class="cx">     IDBKeyData primaryKey;
</span><span class="cx">     Vector&lt;char&gt; valueBuffer;
</span><del>-    IDBKeyData valueKey;
</del><span class="cx">     int32_t errorCode = 0;
</span><span class="cx">     String errorMessage;
</span><del>-    bool success = m_backingStore-&gt;iterateCursor(cursorIdentifier, iterateKey, key, primaryKey, valueBuffer, valueKey);
</del><ins>+    bool success = m_backingStore-&gt;iterateCursor(cursorIdentifier, iterateKey, key, primaryKey, valueBuffer);
</ins><span class="cx"> 
</span><span class="cx">     if (!success) {
</span><span class="cx">         errorCode = IDBDatabaseException::UnknownError;
</span><span class="cx">         errorMessage = ASCIILiteral(&quot;Unknown error iterating cursor in backing store&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    postMainThreadTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::didIterateCursorInBackingStore, requestID, key, primaryKey, valueBuffer, valueKey, errorCode, errorMessage));
</del><ins>+    postMainThreadTask(createAsyncTask(*this, &amp;UniqueIDBDatabase::didIterateCursorInBackingStore, requestID, key, primaryKey, valueBuffer, errorCode, errorMessage));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::didIterateCursorInBackingStore(uint64_t requestID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const Vector&lt;char&gt;&amp; valueBuffer, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage)
</del><ins>+void UniqueIDBDatabase::didIterateCursorInBackingStore(uint64_t requestID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const Vector&lt;char&gt;&amp; valueBuffer, uint32_t errorCode, const String&amp; errorMessage)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;AsyncRequest&gt; request = m_pendingDatabaseTasks.take(requestID);
</span><span class="cx">     ASSERT(request);
</span><span class="cx"> 
</span><del>-    request-&gt;completeRequest(key, primaryKey, SharedBuffer::create(valueBuffer.data(), valueBuffer.size()), valueKey, errorCode, errorMessage);
</del><ins>+    request-&gt;completeRequest(key, primaryKey, SharedBuffer::create(valueBuffer.data(), valueBuffer.size()), errorCode, errorMessage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::countInBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, const IDBKeyRangeData&amp; keyRangeData)
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -96,9 +96,9 @@
</span><span class="cx">     void putRecord(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, const WebCore::IDBKeyData&amp;, const IPC::DataReference&amp; value, int64_t putMode, const Vector&lt;int64_t&gt;&amp; indexIDs, const Vector&lt;Vector&lt;WebCore::IDBKeyData&gt;&gt;&amp; indexKeys, std::function&lt;void(const WebCore::IDBKeyData&amp;, uint32_t, const String&amp;)&gt; callback);
</span><span class="cx">     void getRecord(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, const WebCore::IDBKeyRangeData&amp;, WebCore::IndexedDB::CursorType, std::function&lt;void(const WebCore::IDBGetResult&amp;, uint32_t, const String&amp;)&gt; callback);
</span><span class="cx"> 
</span><del>-    void openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, WebCore::IndexedDB::CursorDirection, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackend::TaskType, const WebCore::IDBKeyRangeData&amp;, std::function&lt;void(int64_t, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, const WebCore::IDBKeyData&amp;, uint32_t, const String&amp;)&gt; callback);
-    void cursorAdvance(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, std::function&lt;void(const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, const WebCore::IDBKeyData&amp;, uint32_t, const String&amp;)&gt; callback);
-    void cursorIterate(const IDBIdentifier&amp; cursorIdentifier, const WebCore::IDBKeyData&amp;, std::function&lt;void(const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, const WebCore::IDBKeyData&amp;, uint32_t, const String&amp;)&gt; callback);
</del><ins>+    void openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, WebCore::IndexedDB::CursorDirection, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackend::TaskType, const WebCore::IDBKeyRangeData&amp;, std::function&lt;void(int64_t, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, uint32_t, const String&amp;)&gt; callback);
+    void cursorAdvance(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, std::function&lt;void(const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, uint32_t, const String&amp;)&gt; callback);
+    void cursorIterate(const IDBIdentifier&amp; cursorIdentifier, const WebCore::IDBKeyData&amp;, std::function&lt;void(const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, uint32_t, const String&amp;)&gt; callback);
</ins><span class="cx"> 
</span><span class="cx">     void count(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, const WebCore::IDBKeyRangeData&amp;, std::function&lt;void(int64_t, uint32_t, const String&amp;)&gt; callback);
</span><span class="cx">     void deleteRange(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, const WebCore::IDBKeyRangeData&amp;, std::function&lt;void(uint32_t, const String&amp;)&gt; callback);
</span><span class="lines">@@ -149,8 +149,10 @@
</span><span class="cx">     void createObjectStoreInBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, const WebCore::IDBObjectStoreMetadata&amp;);
</span><span class="cx">     void deleteObjectStoreInBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID);
</span><span class="cx">     void clearObjectStoreInBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID);
</span><ins>+
</ins><span class="cx">     void createIndexInBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, const WebCore::IDBIndexMetadata&amp;);
</span><span class="cx">     void deleteIndexInBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID);
</span><ins>+
</ins><span class="cx">     void putRecordInBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, const WebCore::IDBObjectStoreMetadata&amp;, const WebCore::IDBKeyData&amp;, const Vector&lt;uint8_t&gt;&amp; value, int64_t putMode, const Vector&lt;int64_t&gt;&amp; indexIDs, const Vector&lt;Vector&lt;WebCore::IDBKeyData&gt;&gt;&amp; indexKeys);
</span><span class="cx">     void getRecordFromBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, const WebCore::IDBObjectStoreMetadata&amp;, int64_t indexID, const WebCore::IDBKeyRangeData&amp;, WebCore::IndexedDB::CursorType);
</span><span class="cx">     void openCursorInBackingStore(uint64_t requestID, const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, WebCore::IndexedDB::CursorDirection, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackend::TaskType, const WebCore::IDBKeyRangeData&amp;);
</span><span class="lines">@@ -173,9 +175,9 @@
</span><span class="cx">     void didDeleteIndex(uint64_t requestID, bool success);
</span><span class="cx">     void didPutRecordInBackingStore(uint64_t requestID, const WebCore::IDBKeyData&amp;, uint32_t errorCode, const String&amp; errorMessage);
</span><span class="cx">     void didGetRecordFromBackingStore(uint64_t requestID, const WebCore::IDBGetResult&amp;, uint32_t errorCode, const String&amp; errorMessage);
</span><del>-    void didOpenCursorInBackingStore(uint64_t requestID, int64_t cursorID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const Vector&lt;char&gt;&amp;, const WebCore::IDBKeyData&amp;, uint32_t errorCode, const String&amp; errorMessage);
-    void didAdvanceCursorInBackingStore(uint64_t requestID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const Vector&lt;char&gt;&amp;, const WebCore::IDBKeyData&amp;, uint32_t errorCode, const String&amp; errorMessage);
-    void didIterateCursorInBackingStore(uint64_t requestID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const Vector&lt;char&gt;&amp;, const WebCore::IDBKeyData&amp;, uint32_t errorCode, const String&amp; errorMessage);
</del><ins>+    void didOpenCursorInBackingStore(uint64_t requestID, int64_t cursorID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const Vector&lt;char&gt;&amp;, uint32_t errorCode, const String&amp; errorMessage);
+    void didAdvanceCursorInBackingStore(uint64_t requestID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const Vector&lt;char&gt;&amp;, uint32_t errorCode, const String&amp; errorMessage);
+    void didIterateCursorInBackingStore(uint64_t requestID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const Vector&lt;char&gt;&amp;, uint32_t errorCode, const String&amp; errorMessage);
</ins><span class="cx">     void didCountInBackingStore(uint64_t requestID, int64_t count, uint32_t errorCode, const String&amp; errorMessage);
</span><span class="cx">     void didDeleteRangeInBackingStore(uint64_t requestID, uint32_t errorCode, const String&amp; errorMessage);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -79,9 +79,9 @@
</span><span class="cx">     virtual bool getKeyRangeRecordFromObjectStore(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, const WebCore::IDBKeyRange&amp;, RefPtr&lt;WebCore::SharedBuffer&gt;&amp; result, RefPtr&lt;WebCore::IDBKey&gt;&amp; resultKey) = 0;
</span><span class="cx">     virtual bool count(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, const WebCore::IDBKeyRangeData&amp;, int64_t&amp; count) = 0;
</span><span class="cx"> 
</span><del>-    virtual bool openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, WebCore::IndexedDB::CursorDirection, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackend::TaskType, const WebCore::IDBKeyRangeData&amp;, int64_t&amp; cursorID, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;, WebCore::IDBKeyData&amp;) = 0;
-    virtual bool advanceCursor(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;, WebCore::IDBKeyData&amp;) = 0;
-    virtual bool iterateCursor(const IDBIdentifier&amp; cursorIdentifier, const WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;, WebCore::IDBKeyData&amp;) = 0;
</del><ins>+    virtual bool openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, WebCore::IndexedDB::CursorDirection, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackend::TaskType, const WebCore::IDBKeyRangeData&amp;, int64_t&amp; cursorID, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;) = 0;
+    virtual bool advanceCursor(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;) = 0;
+    virtual bool iterateCursor(const IDBIdentifier&amp; cursorIdentifier, const WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;) = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBsqliteSQLiteIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -272,7 +272,6 @@
</span><span class="cx">         m_currentKey = IDBKeyData();
</span><span class="cx">         m_currentPrimaryKey = IDBKeyData();
</span><span class="cx">         m_currentValueBuffer.clear();
</span><del>-        m_currentValueKey = IDBKeyData();
</del><span class="cx"> 
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="lines">@@ -287,8 +286,7 @@
</span><span class="cx">     Vector&lt;char&gt; keyData;
</span><span class="cx">     m_statement-&gt;getColumnBlobAsVector(0, keyData);
</span><span class="cx"> 
</span><del>-    IDBKeyData key;
-    if (!deserializeIDBKeyData(reinterpret_cast&lt;const uint8_t*&gt;(keyData.data()), keyData.size(), key)) {
</del><ins>+    if (!deserializeIDBKeyData(reinterpret_cast&lt;const uint8_t*&gt;(keyData.data()), keyData.size(), m_currentKey)) {
</ins><span class="cx">         LOG_ERROR(&quot;Unable to deserialize key data from database while advancing cursor&quot;);
</span><span class="cx">         m_completed = true;
</span><span class="cx">         m_errored = true;
</span><span class="lines">@@ -296,13 +294,10 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_statement-&gt;getColumnBlobAsVector(1, keyData);
</span><del>-
-    m_currentKey = key;
-    m_currentPrimaryKey = key;
</del><span class="cx">     m_currentValueBuffer = keyData;
</span><span class="cx"> 
</span><span class="cx">     if (m_indexID != IDBIndexMetadata::InvalidId) {
</span><del>-        if (!deserializeIDBKeyData(reinterpret_cast&lt;const uint8_t*&gt;(keyData.data()), keyData.size(), m_currentValueKey)) {
</del><ins>+        if (!deserializeIDBKeyData(reinterpret_cast&lt;const uint8_t*&gt;(keyData.data()), keyData.size(), m_currentPrimaryKey)) {
</ins><span class="cx">             LOG_ERROR(&quot;Unable to deserialize value data from database while advancing index cursor&quot;);
</span><span class="cx">             m_completed = true;
</span><span class="cx">             m_errored = true;
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBsqliteSQLiteIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -59,7 +59,6 @@
</span><span class="cx">     const WebCore::IDBKeyData&amp; currentKey() const { return m_currentKey; }
</span><span class="cx">     const WebCore::IDBKeyData&amp; currentPrimaryKey() const { return m_currentPrimaryKey; }
</span><span class="cx">     const Vector&lt;char&gt;&amp; currentValueBuffer() const { return m_currentValueBuffer; }
</span><del>-    const WebCore::IDBKeyData&amp; currentValueKey() const { return m_currentValueKey; }
</del><span class="cx"> 
</span><span class="cx">     bool advance(uint64_t count);
</span><span class="cx">     bool iterate(const WebCore::IDBKeyData&amp; targetKey);
</span><span class="lines">@@ -85,7 +84,6 @@
</span><span class="cx">     WebCore::IDBKeyData m_currentKey;
</span><span class="cx">     WebCore::IDBKeyData m_currentPrimaryKey;
</span><span class="cx">     Vector&lt;char&gt; m_currentValueBuffer;
</span><del>-    WebCore::IDBKeyData m_currentValueKey;
</del><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;WebCore::SQLiteStatement&gt; m_statement;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBsqliteUniqueIDBDatabaseBackingStoreSQLitecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &quot;SQLiteIDBCursor.h&quot;
</span><span class="cx"> #include &quot;SQLiteIDBTransaction.h&quot;
</span><span class="cx"> #include &lt;WebCore/FileSystem.h&gt;
</span><ins>+#include &lt;WebCore/IDBBindingUtilities.h&gt;
</ins><span class="cx"> #include &lt;WebCore/IDBDatabaseMetadata.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBGetResult.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBKeyData.h&gt;
</span><span class="lines">@@ -875,7 +876,7 @@
</span><span class="cx">     m_cursors.set(cursor-&gt;identifier(), cursor);
</span><span class="cx"> 
</span><span class="cx">     result = IDBGetResult(SharedBuffer::create(cursor-&gt;currentValueBuffer().data(), cursor-&gt;currentValueBuffer().size()));
</span><del>-    result.keyData = cursor-&gt;currentValueKey();
</del><ins>+    result.keyData = cursor-&gt;currentPrimaryKey();
</ins><span class="cx"> 
</span><span class="cx">     // Closing the cursor will destroy the cursor object and remove it from our cursor set.
</span><span class="cx">     transaction-&gt;closeCursor(*cursor);
</span><span class="lines">@@ -1135,7 +1136,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool UniqueIDBDatabaseBackingStoreSQLite::openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, IndexedDB::CursorDirection cursorDirection, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, const IDBKeyRangeData&amp; keyRange, int64_t&amp; cursorID, IDBKeyData&amp; key, IDBKeyData&amp; primaryKey, Vector&lt;char&gt;&amp; valueBuffer, IDBKeyData&amp; valueKey)
</del><ins>+bool UniqueIDBDatabaseBackingStoreSQLite::openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, IndexedDB::CursorDirection cursorDirection, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, const IDBKeyRangeData&amp; keyRange, int64_t&amp; cursorID, IDBKeyData&amp; key, IDBKeyData&amp; primaryKey, Vector&lt;char&gt;&amp; valueBuffer)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><span class="cx">     ASSERT(m_sqliteDB);
</span><span class="lines">@@ -1156,12 +1157,11 @@
</span><span class="cx">     key = cursor-&gt;currentKey();
</span><span class="cx">     primaryKey = cursor-&gt;currentPrimaryKey();
</span><span class="cx">     valueBuffer = cursor-&gt;currentValueBuffer();
</span><del>-    valueKey = cursor-&gt;currentValueKey();
</del><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool UniqueIDBDatabaseBackingStoreSQLite::advanceCursor(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, IDBKeyData&amp; key, IDBKeyData&amp; primaryKey, Vector&lt;char&gt;&amp; valueBuffer, IDBKeyData&amp; valueKey)
</del><ins>+bool UniqueIDBDatabaseBackingStoreSQLite::advanceCursor(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, IDBKeyData&amp; key, IDBKeyData&amp; primaryKey, Vector&lt;char&gt;&amp; valueBuffer)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><span class="cx">     ASSERT(m_sqliteDB);
</span><span class="lines">@@ -1185,12 +1185,11 @@
</span><span class="cx">     key = cursor-&gt;currentKey();
</span><span class="cx">     primaryKey = cursor-&gt;currentPrimaryKey();
</span><span class="cx">     valueBuffer = cursor-&gt;currentValueBuffer();
</span><del>-    valueKey = cursor-&gt;currentValueKey();
</del><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool UniqueIDBDatabaseBackingStoreSQLite::iterateCursor(const IDBIdentifier&amp; cursorIdentifier, const IDBKeyData&amp; targetKey, IDBKeyData&amp; key, IDBKeyData&amp; primaryKey, Vector&lt;char&gt;&amp; valueBuffer, IDBKeyData&amp; valueKey)
</del><ins>+bool UniqueIDBDatabaseBackingStoreSQLite::iterateCursor(const IDBIdentifier&amp; cursorIdentifier, const IDBKeyData&amp; targetKey, IDBKeyData&amp; key, IDBKeyData&amp; primaryKey, Vector&lt;char&gt;&amp; valueBuffer)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><span class="cx">     ASSERT(m_sqliteDB);
</span><span class="lines">@@ -1214,7 +1213,6 @@
</span><span class="cx">     key = cursor-&gt;currentKey();
</span><span class="cx">     primaryKey = cursor-&gt;currentPrimaryKey();
</span><span class="cx">     valueBuffer = cursor-&gt;currentValueBuffer();
</span><del>-    valueKey = cursor-&gt;currentValueKey();
</del><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBsqliteUniqueIDBDatabaseBackingStoreSQLiteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -82,9 +82,9 @@
</span><span class="cx">     virtual bool getKeyRangeRecordFromObjectStore(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, const WebCore::IDBKeyRange&amp;, RefPtr&lt;WebCore::SharedBuffer&gt;&amp; result, RefPtr&lt;WebCore::IDBKey&gt;&amp; resultKey) override;
</span><span class="cx">     virtual bool count(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, const WebCore::IDBKeyRangeData&amp;, int64_t&amp; count) override;
</span><span class="cx"> 
</span><del>-    virtual bool openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, WebCore::IndexedDB::CursorDirection, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackend::TaskType, const WebCore::IDBKeyRangeData&amp;, int64_t&amp; cursorID, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;, WebCore::IDBKeyData&amp;) override;
-    virtual bool advanceCursor(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;, WebCore::IDBKeyData&amp;) override;
-    virtual bool iterateCursor(const IDBIdentifier&amp; cursorIdentifier, const WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;, WebCore::IDBKeyData&amp;) override;
</del><ins>+    virtual bool openCursor(const IDBIdentifier&amp; transactionIdentifier, int64_t objectStoreID, int64_t indexID, WebCore::IndexedDB::CursorDirection, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackend::TaskType, const WebCore::IDBKeyRangeData&amp;, int64_t&amp; cursorID, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;) override;
+    virtual bool advanceCursor(const IDBIdentifier&amp; cursorIdentifier, uint64_t count, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;) override;
+    virtual bool iterateCursor(const IDBIdentifier&amp; cursorIdentifier, const WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, WebCore::IDBKeyData&amp;, Vector&lt;char&gt;&amp;) override;
</ins><span class="cx"> 
</span><span class="cx">     void unregisterCursor(SQLiteIDBCursor*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -444,7 +444,7 @@
</span><span class="cx">     serverRequest-&gt;completeRequest(getResult, errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBServerConnection::didOpenCursor(uint64_t requestID, int64_t cursorID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const IPC::DataReference&amp; valueData, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage)
</del><ins>+void WebIDBServerConnection::didOpenCursor(uint64_t requestID, int64_t cursorID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const IPC::DataReference&amp; valueData, uint32_t errorCode, const String&amp; errorMessage)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IDB, &quot;WebProcess didOpenCursor request ID %llu (error - %s)&quot;, requestID, errorMessage.utf8().data());
</span><span class="cx"> 
</span><span class="lines">@@ -454,10 +454,10 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SharedBuffer&gt; value = SharedBuffer::create(valueData.data(), valueData.size());
</span><del>-    serverRequest-&gt;completeRequest(cursorID, key.maybeCreateIDBKey(), primaryKey.maybeCreateIDBKey(), value.release(), valueKey.maybeCreateIDBKey(), errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
</del><ins>+    serverRequest-&gt;completeRequest(cursorID, key.maybeCreateIDBKey(), primaryKey.maybeCreateIDBKey(), value.release(), errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBServerConnection::didAdvanceCursor(uint64_t requestID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const IPC::DataReference&amp; valueData, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage)
</del><ins>+void WebIDBServerConnection::didAdvanceCursor(uint64_t requestID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const IPC::DataReference&amp; valueData, uint32_t errorCode, const String&amp; errorMessage)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IDB, &quot;WebProcess didAdvanceCursor request ID %llu (error - %s)&quot;, requestID, errorMessage.utf8().data());
</span><span class="cx"> 
</span><span class="lines">@@ -467,10 +467,10 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SharedBuffer&gt; value = SharedBuffer::create(valueData.data(), valueData.size());
</span><del>-    serverRequest-&gt;completeRequest(key.maybeCreateIDBKey(), primaryKey.maybeCreateIDBKey(), value.release(), valueKey.maybeCreateIDBKey(), errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
</del><ins>+    serverRequest-&gt;completeRequest(key.maybeCreateIDBKey(), primaryKey.maybeCreateIDBKey(), value.release(), errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBServerConnection::didIterateCursor(uint64_t requestID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const IPC::DataReference&amp; valueData, const IDBKeyData&amp; valueKey, uint32_t errorCode, const String&amp; errorMessage)
</del><ins>+void WebIDBServerConnection::didIterateCursor(uint64_t requestID, const IDBKeyData&amp; key, const IDBKeyData&amp; primaryKey, const IPC::DataReference&amp; valueData, uint32_t errorCode, const String&amp; errorMessage)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IDB, &quot;WebProcess didIterateCursor request ID %llu (error - %s)&quot;, requestID, errorMessage.utf8().data());
</span><span class="cx"> 
</span><span class="lines">@@ -480,7 +480,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SharedBuffer&gt; value = SharedBuffer::create(valueData.data(), valueData.size());
</span><del>-    serverRequest-&gt;completeRequest(key.maybeCreateIDBKey(), primaryKey.maybeCreateIDBKey(), value.release(), valueKey.maybeCreateIDBKey(), errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
</del><ins>+    serverRequest-&gt;completeRequest(key.maybeCreateIDBKey(), primaryKey.maybeCreateIDBKey(), value.release(), errorCode ? IDBDatabaseError::create(errorCode, errorMessage) : nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebIDBServerConnection::count(IDBTransactionBackend&amp; transaction, const CountOperation&amp; operation, std::function&lt;void(int64_t, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</span><span class="lines">@@ -628,12 +628,12 @@
</span><span class="cx">     serverRequest-&gt;completeRequest(success ? nullptr : IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error occured changing database version&quot;));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBServerConnection::openCursor(IDBTransactionBackend&amp;, const OpenCursorOperation&amp; operation, std::function&lt;void(int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</del><ins>+void WebIDBServerConnection::openCursor(IDBTransactionBackend&amp;, const OpenCursorOperation&amp; operation, std::function&lt;void(int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;AsyncRequest&gt; serverRequest = AsyncRequestImpl&lt;int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;&gt;::create(completionCallback);
</del><ins>+    RefPtr&lt;AsyncRequest&gt; serverRequest = AsyncRequestImpl&lt;int64_t, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;&gt;::create(completionCallback);
</ins><span class="cx"> 
</span><span class="cx">     serverRequest-&gt;setAbortHandler([completionCallback]() {
</span><del>-        completionCallback(0, nullptr, nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error occured opening database cursor&quot;));
</del><ins>+        completionCallback(0, nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error occured opening database cursor&quot;));
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     uint64_t requestID = serverRequest-&gt;requestID();
</span><span class="lines">@@ -645,12 +645,12 @@
</span><span class="cx">     send(Messages::DatabaseProcessIDBConnection::OpenCursor(requestID, operation.transactionID(), operation.objectStoreID(), operation.indexID(), static_cast&lt;int64_t&gt;(operation.direction()), static_cast&lt;int64_t&gt;(operation.cursorType()), static_cast&lt;int64_t&gt;(operation.taskType()), operation.keyRange()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBServerConnection::cursorAdvance(IDBCursorBackend&amp;, const CursorAdvanceOperation&amp; operation, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</del><ins>+void WebIDBServerConnection::cursorAdvance(IDBCursorBackend&amp;, const CursorAdvanceOperation&amp; operation, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;AsyncRequest&gt; serverRequest = AsyncRequestImpl&lt;PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;&gt;::create(completionCallback);
</del><ins>+    RefPtr&lt;AsyncRequest&gt; serverRequest = AsyncRequestImpl&lt;PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;&gt;::create(completionCallback);
</ins><span class="cx"> 
</span><span class="cx">     serverRequest-&gt;setAbortHandler([completionCallback]() {
</span><del>-        completionCallback(nullptr, nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error occured advancing database cursor&quot;));
</del><ins>+        completionCallback(nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error occured advancing database cursor&quot;));
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     uint64_t requestID = serverRequest-&gt;requestID();
</span><span class="lines">@@ -662,12 +662,12 @@
</span><span class="cx">     send(Messages::DatabaseProcessIDBConnection::CursorAdvance(requestID, operation.cursorID(), operation.count()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBServerConnection::cursorIterate(IDBCursorBackend&amp;, const CursorIterationOperation&amp; operation, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</del><ins>+void WebIDBServerConnection::cursorIterate(IDBCursorBackend&amp;, const CursorIterationOperation&amp; operation, std::function&lt;void(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;)&gt; completionCallback)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;AsyncRequest&gt; serverRequest = AsyncRequestImpl&lt;PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBDatabaseError&gt;&gt;::create(completionCallback);
</del><ins>+    RefPtr&lt;AsyncRequest&gt; serverRequest = AsyncRequestImpl&lt;PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBDatabaseError&gt;&gt;::create(completionCallback);
</ins><span class="cx"> 
</span><span class="cx">     serverRequest-&gt;setAbortHandler([completionCallback]() {
</span><del>-        completionCallback(nullptr, nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error occured iterating database cursor&quot;));
</del><ins>+        completionCallback(nullptr, nullptr, nullptr, IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Unknown error occured iterating database cursor&quot;));
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     uint64_t requestID = serverRequest-&gt;requestID();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     virtual void deleteIndex(WebCore::IDBTransactionBackend&amp;, const WebCore::DeleteIndexOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx">     virtual void get(WebCore::IDBTransactionBackend&amp;, const WebCore::GetOperation&amp;, std::function&lt;void(const WebCore::IDBGetResult&amp;, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx">     virtual void put(WebCore::IDBTransactionBackend&amp;, const WebCore::PutOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><del>-    virtual void openCursor(WebCore::IDBTransactionBackend&amp;, const WebCore::OpenCursorOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</del><ins>+    virtual void openCursor(WebCore::IDBTransactionBackend&amp;, const WebCore::OpenCursorOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</ins><span class="cx">     virtual void count(WebCore::IDBTransactionBackend&amp;, const WebCore::CountOperation&amp;, std::function&lt;void(int64_t, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx">     virtual void deleteRange(WebCore::IDBTransactionBackend&amp;, const WebCore::DeleteRangeOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx">     virtual void clearObjectStore(WebCore::IDBTransactionBackend&amp;, const WebCore::ClearObjectStoreOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="lines">@@ -80,8 +80,8 @@
</span><span class="cx">     virtual void changeDatabaseVersion(WebCore::IDBTransactionBackend&amp;, const WebCore::IDBDatabaseBackend::VersionChangeOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</span><span class="cx"> 
</span><span class="cx">     // Cursor-level operations
</span><del>-    virtual void cursorAdvance(WebCore::IDBCursorBackend&amp;, const WebCore::CursorAdvanceOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
-    virtual void cursorIterate(WebCore::IDBCursorBackend&amp;, const WebCore::CursorIterationOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</del><ins>+    virtual void cursorAdvance(WebCore::IDBCursorBackend&amp;, const WebCore::CursorAdvanceOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
+    virtual void cursorIterate(WebCore::IDBCursorBackend&amp;, const WebCore::CursorIterationOperation&amp;, std::function&lt;void(PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::IDBKey&gt;, PassRefPtr&lt;WebCore::SharedBuffer&gt;, PassRefPtr&lt;WebCore::IDBDatabaseError&gt;)&gt; completionCallback) override;
</ins><span class="cx"> 
</span><span class="cx">     // Message handlers.
</span><span class="cx">     void didReceiveWebIDBServerConnectionMessage(IPC::Connection*, IPC::MessageDecoder&amp;);
</span><span class="lines">@@ -110,9 +110,9 @@
</span><span class="cx">     void didDeleteIndex(uint64_t requestID, bool success);
</span><span class="cx">     void didPutRecord(uint64_t requestID, const WebCore::IDBKeyData&amp;, uint32_t errorCode, const String&amp; errorMessage);
</span><span class="cx">     void didGetRecord(uint64_t requestID, const WebCore::IDBGetResult&amp;, uint32_t errorCode, const String&amp; errorMessage);
</span><del>-    void didOpenCursor(uint64_t requestID, int64_t cursorID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const IPC::DataReference&amp;, const WebCore::IDBKeyData&amp;, uint32_t errorCode, const String&amp; errorMessage);
-    void didAdvanceCursor(uint64_t requestID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const IPC::DataReference&amp;, const WebCore::IDBKeyData&amp;, uint32_t errorCode, const String&amp; errorMessage);
-    void didIterateCursor(uint64_t requestID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const IPC::DataReference&amp;, const WebCore::IDBKeyData&amp;, uint32_t errorCode, const String&amp; errorMessage);
</del><ins>+    void didOpenCursor(uint64_t requestID, int64_t cursorID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const IPC::DataReference&amp;, uint32_t errorCode, const String&amp; errorMessage);
+    void didAdvanceCursor(uint64_t requestID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const IPC::DataReference&amp;, uint32_t errorCode, const String&amp; errorMessage);
+    void didIterateCursor(uint64_t requestID, const WebCore::IDBKeyData&amp;, const WebCore::IDBKeyData&amp;, const IPC::DataReference&amp;, uint32_t errorCode, const String&amp; errorMessage);
</ins><span class="cx">     void didCount(uint64_t requestID, int64_t count, uint32_t errorCode, const String&amp; errorMessage);
</span><span class="cx">     void didDeleteRange(uint64_t requestID, uint32_t errorCode, const String&amp; errorMessage);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectionmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in (163611 => 163612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in        2014-02-07 06:32:05 UTC (rev 163611)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in        2014-02-07 06:37:48 UTC (rev 163612)
</span><span class="lines">@@ -36,13 +36,15 @@
</span><span class="cx">     DidCreateObjectStore(uint64_t requestID, bool success)
</span><span class="cx">     DidDeleteObjectStore(uint64_t requestID, bool success)
</span><span class="cx">     DidClearObjectStore(uint64_t requestID, bool success)
</span><ins>+    
</ins><span class="cx">     DidCreateIndex(uint64_t requestID, bool success)
</span><span class="cx">     DidDeleteIndex(uint64_t requestID, bool success)
</span><ins>+
</ins><span class="cx">     DidPutRecord(uint64_t requestID, WebCore::IDBKeyData resultKey, uint32_t errorCode, String errorMessage)
</span><span class="cx">     DidGetRecord(uint64_t requestID, WebCore::IDBGetResult getResult, uint32_t errorCode, String errorMessage)
</span><del>-    DidOpenCursor(uint64_t requestID, int64_t cursorID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, WebCore::IDBKeyData valueKey, uint32_t errorCode, String errorMessage)
-    DidAdvanceCursor(uint64_t requestID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, WebCore::IDBKeyData valueKey, uint32_t errorCode, String errorMessage)
-    DidIterateCursor(uint64_t requestID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, WebCore::IDBKeyData valueKey, uint32_t errorCode, String errorMessage)
</del><ins>+    DidOpenCursor(uint64_t requestID, int64_t cursorID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, uint32_t errorCode, String errorMessage)
+    DidAdvanceCursor(uint64_t requestID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, uint32_t errorCode, String errorMessage)
+    DidIterateCursor(uint64_t requestID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, uint32_t errorCode, String errorMessage)
</ins><span class="cx">     DidCount(uint64_t requestID, int64_t count, uint32_t errorCode, String errorMessage)
</span><span class="cx">     DidDeleteRange(uint64_t requestID, uint32_t errorCode, String errorMessage)
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>