<!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>[208486] 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/208486">208486</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-11-09 14:24:49 -0800 (Wed, 09 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>IndexedDB 2.0: Encapsulate cursor iteration parameters for easy future expansion.
https://bugs.webkit.org/show_bug.cgi?id=164504

Reviewed by Darin Adler.

Source/WebCore:

No new tests (Refactor, no behavior change).

This patch literally just takes the &quot;key&quot; and &quot;count&quot; arguments and encapsulates them in a struct.
That struct will then be easily expandable in the future (e.g. bug 164404).

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::uncheckedIterateCursor):

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::iterateCursor):
(WebCore::IDBTransaction::iterateCursorOnServer):
* Modules/indexeddb/IDBTransaction.h:

* Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::iterateCursor):
* Modules/indexeddb/client/IDBConnectionProxy.h:

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::iterateCursor):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::iterateCursor):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

* Modules/indexeddb/shared/IDBIterateCursorData.cpp: Added.
(WebCore::IDBIterateCursorData::isolatedCopy):
* Modules/indexeddb/shared/IDBIterateCursorData.h: Added.
(WebCore::IDBIterateCursorData::encode):
(WebCore::IDBIterateCursorData::decode):

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::iterateCursor):
* Modules/indexeddb/shared/InProcessIDBServer.h:

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::iterateCursor):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::iterateCursor):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxycpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxyh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerh">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactionh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientcpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClienth">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientmessagesin">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServerh">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBIterateCursorDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBIterateCursorDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -861,6 +861,7 @@
</span><span class="cx">     Modules/indexeddb/shared/IDBGetAllRecordsData.cpp
</span><span class="cx">     Modules/indexeddb/shared/IDBGetRecordData.cpp
</span><span class="cx">     Modules/indexeddb/shared/IDBIndexInfo.cpp
</span><ins>+    Modules/indexeddb/shared/IDBIterateCursorData.cpp
</ins><span class="cx">     Modules/indexeddb/shared/IDBObjectStoreInfo.cpp
</span><span class="cx">     Modules/indexeddb/shared/IDBRequestData.cpp
</span><span class="cx">     Modules/indexeddb/shared/IDBResourceIdentifier.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/ChangeLog        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -1,3 +1,68 @@
</span><ins>+2016-11-09  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Encapsulate cursor iteration parameters for easy future expansion.
+        https://bugs.webkit.org/show_bug.cgi?id=164504
+
+        Reviewed by Darin Adler.
+
+        No new tests (Refactor, no behavior change).
+
+        This patch literally just takes the &quot;key&quot; and &quot;count&quot; arguments and encapsulates them in a struct.
+        That struct will then be easily expandable in the future (e.g. bug 164404).
+
+        * Modules/indexeddb/IDBCursor.cpp:
+        (WebCore::IDBCursor::uncheckedIterateCursor):
+        
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::iterateCursor):
+        (WebCore::IDBTransaction::iterateCursorOnServer):
+        * Modules/indexeddb/IDBTransaction.h:
+        
+        * Modules/indexeddb/client/IDBConnectionProxy.cpp:
+        (WebCore::IDBClient::IDBConnectionProxy::iterateCursor):
+        * Modules/indexeddb/client/IDBConnectionProxy.h:
+        
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        (WebCore::IDBClient::IDBConnectionToServer::iterateCursor):
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
+        
+        * Modules/indexeddb/server/IDBBackingStore.h:
+        
+        * Modules/indexeddb/server/IDBServer.cpp:
+        (WebCore::IDBServer::IDBServer::iterateCursor):
+        * Modules/indexeddb/server/IDBServer.h:
+        
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+        
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
+        (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
+        
+        * Modules/indexeddb/shared/IDBIterateCursorData.cpp: Added.
+        (WebCore::IDBIterateCursorData::isolatedCopy):
+        * Modules/indexeddb/shared/IDBIterateCursorData.h: Added.
+        (WebCore::IDBIterateCursorData::encode):
+        (WebCore::IDBIterateCursorData::decode):
+
+        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+        (WebCore::InProcessIDBServer::iterateCursor):
+        * Modules/indexeddb/shared/InProcessIDBServer.h:
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2016-11-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         StyledElement::attributeChanged shouldn't do any work when the attribute value didn't change
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &quot;IDBDatabaseException.h&quot;
</span><span class="cx"> #include &quot;IDBGetResult.h&quot;
</span><span class="cx"> #include &quot;IDBIndex.h&quot;
</span><ins>+#include &quot;IDBIterateCursorData.h&quot;
</ins><span class="cx"> #include &quot;IDBObjectStore.h&quot;
</span><span class="cx"> #include &quot;IDBRequest.h&quot;
</span><span class="cx"> #include &quot;IDBTransaction.h&quot;
</span><span class="lines">@@ -292,7 +293,7 @@
</span><span class="cx">     ++m_outstandingRequestCount;
</span><span class="cx"> 
</span><span class="cx">     m_request-&gt;willIterateCursor(*this);
</span><del>-    transaction().iterateCursor(*this, key, count);
</del><ins>+    transaction().iterateCursor(*this, { key, count });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr&lt;Ref&lt;WebCore::IDBRequest&gt;&gt; IDBCursor::deleteFunction(ExecState&amp; state)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include &quot;IDBEventDispatcher.h&quot;
</span><span class="cx"> #include &quot;IDBGetRecordData.h&quot;
</span><span class="cx"> #include &quot;IDBIndex.h&quot;
</span><ins>+#include &quot;IDBIterateCursorData.h&quot;
</ins><span class="cx"> #include &quot;IDBKeyData.h&quot;
</span><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><span class="cx"> #include &quot;IDBObjectStore.h&quot;
</span><span class="lines">@@ -721,7 +722,7 @@
</span><span class="cx">     request.didOpenOrIterateCursor(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBTransaction::iterateCursor(IDBCursor&amp; cursor, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void IDBTransaction::iterateCursor(IDBCursor&amp; cursor, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::iterateCursor&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><span class="lines">@@ -730,15 +731,16 @@
</span><span class="cx"> 
</span><span class="cx">     addRequest(*cursor.request());
</span><span class="cx"> 
</span><del>-    scheduleOperation(IDBClient::createTransactionOperation(*this, *cursor.request(), &amp;IDBTransaction::didIterateCursorOnServer, &amp;IDBTransaction::iterateCursorOnServer, key, count));
</del><ins>+    scheduleOperation(IDBClient::createTransactionOperation(*this, *cursor.request(), &amp;IDBTransaction::didIterateCursorOnServer, &amp;IDBTransaction::iterateCursorOnServer, data));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBTransaction::iterateCursorOnServer(IDBClient::TransactionOperation&amp; operation, const IDBKeyData&amp; key, const unsigned long&amp; count)
</del><ins>+// FIXME: changes here
+void IDBTransaction::iterateCursorOnServer(IDBClient::TransactionOperation&amp; operation, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::iterateCursorOnServer&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    m_database-&gt;connectionProxy().iterateCursor(operation, key, count);
</del><ins>+    m_database-&gt;connectionProxy().iterateCursor(operation, data);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBTransaction::didIterateCursorOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> class IDBResultData;
</span><span class="cx"> class SerializedScriptValue;
</span><span class="cx"> 
</span><ins>+struct IDBIterateCursorData;
</ins><span class="cx"> struct IDBKeyRangeData;
</span><span class="cx"> 
</span><span class="cx"> namespace IDBClient {
</span><span class="lines">@@ -124,7 +125,7 @@
</span><span class="cx">     Ref&lt;IDBRequest&gt; requestGetKey(JSC::ExecState&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
</span><span class="cx">     Ref&lt;IDBRequest&gt; requestOpenCursor(JSC::ExecState&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
</span><span class="cx">     Ref&lt;IDBRequest&gt; requestOpenCursor(JSC::ExecState&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
</span><del>-    void iterateCursor(IDBCursor&amp;, const IDBKeyData&amp;, unsigned long count);
</del><ins>+    void iterateCursor(IDBCursor&amp;, const IDBIterateCursorData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void deleteObjectStore(const String&amp; objectStoreName);
</span><span class="cx">     void deleteIndex(uint64_t objectStoreIdentifier, const String&amp; indexName);
</span><span class="lines">@@ -209,7 +210,7 @@
</span><span class="cx">     void openCursorOnServer(IDBClient::TransactionOperation&amp;, const IDBCursorInfo&amp;);
</span><span class="cx">     void didOpenCursorOnServer(IDBRequest&amp;, const IDBResultData&amp;);
</span><span class="cx"> 
</span><del>-    void iterateCursorOnServer(IDBClient::TransactionOperation&amp;, const IDBKeyData&amp;, const unsigned long&amp; count);
</del><ins>+    void iterateCursorOnServer(IDBClient::TransactionOperation&amp;, const IDBIterateCursorData&amp;);
</ins><span class="cx">     void didIterateCursorOnServer(IDBRequest&amp;, const IDBResultData&amp;);
</span><span class="cx"> 
</span><span class="cx">     void transitionedToFinishing(IndexedDB::TransactionState);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;IDBCursorInfo.h&quot;
</span><span class="cx"> #include &quot;IDBDatabase.h&quot;
</span><span class="cx"> #include &quot;IDBGetRecordData.h&quot;
</span><ins>+#include &quot;IDBIterateCursorData.h&quot;
</ins><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><span class="cx"> #include &quot;IDBOpenDBRequest.h&quot;
</span><span class="cx"> #include &quot;IDBRequestData.h&quot;
</span><span class="lines">@@ -221,12 +222,12 @@
</span><span class="cx">     callConnectionOnMainThread(&amp;IDBConnectionToServer::openCursor, requestData, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBConnectionProxy::iterateCursor(TransactionOperation&amp; operation, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void IDBConnectionProxy::iterateCursor(TransactionOperation&amp; operation, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><span class="cx">     const IDBRequestData requestData { operation };
</span><span class="cx">     saveOperation(operation);
</span><span class="cx"> 
</span><del>-    callConnectionOnMainThread(&amp;IDBConnectionToServer::iterateCursor, requestData, key, count);
</del><ins>+    callConnectionOnMainThread(&amp;IDBConnectionToServer::iterateCursor, requestData, data);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBConnectionProxy::saveOperation(TransactionOperation&amp; operation)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> class SecurityOrigin;
</span><span class="cx"> 
</span><span class="cx"> struct IDBGetRecordData;
</span><ins>+struct IDBIterateCursorData;
</ins><span class="cx"> 
</span><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span><span class="lines">@@ -77,7 +78,7 @@
</span><span class="cx">     void getCount(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
</span><span class="cx">     void deleteRecord(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
</span><span class="cx">     void openCursor(TransactionOperation&amp;, const IDBCursorInfo&amp;);
</span><del>-    void iterateCursor(TransactionOperation&amp;, const IDBKeyData&amp;, unsigned long count);
</del><ins>+    void iterateCursor(TransactionOperation&amp;, const IDBIterateCursorData&amp;);
</ins><span class="cx">     void renameObjectStore(TransactionOperation&amp;, uint64_t objectStoreIdentifier, const String&amp; newName);
</span><span class="cx">     void renameIndex(TransactionOperation&amp;, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const String&amp; newName);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -273,12 +273,12 @@
</span><span class="cx">     m_proxy-&gt;completeOperation(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBConnectionToServer::iterateCursor(const IDBRequestData&amp; requestData, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void IDBConnectionToServer::iterateCursor(const IDBRequestData&amp; requestData, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBConnectionToServer::iterateCursor&quot;);
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> 
</span><del>-    m_delegate-&gt;iterateCursor(requestData, key, count);
</del><ins>+    m_delegate-&gt;iterateCursor(requestData, data);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBConnectionToServer::didIterateCursor(const IDBResultData&amp; resultData)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> 
</span><span class="cx"> struct IDBGetAllRecordsData;
</span><span class="cx"> struct IDBGetRecordData;
</span><ins>+struct IDBIterateCursorData;
</ins><span class="cx"> 
</span><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span><span class="lines">@@ -102,7 +103,7 @@
</span><span class="cx">     void openCursor(const IDBRequestData&amp;, const IDBCursorInfo&amp;);
</span><span class="cx">     WEBCORE_EXPORT void didOpenCursor(const IDBResultData&amp;);
</span><span class="cx"> 
</span><del>-    void iterateCursor(const IDBRequestData&amp;, const IDBKeyData&amp;, unsigned long count);
</del><ins>+    void iterateCursor(const IDBRequestData&amp;, const IDBIterateCursorData&amp;);
</ins><span class="cx">     WEBCORE_EXPORT void didIterateCursor(const IDBResultData&amp;);
</span><span class="cx"> 
</span><span class="cx">     void commitTransaction(const IDBResourceIdentifier&amp; transactionIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> struct IDBGetAllRecordsData;
</span><span class="cx"> struct IDBGetRecordData;
</span><ins>+struct IDBIterateCursorData;
</ins><span class="cx"> struct SecurityOriginData;
</span><span class="cx"> 
</span><span class="cx"> namespace IndexedDB {
</span><span class="lines">@@ -75,7 +76,7 @@
</span><span class="cx">     virtual void getCount(const IDBRequestData&amp;, const IDBKeyRangeData&amp;) = 0;
</span><span class="cx">     virtual void deleteRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;) = 0;
</span><span class="cx">     virtual void openCursor(const IDBRequestData&amp;, const IDBCursorInfo&amp;) = 0;
</span><del>-    virtual void iterateCursor(const IDBRequestData&amp;, const IDBKeyData&amp;, unsigned long count) = 0;
</del><ins>+    virtual void iterateCursor(const IDBRequestData&amp;, const IDBIterateCursorData&amp;) = 0;
</ins><span class="cx"> 
</span><span class="cx">     virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;) = 0;
</span><span class="cx">     virtual void databaseConnectionClosed(uint64_t databaseConnectionIdentifier) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> class ThreadSafeDataBuffer;
</span><span class="cx"> 
</span><span class="cx"> struct IDBGetAllRecordsData;
</span><ins>+struct IDBIterateCursorData;
</ins><span class="cx"> struct IDBKeyRangeData;
</span><span class="cx"> 
</span><span class="cx"> namespace IndexedDB {
</span><span class="lines">@@ -88,7 +89,7 @@
</span><span class="cx">     virtual IDBError revertGeneratedKeyNumber(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t keyNumber) = 0;
</span><span class="cx">     virtual IDBError maybeUpdateKeyGeneratorNumber(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, double newKeyNumber) = 0;
</span><span class="cx">     virtual IDBError openCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBCursorInfo&amp;, IDBGetResult&amp; outResult) = 0;
</span><del>-    virtual IDBError iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBKeyData&amp;, uint32_t count, IDBGetResult&amp; outResult) = 0;
</del><ins>+    virtual IDBError iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBIterateCursorData&amp;, IDBGetResult&amp; outResult) = 0;
</ins><span class="cx"> 
</span><span class="cx">     virtual IDBObjectStoreInfo* infoForObjectStore(uint64_t objectStoreIdentifier) = 0;
</span><span class="cx">     virtual void deleteBackingStore() = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -338,7 +338,7 @@
</span><span class="cx">     transaction-&gt;openCursor(requestData, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBServer::iterateCursor(const IDBRequestData&amp; requestData, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void IDBServer::iterateCursor(const IDBRequestData&amp; requestData, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBServer::iterateCursor&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx">     if (!transaction)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    transaction-&gt;iterateCursor(requestData, key, count);
</del><ins>+    transaction-&gt;iterateCursor(requestData, data);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBServer::establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp; info)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">     WEBCORE_EXPORT void getCount(const IDBRequestData&amp;, const IDBKeyRangeData&amp;);
</span><span class="cx">     WEBCORE_EXPORT void deleteRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;);
</span><span class="cx">     WEBCORE_EXPORT void openCursor(const IDBRequestData&amp;, const IDBCursorInfo&amp;);
</span><del>-    WEBCORE_EXPORT void iterateCursor(const IDBRequestData&amp;, const IDBKeyData&amp;, unsigned long count);
</del><ins>+    WEBCORE_EXPORT void iterateCursor(const IDBRequestData&amp;, const IDBIterateCursorData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;);
</span><span class="cx">     WEBCORE_EXPORT void databaseConnectionClosed(uint64_t databaseConnectionIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;IDBGetAllRecordsData.h&quot;
</span><span class="cx"> #include &quot;IDBGetResult.h&quot;
</span><span class="cx"> #include &quot;IDBIndexInfo.h&quot;
</span><ins>+#include &quot;IDBIterateCursorData.h&quot;
</ins><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;MemoryIndexCursor.h&quot;
</span><span class="lines">@@ -526,7 +527,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError MemoryIDBBackingStore::iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBKeyData&amp; key, uint32_t count, IDBGetResult&amp; outData)
</del><ins>+IDBError MemoryIDBBackingStore::iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBIterateCursorData&amp; data, IDBGetResult&amp; outData)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::iterateCursor&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -537,7 +538,7 @@
</span><span class="cx">     if (!cursor)
</span><span class="cx">         return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store cursor found in which to iterate cursor&quot;) };
</span><span class="cx"> 
</span><del>-    cursor-&gt;iterate(key, count, outData);
</del><ins>+    cursor-&gt;iterate(data.keyData, data.count, outData);
</ins><span class="cx"> 
</span><span class="cx">     return { };
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">     IDBError revertGeneratedKeyNumber(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t keyNumber) final;
</span><span class="cx">     IDBError maybeUpdateKeyGeneratorNumber(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, double newKeyNumber) final;
</span><span class="cx">     IDBError openCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBCursorInfo&amp;, IDBGetResult&amp; outResult) final;
</span><del>-    IDBError iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBKeyData&amp;, uint32_t count, IDBGetResult&amp; outResult) final;
</del><ins>+    IDBError iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBIterateCursorData&amp;, IDBGetResult&amp; outResult) final;
</ins><span class="cx"> 
</span><span class="cx">     IDBObjectStoreInfo* infoForObjectStore(uint64_t objectStoreIdentifier) final;
</span><span class="cx">     void deleteBackingStore() final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &quot;IDBGetAllRecordsData.h&quot;
</span><span class="cx"> #include &quot;IDBGetAllResult.h&quot;
</span><span class="cx"> #include &quot;IDBGetResult.h&quot;
</span><ins>+#include &quot;IDBIterateCursorData.h&quot;
</ins><span class="cx"> #include &quot;IDBKeyData.h&quot;
</span><span class="cx"> #include &quot;IDBObjectStoreInfo.h&quot;
</span><span class="cx"> #include &quot;IDBSerialization.h&quot;
</span><span class="lines">@@ -2268,7 +2269,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError SQLiteIDBBackingStore::iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBKeyData&amp; key, uint32_t count, IDBGetResult&amp; result)
</del><ins>+IDBError SQLiteIDBBackingStore::iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBIterateCursorData&amp; data, IDBGetResult&amp; result)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::iterateCursor&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -2288,6 +2289,9 @@
</span><span class="cx">         return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to iterate a cursor without an in-progress transaction&quot;) };
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    auto key = data.keyData;
+    auto count = data.count;
+
</ins><span class="cx">     if (key.isValid()) {
</span><span class="cx">         if (!cursor-&gt;iterate(key)) {
</span><span class="cx">             LOG_ERROR(&quot;Attempt to iterate cursor failed&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">     IDBError revertGeneratedKeyNumber(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t keyNumber) final;
</span><span class="cx">     IDBError maybeUpdateKeyGeneratorNumber(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, double newKeyNumber) final;
</span><span class="cx">     IDBError openCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBCursorInfo&amp;, IDBGetResult&amp; outResult) final;
</span><del>-    IDBError iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBKeyData&amp;, uint32_t count, IDBGetResult&amp; outResult) final;
</del><ins>+    IDBError iterateCursor(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBIterateCursorData&amp;, IDBGetResult&amp; outResult) final;
</ins><span class="cx"> 
</span><span class="cx">     IDBObjectStoreInfo* infoForObjectStore(uint64_t objectStoreIdentifier) final;
</span><span class="cx">     void deleteBackingStore() final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;IDBGetAllRecordsData.h&quot;
</span><span class="cx"> #include &quot;IDBGetAllResult.h&quot;
</span><span class="cx"> #include &quot;IDBGetRecordData.h&quot;
</span><ins>+#include &quot;IDBIterateCursorData.h&quot;
</ins><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><span class="cx"> #include &quot;IDBServer.h&quot;
</span><span class="lines">@@ -1203,7 +1204,7 @@
</span><span class="cx">     performGetResultCallback(callbackIdentifier, error, result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::iterateCursor(const IDBRequestData&amp; requestData, const IDBKeyData&amp; key, unsigned long count, GetResultCallback callback)
</del><ins>+void UniqueIDBDatabase::iterateCursor(const IDBRequestData&amp; requestData, const IDBIterateCursorData&amp; data, GetResultCallback callback)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::iterateCursor&quot;);
</span><span class="lines">@@ -1211,16 +1212,16 @@
</span><span class="cx">     uint64_t callbackID = storeCallbackOrFireError(callback);
</span><span class="cx">     if (!callbackID)
</span><span class="cx">         return;
</span><del>-    postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performIterateCursor, callbackID, requestData.transactionIdentifier(), requestData.cursorIdentifier(), key, count));
</del><ins>+    postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performIterateCursor, callbackID, requestData.transactionIdentifier(), requestData.cursorIdentifier(), data));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::performIterateCursor(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void UniqueIDBDatabase::performIterateCursor(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(db) UniqueIDBDatabase::performIterateCursor&quot;);
</span><span class="cx"> 
</span><span class="cx">     IDBGetResult result;
</span><del>-    IDBError error = m_backingStore-&gt;iterateCursor(transactionIdentifier, cursorIdentifier, key, count, result);
</del><ins>+    IDBError error = m_backingStore-&gt;iterateCursor(transactionIdentifier, cursorIdentifier, data, result);
</ins><span class="cx"> 
</span><span class="cx">     postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformIterateCursor, callbackIdentifier, error, result));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">     void getCount(const IDBRequestData&amp;, const IDBKeyRangeData&amp;, CountCallback);
</span><span class="cx">     void deleteRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;, ErrorCallback);
</span><span class="cx">     void openCursor(const IDBRequestData&amp;, const IDBCursorInfo&amp;, GetResultCallback);
</span><del>-    void iterateCursor(const IDBRequestData&amp;, const IDBKeyData&amp;, unsigned long count, GetResultCallback);
</del><ins>+    void iterateCursor(const IDBRequestData&amp;, const IDBIterateCursorData&amp;, GetResultCallback);
</ins><span class="cx">     void commitTransaction(UniqueIDBDatabaseTransaction&amp;, ErrorCallback);
</span><span class="cx">     void abortTransaction(UniqueIDBDatabaseTransaction&amp;, ErrorCallback);
</span><span class="cx">     void didFinishHandlingVersionChange(UniqueIDBDatabaseConnection&amp;, const IDBResourceIdentifier&amp; transactionIdentifier);
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx">     void performGetCount(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;);
</span><span class="cx">     void performDeleteRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;);
</span><span class="cx">     void performOpenCursor(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBCursorInfo&amp;);
</span><del>-    void performIterateCursor(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBKeyData&amp;, unsigned long count);
</del><ins>+    void performIterateCursor(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBResourceIdentifier&amp; cursorIdentifier, const IDBIterateCursorData&amp;);
</ins><span class="cx">     void performActivateTransactionInBackingStore(uint64_t callbackIdentifier, const IDBTransactionInfo&amp;);
</span><span class="cx">     void performUnconditionalDeleteBackingStore();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IDBError.h&quot;
</span><ins>+#include &quot;IDBIterateCursorData.h&quot;
</ins><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><span class="cx"> #include &quot;IDBServer.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="lines">@@ -325,7 +326,7 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabaseTransaction::iterateCursor(const IDBRequestData&amp; requestData, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void UniqueIDBDatabaseTransaction::iterateCursor(const IDBRequestData&amp; requestData, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::iterateCursor&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -332,7 +333,7 @@
</span><span class="cx">     ASSERT(m_transactionInfo.identifier() == requestData.transactionIdentifier());
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;UniqueIDBDatabaseTransaction&gt; protectedThis(this);
</span><del>-    m_databaseConnection-&gt;database().iterateCursor(requestData, key, count, [this, protectedThis, requestData](const IDBError&amp; error, const IDBGetResult&amp; result) {
</del><ins>+    m_databaseConnection-&gt;database().iterateCursor(requestData, data, [this, protectedThis, requestData](const IDBError&amp; error, const IDBGetResult&amp; result) {
</ins><span class="cx">         LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::iterateCursor (callback)&quot;);
</span><span class="cx"> 
</span><span class="cx">         if (error.isNull())
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> struct IDBGetAllRecordsData;
</span><span class="cx"> struct IDBGetRecordData;
</span><ins>+struct IDBIterateCursorData;
</ins><span class="cx"> struct IDBKeyRangeData;
</span><span class="cx"> 
</span><span class="cx"> namespace IDBServer {
</span><span class="lines">@@ -81,7 +82,7 @@
</span><span class="cx">     void getCount(const IDBRequestData&amp;, const IDBKeyRangeData&amp;);
</span><span class="cx">     void deleteRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;);
</span><span class="cx">     void openCursor(const IDBRequestData&amp;, const IDBCursorInfo&amp;);
</span><del>-    void iterateCursor(const IDBRequestData&amp;, const IDBKeyData&amp;, unsigned long count);
</del><ins>+    void iterateCursor(const IDBRequestData&amp;, const IDBIterateCursorData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void didActivateInBackingStore(const IDBError&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBIterateCursorDatacpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp (0 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;IDBIterateCursorData.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+IDBIterateCursorData IDBIterateCursorData::isolatedCopy() const
+{
+    return { keyData.isolatedCopy(), count };
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBIterateCursorDatah"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.h (0 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBKeyData.h&quot;
+
+namespace WebCore {
+
+struct IDBIterateCursorData {
+    IDBKeyData keyData;
+    unsigned count;
+
+    IDBIterateCursorData isolatedCopy() const;
+
+    template&lt;class Encoder&gt; void encode(Encoder&amp;) const;
+    template&lt;class Decoder&gt; static bool decode(Decoder&amp;, IDBIterateCursorData&amp;);
+};
+
+template&lt;class Encoder&gt;
+void IDBIterateCursorData::encode(Encoder&amp; encoder) const
+{
+    encoder &lt;&lt; keyData &lt;&lt; static_cast&lt;uint64_t&gt;(count);
+}
+
+template&lt;class Decoder&gt;
+bool IDBIterateCursorData::decode(Decoder&amp; decoder, IDBIterateCursorData&amp; iteratorCursorData)
+{
+    if (!decoder.decode(iteratorCursorData.keyData))
+        return false;
+
+    uint64_t count;
+    if (!decoder.decode(count))
+        return false;
+
+    if (count &gt; std::numeric_limits&lt;unsigned&gt;::max())
+        return false;
+
+    iteratorCursorData.count = static_cast&lt;unsigned&gt;(count);
+
+    return true;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;IDBConnectionToServer.h&quot;
</span><span class="cx"> #include &quot;IDBCursorInfo.h&quot;
</span><span class="cx"> #include &quot;IDBGetRecordData.h&quot;
</span><ins>+#include &quot;IDBIterateCursorData.h&quot;
</ins><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><span class="cx"> #include &quot;IDBOpenDBRequest.h&quot;
</span><span class="cx"> #include &quot;IDBRequestData.h&quot;
</span><span class="lines">@@ -342,10 +343,10 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InProcessIDBServer::iterateCursor(const IDBRequestData&amp; requestData, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void InProcessIDBServer::iterateCursor(const IDBRequestData&amp; requestData, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><del>-    RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, key, count] {
-        m_server-&gt;iterateCursor(requestData, key, count);
</del><ins>+    RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, data] {
+        m_server-&gt;iterateCursor(requestData, data);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">     void getCount(const IDBRequestData&amp;, const IDBKeyRangeData&amp;) final;
</span><span class="cx">     void deleteRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;) final;
</span><span class="cx">     void openCursor(const IDBRequestData&amp;, const IDBCursorInfo&amp;) final;
</span><del>-    void iterateCursor(const IDBRequestData&amp;, const IDBKeyData&amp;, unsigned long count) final;
</del><ins>+    void iterateCursor(const IDBRequestData&amp;, const IDBIterateCursorData&amp;) final;
</ins><span class="cx">     void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;) final;
</span><span class="cx">     void databaseConnectionClosed(uint64_t databaseConnectionIdentifier) final;
</span><span class="cx">     void abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier) final;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -2257,6 +2257,8 @@
</span><span class="cx">                 51E1ECC20C91C90400DC255B /* PageURLRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E1ECBC0C91C90400DC255B /* PageURLRecord.cpp */; };
</span><span class="cx">                 51E1ECC30C91C90400DC255B /* PageURLRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E1ECBD0C91C90400DC255B /* PageURLRecord.h */; };
</span><span class="cx">                 51E269331DD3BC4E006B6A58 /* JSIDBTransactionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E269321DD3BC43006B6A58 /* JSIDBTransactionCustom.cpp */; };
</span><ins>+                51E269361DD3BD97006B6A58 /* IDBIterateCursorData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E269341DD3BD91006B6A58 /* IDBIterateCursorData.cpp */; };
+                51E269371DD3BD9B006B6A58 /* IDBIterateCursorData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E269351DD3BD91006B6A58 /* IDBIterateCursorData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 51E399001D6E4750009C8831 /* GameControllerGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E398FC1D6E474B009C8831 /* GameControllerGamepad.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51E399011D6E4750009C8831 /* GameControllerGamepad.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E398FD1D6E474B009C8831 /* GameControllerGamepad.mm */; };
</span><span class="cx">                 51E399021D6E4750009C8831 /* GameControllerGamepadProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E398FE1D6E474B009C8831 /* GameControllerGamepadProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -9407,6 +9409,8 @@
</span><span class="cx">                 51E1ECBC0C91C90400DC255B /* PageURLRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageURLRecord.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51E1ECBD0C91C90400DC255B /* PageURLRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageURLRecord.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51E269321DD3BC43006B6A58 /* JSIDBTransactionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBTransactionCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                51E269341DD3BD91006B6A58 /* IDBIterateCursorData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIterateCursorData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51E269351DD3BD91006B6A58 /* IDBIterateCursorData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBIterateCursorData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 51E398FC1D6E474B009C8831 /* GameControllerGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameControllerGamepad.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51E398FD1D6E474B009C8831 /* GameControllerGamepad.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GameControllerGamepad.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51E398FE1D6E474B009C8831 /* GameControllerGamepadProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameControllerGamepadProvider.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16889,6 +16893,8 @@
</span><span class="cx">                                 5105F0681D4BA54100FB80BC /* IDBGetRecordData.h */,
</span><span class="cx">                                 51F798EB1BE880D3008AE491 /* IDBIndexInfo.cpp */,
</span><span class="cx">                                 51F798EC1BE880D3008AE491 /* IDBIndexInfo.h */,
</span><ins>+                                51E269341DD3BD91006B6A58 /* IDBIterateCursorData.cpp */,
+                                51E269351DD3BD91006B6A58 /* IDBIterateCursorData.h */,
</ins><span class="cx">                                 5160712C1BD8307200DBC4F2 /* IDBObjectStoreInfo.cpp */,
</span><span class="cx">                                 5160712D1BD8307200DBC4F2 /* IDBObjectStoreInfo.h */,
</span><span class="cx">                                 510A58F51BACC4A500C19282 /* IDBRequestData.cpp */,
</span><span class="lines">@@ -25048,6 +25054,7 @@
</span><span class="cx">                                 CD19A2681A13E700008D650E /* DiagnosticLoggingClient.h in Headers */,
</span><span class="cx">                                 46FCB6181A70820E00C5A21E /* DiagnosticLoggingKeys.h in Headers */,
</span><span class="cx">                                 8372DB311A6780A800C697C5 /* DiagnosticLoggingResultType.h in Headers */,
</span><ins>+                                51E269371DD3BD9B006B6A58 /* IDBIterateCursorData.h in Headers */,
</ins><span class="cx">                                 CECADFC7153778FF00E37068 /* DictationAlternative.h in Headers */,
</span><span class="cx">                                 CECADFC9153778FF00E37068 /* DictationCommand.h in Headers */,
</span><span class="cx">                                 D0BD4F5D1408850F006839B6 /* DictationCommandIOS.h in Headers */,
</span><span class="lines">@@ -30062,6 +30069,7 @@
</span><span class="cx">                                 6F995A371A70833700A735F4 /* JSWebGLTransformFeedback.cpp in Sources */,
</span><span class="cx">                                 0C45342710CDBBFA00869157 /* JSWebGLUniformLocation.cpp in Sources */,
</span><span class="cx">                                 6F995A391A70833700A735F4 /* JSWebGLVertexArrayObject.cpp in Sources */,
</span><ins>+                                51E269361DD3BD97006B6A58 /* IDBIterateCursorData.cpp in Sources */,
</ins><span class="cx">                                 77EF62F312F9DB7400C77BD2 /* JSWebGLVertexArrayObjectOES.cpp in Sources */,
</span><span class="cx">                                 31C0FF3D0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.cpp in Sources */,
</span><span class="cx">                                 4983913F0F1E767500C23782 /* JSWebKitCSSMatrix.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebKit2/ChangeLog        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-11-09  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Encapsulate cursor iteration parameters for easy future expansion.
+        https://bugs.webkit.org/show_bug.cgi?id=164504
+
+        Reviewed by Darin Adler.
+
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
+        (WebKit::WebIDBConnectionToClient::iterateCursor):
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
+
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+        (WebKit::WebIDBConnectionToServer::iterateCursor):
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
+
</ins><span class="cx"> 2016-11-09  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Move Range from ExceptionCode to ExceptionOr
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -321,9 +321,9 @@
</span><span class="cx">     DatabaseProcess::singleton().idbServer().openCursor(request, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToClient::iterateCursor(const IDBRequestData&amp; request, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void WebIDBConnectionToClient::iterateCursor(const IDBRequestData&amp; request, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><del>-    DatabaseProcess::singleton().idbServer().iterateCursor(request, key, count);
</del><ins>+    DatabaseProcess::singleton().idbServer().iterateCursor(request, data);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebIDBConnectionToClient::establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp; info)
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> class SerializedScriptValue;
</span><span class="cx"> struct IDBGetAllRecordsData;
</span><span class="cx"> struct IDBGetRecordData;
</span><ins>+struct IDBIterateCursorData;
</ins><span class="cx"> struct IDBKeyRangeData;
</span><span class="cx"> struct SecurityOriginData;
</span><span class="cx"> }
</span><span class="lines">@@ -107,7 +108,7 @@
</span><span class="cx">     void getCount(const WebCore::IDBRequestData&amp;, const WebCore::IDBKeyRangeData&amp;);
</span><span class="cx">     void deleteRecord(const WebCore::IDBRequestData&amp;, const WebCore::IDBKeyRangeData&amp;);
</span><span class="cx">     void openCursor(const WebCore::IDBRequestData&amp;, const WebCore::IDBCursorInfo&amp;);
</span><del>-    void iterateCursor(const WebCore::IDBRequestData&amp;, const WebCore::IDBKeyData&amp;, unsigned long count);
</del><ins>+    void iterateCursor(const WebCore::IDBRequestData&amp;, const WebCore::IDBIterateCursorData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void establishTransaction(uint64_t databaseConnectionIdentifier, const WebCore::IDBTransactionInfo&amp;);
</span><span class="cx">     void databaseConnectionClosed(uint64_t databaseConnectionIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBWebIDBConnectionToClientmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     GetCount(WebCore::IDBRequestData requestData, struct WebCore::IDBKeyRangeData range);
</span><span class="cx">     DeleteRecord(WebCore::IDBRequestData requestData, struct WebCore::IDBKeyRangeData range);
</span><span class="cx">     OpenCursor(WebCore::IDBRequestData requestData, WebCore::IDBCursorInfo info);
</span><del>-    IterateCursor(WebCore::IDBRequestData requestData, WebCore::IDBKeyData key, uint32_t count);
</del><ins>+    IterateCursor(WebCore::IDBRequestData requestData, struct WebCore::IDBIterateCursorData data);
</ins><span class="cx"> 
</span><span class="cx">     EstablishTransaction(uint64_t databaseConnectionIdentifier, WebCore::IDBTransactionInfo info);
</span><span class="cx">     DatabaseConnectionClosed(uint64_t databaseConnectionIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include &lt;WebCore/IDBDatabaseException.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBError.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBIndexInfo.h&gt;
</span><ins>+#include &lt;WebCore/IDBIterateCursorData.h&gt;
</ins><span class="cx"> #include &lt;WebCore/IDBKeyRangeData.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBObjectStoreInfo.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBOpenDBRequest.h&gt;
</span><span class="lines">@@ -174,9 +175,9 @@
</span><span class="cx">     send(Messages::WebIDBConnectionToClient::OpenCursor(requestData, info));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebIDBConnectionToServer::iterateCursor(const IDBRequestData&amp; requestData, const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void WebIDBConnectionToServer::iterateCursor(const IDBRequestData&amp; requestData, const IDBIterateCursorData&amp; data)
</ins><span class="cx"> {
</span><del>-    send(Messages::WebIDBConnectionToClient::IterateCursor(requestData, key, count));
</del><ins>+    send(Messages::WebIDBConnectionToClient::IterateCursor(requestData, data));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebIDBConnectionToServer::establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp; info)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h (208485 => 208486)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h        2016-11-09 22:15:05 UTC (rev 208485)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h        2016-11-09 22:24:49 UTC (rev 208486)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">     void getCount(const WebCore::IDBRequestData&amp;, const WebCore::IDBKeyRangeData&amp;) final;
</span><span class="cx">     void deleteRecord(const WebCore::IDBRequestData&amp;, const WebCore::IDBKeyRangeData&amp;) final;
</span><span class="cx">     void openCursor(const WebCore::IDBRequestData&amp;, const WebCore::IDBCursorInfo&amp;) final;
</span><del>-    void iterateCursor(const WebCore::IDBRequestData&amp;, const WebCore::IDBKeyData&amp;, unsigned long count) final;
</del><ins>+    void iterateCursor(const WebCore::IDBRequestData&amp;, const WebCore::IDBIterateCursorData&amp;) final;
</ins><span class="cx">     void establishTransaction(uint64_t databaseConnectionIdentifier, const WebCore::IDBTransactionInfo&amp;) final;
</span><span class="cx">     void databaseConnectionClosed(uint64_t databaseConnectionIdentifier) final;
</span><span class="cx">     void abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier&amp; transactionIdentifier) final;
</span></span></pre>
</div>
</div>

</body>
</html>