<!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>[209197] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/209197">209197</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-12-01 13:33:17 -0800 (Thu, 01 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>IndexedDB 2.0: Implement IDBObjectStore.getKey().
https://bugs.webkit.org/show_bug.cgi?id=165256

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/idbobjectstore-getkey-1-private.html
       storage/indexeddb/modern/idbobjectstore-getkey-1.html

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::getKey):
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:

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

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::didGetRecordOnServer):

* Modules/indexeddb/IndexedDB.h:

* Modules/indexeddb/server/IDBBackingStore.h:

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

* Modules/indexeddb/server/MemoryObjectStore.h:

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

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

LayoutTests:

* storage/indexeddb/modern/idbobjectstore-getkey-1-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-getkey-1-private-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-getkey-1-private.html: Added.
* storage/indexeddb/modern/idbobjectstore-getkey-1.html: Added.
* storage/indexeddb/modern/resources/idbobjectstore-getkey-1.js: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl</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="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIndexedDBh">trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.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="#trunkSourceWebCoreModulesindexeddbsharedIDBGetRecordDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBGetRecordDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetkey1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetkey1privateexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-private-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetkey1privatehtml">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-private.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetkey1html">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoregetkey1js">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-getkey-1.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/LayoutTests/ChangeLog        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-12-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Implement IDBObjectStore.getKey().
+        https://bugs.webkit.org/show_bug.cgi?id=165256
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/idbobjectstore-getkey-1-expected.txt: Added.
+        * storage/indexeddb/modern/idbobjectstore-getkey-1-private-expected.txt: Added.
+        * storage/indexeddb/modern/idbobjectstore-getkey-1-private.html: Added.
+        * storage/indexeddb/modern/idbobjectstore-getkey-1.html: Added.
+        * storage/indexeddb/modern/resources/idbobjectstore-getkey-1.js: Added.
+
</ins><span class="cx"> 2016-12-01  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] Turn off text selection
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetkey1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-expected.txt (0 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-expected.txt        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test IDBObjectStore.getKey()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Initial upgrade needed: Old version - 0 New version - 1
+getKey(6) result is: undefined
+getKey(3) result is: 3
+getKey(IDBKeyRange.only(5)) result is: 5
+getKey(IDBKeyRange.lowerBound(2)) result is: 2
+getKey(IDBKeyRange.upperBound(2)) result is: 1
+getKey(IDBKeyRange.bound(2, 4)) result is: 2
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetkey1privateexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-private-expected.txt (0 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-private-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-private-expected.txt        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test IDBObjectStore.getKey()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Initial upgrade needed: Old version - 0 New version - 1
+getKey(6) result is: undefined
+getKey(3) result is: 3
+getKey(IDBKeyRange.only(5)) result is: 5
+getKey(IDBKeyRange.lowerBound(2)) result is: 2
+getKey(IDBKeyRange.upperBound(2)) result is: 1
+getKey(IDBKeyRange.bound(2, 4)) result is: 2
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetkey1privatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-private.html (0 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-private.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1-private.html        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+enablePrivateBrowsing = true;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;script src=&quot;resources/idbobjectstore-getkey-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetkey1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1.html (0 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-getkey-1.html        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;script src=&quot;resources/idbobjectstore-getkey-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoregetkey1js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-getkey-1.js (0 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-getkey-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-getkey-1.js        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -0,0 +1,90 @@
</span><ins>+description(&quot;Test IDBObjectStore.getKey()&quot;);
+
+indexedDBTest(prepareDatabase);
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var testGenerator;
+
+function continueWithEvent(event)
+{
+    testGenerator.next(event);
+}
+
+function asyncContinue()
+{
+    setTimeout(&quot;testGenerator.next();&quot;, 0);
+}
+
+function idbRequest(request)
+{
+    request.onerror = continueWithEvent;
+    request.onsuccess = continueWithEvent;
+        return request;
+}
+
+var db;
+
+function prepareDatabase(event)
+{
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    db = event.target.result;
+    os = db.createObjectStore(&quot;foo&quot;);
+        os.add(false, 1);
+        os.add(-10, 2);
+        os.add(10, 3);
+        os.add(&quot;hello&quot;, 4);
+        os.add(&quot;hellothere&quot;, 5);
+
+    event.target.transaction.oncomplete = function() {
+        testGenerator = testSteps();
+        testGenerator.next();
+    };
+}
+
+function* testSteps()
+{
+    objectStore = db.transaction(&quot;foo&quot;).objectStore(&quot;foo&quot;);
+        
+        // Non-existent key
+    req = idbRequest(objectStore.getKey(6));
+    event = yield;    
+        debug(&quot;getKey(6) result is: &quot; + req.result);
+
+        // Existent key
+    req = idbRequest(objectStore.getKey(3));
+    event = yield;    
+        debug(&quot;getKey(3) result is: &quot; + req.result);
+        
+        // Key range only
+    req = idbRequest(objectStore.getKey(IDBKeyRange.only(5)));
+    event = yield;    
+        debug(&quot;getKey(IDBKeyRange.only(5)) result is: &quot; + req.result);
+
+        // Key range lower bound
+    req = idbRequest(objectStore.getKey(IDBKeyRange.lowerBound(2)));
+    event = yield;    
+        debug(&quot;getKey(IDBKeyRange.lowerBound(2)) result is: &quot; + req.result);
+
+        // Key range upper bound
+    req = idbRequest(objectStore.getKey(IDBKeyRange.upperBound(2)));
+    event = yield;    
+        debug(&quot;getKey(IDBKeyRange.upperBound(2)) result is: &quot; + req.result);
+
+        // Key range bound
+    req = idbRequest(objectStore.getKey(IDBKeyRange.bound(2, 4)));
+    event = yield;    
+        debug(&quot;getKey(IDBKeyRange.bound(2, 4)) result is: &quot; + req.result);
+    
+    finishJSTest();
+ }

</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/ChangeLog        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2016-12-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Implement IDBObjectStore.getKey().
+        https://bugs.webkit.org/show_bug.cgi?id=165256
+
+        Reviewed by Alex Christensen.
+
+        Tests: storage/indexeddb/modern/idbobjectstore-getkey-1-private.html
+               storage/indexeddb/modern/idbobjectstore-getkey-1.html
+
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::get):
+        (WebCore::IDBObjectStore::getKey):
+        * Modules/indexeddb/IDBObjectStore.h:
+        * Modules/indexeddb/IDBObjectStore.idl:
+
+        * Modules/indexeddb/IDBRequest.cpp:
+        (WebCore::IDBRequest::createObjectStoreGet):
+        (WebCore::IDBRequest::IDBRequest):
+        (WebCore::IDBRequest::requestedObjectStoreRecordType):
+        * Modules/indexeddb/IDBRequest.h:
+
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::requestGetRecord):
+        (WebCore::IDBTransaction::requestIndexRecord):
+        (WebCore::IDBTransaction::didGetRecordOnServer):
+
+        * Modules/indexeddb/IndexedDB.h:
+
+        * Modules/indexeddb/server/IDBBackingStore.h:
+
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+
+        * Modules/indexeddb/server/MemoryObjectStore.h:
+
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
+        (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
+        * Modules/indexeddb/shared/IDBGetRecordData.cpp:
+        (WebCore::IDBGetRecordData::isolatedCopy):
+        * Modules/indexeddb/shared/IDBGetRecordData.h:
+        (WebCore::IDBGetRecordData::encode):
+        (WebCore::IDBGetRecordData::decode):
+
</ins><span class="cx"> 2016-12-01  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Misc. cleanup in Modules/fetch
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx">     if (!idbKey-&gt;isValid())
</span><span class="cx">         return Exception { IDBDatabaseException::DataError, ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.&quot;) };
</span><span class="cx"> 
</span><del>-    return m_transaction.requestGetRecord(execState, *this, { idbKey.ptr() });
</del><ins>+    return m_transaction.requestGetRecord(execState, *this, { idbKey.ptr(), IDBGetRecordDataType::KeyAndValue });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; IDBObjectStore::get(ExecState&amp; execState, IDBKeyRange* keyRange)
</span><span class="lines">@@ -238,9 +238,45 @@
</span><span class="cx">     if (!keyRangeData.isValid())
</span><span class="cx">         return Exception { IDBDatabaseException::DataError };
</span><span class="cx"> 
</span><del>-    return m_transaction.requestGetRecord(execState, *this, { keyRangeData });
</del><ins>+    return m_transaction.requestGetRecord(execState, *this, { keyRangeData, IDBGetRecordDataType::KeyAndValue });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; IDBObjectStore::getKey(ExecState&amp; execState, JSValue key)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::getKey&quot;);
+    ASSERT(currentThread() == m_transaction.database().originThreadID());
+
+    if (m_deleted)
+        return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBObjectStore': The object store has been deleted.&quot;) };
+
+    if (!m_transaction.isActive())
+        return Exception { IDBDatabaseException::TransactionInactiveError, ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBObjectStore': The transaction is inactive or finished.&quot;) };
+
+    auto idbKey = scriptValueToIDBKey(execState, key);
+    if (!idbKey-&gt;isValid())
+        return Exception { IDBDatabaseException::DataError, ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBObjectStore': The parameter is not a valid key.&quot;) };
+
+    return m_transaction.requestGetRecord(execState, *this, { idbKey.ptr(), IDBGetRecordDataType::KeyOnly });
+}
+
+ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; IDBObjectStore::getKey(ExecState&amp; execState, IDBKeyRange* keyRange)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::getKey&quot;);
+    ASSERT(currentThread() == m_transaction.database().originThreadID());
+
+    if (m_deleted)
+        return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBObjectStore': The object store has been deleted.&quot;) };
+
+    if (!m_transaction.isActive())
+        return Exception { IDBDatabaseException::TransactionInactiveError, ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBObjectStore': The transaction is inactive or finished.&quot;) };
+
+    IDBKeyRangeData keyRangeData(keyRange);
+    if (!keyRangeData.isValid())
+        return Exception { IDBDatabaseException::DataError, ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBObjectStore': The parameter is not a valid key range.&quot;) };
+
+    return m_transaction.requestGetRecord(execState, *this, { keyRangeData, IDBGetRecordDataType::KeyOnly });
+}
+
</ins><span class="cx"> ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; IDBObjectStore::add(ExecState&amp; execState, JSValue value, JSValue key)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;IDBKey&gt; idbKey;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -77,6 +77,8 @@
</span><span class="cx">     ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; openKeyCursor(JSC::ExecState&amp;, JSC::JSValue key, const String&amp; direction);
</span><span class="cx">     ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; get(JSC::ExecState&amp;, JSC::JSValue key);
</span><span class="cx">     ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; get(JSC::ExecState&amp;, IDBKeyRange*);
</span><ins>+    ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; getKey(JSC::ExecState&amp;, JSC::JSValue key);
+    ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; getKey(JSC::ExecState&amp;, IDBKeyRange*);
</ins><span class="cx">     ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; add(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key);
</span><span class="cx">     ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; put(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key);
</span><span class="cx">     ExceptionOr&lt;Ref&lt;IDBRequest&gt;&gt; deleteFunction(JSC::ExecState&amp;, IDBKeyRange*);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -42,6 +42,8 @@
</span><span class="cx">     [CallWith=ScriptState, ImplementedAs=deleteFunction, MayThrowException] IDBRequest delete(any key);
</span><span class="cx">     [CallWith=ScriptState, MayThrowException] IDBRequest get(IDBKeyRange? key);
</span><span class="cx">     [CallWith=ScriptState, MayThrowException] IDBRequest get(any key);
</span><ins>+    [CallWith=ScriptState, MayThrowException] IDBRequest getKey(IDBKeyRange? key);
+    [CallWith=ScriptState, MayThrowException] IDBRequest getKey(any key);
</ins><span class="cx">     [CallWith=ScriptState, MayThrowException] IDBRequest clear();
</span><span class="cx">     [CallWith=ScriptState, MayThrowException] IDBRequest openCursor(optional IDBKeyRange? range = null, optional DOMString direction = &quot;next&quot;);
</span><span class="cx">     [CallWith=ScriptState, MayThrowException] IDBRequest openCursor(any key, optional DOMString direction = &quot;next&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -68,6 +68,11 @@
</span><span class="cx">     return adoptRef(*new IDBRequest(context, index, transaction));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;IDBRequest&gt; IDBRequest::createObjectStoreGet(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IndexedDB::ObjectStoreRecordType type, IDBTransaction&amp; transaction)
+{
+    return adoptRef(*new IDBRequest(context, objectStore, type, transaction));
+}
+
</ins><span class="cx"> Ref&lt;IDBRequest&gt; IDBRequest::createIndexGet(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType requestedRecordType, IDBTransaction&amp; transaction)
</span><span class="cx"> {
</span><span class="cx">     return adoptRef(*new IDBRequest(context, index, requestedRecordType, transaction));
</span><span class="lines">@@ -115,6 +120,17 @@
</span><span class="cx">     suspendIfNeeded();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IndexedDB::ObjectStoreRecordType type, IDBTransaction&amp; transaction)
+    : IDBActiveDOMObject(&amp;context)
+    , m_transaction(&amp;transaction)
+    , m_resourceIdentifier(transaction.connectionProxy())
+    , m_objectStoreSource(&amp;objectStore)
+    , m_requestedObjectStoreRecordType(type)
+    , m_connectionProxy(transaction.database().connectionProxy())
+{
+    suspendIfNeeded();
+}
+
</ins><span class="cx"> IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType requestedRecordType, IDBTransaction&amp; transaction)
</span><span class="cx">     : IDBRequest(context, index, transaction)
</span><span class="cx"> {
</span><span class="lines">@@ -198,6 +214,13 @@
</span><span class="cx">     return m_indexSource-&gt;info().identifier();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IndexedDB::ObjectStoreRecordType IDBRequest::requestedObjectStoreRecordType() const
+{
+    ASSERT(currentThread() == originThreadID());
+
+    return m_requestedObjectStoreRecordType;
+}
+
</ins><span class="cx"> IndexedDB::IndexRecordType IDBRequest::requestedIndexRecordType() const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(currentThread() == originThreadID());
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx">     static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBTransaction&amp;);
</span><span class="cx">     static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext&amp;, IDBCursor&amp;, IDBTransaction&amp;);
</span><span class="cx">     static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext&amp;, IDBIndex&amp;, IDBTransaction&amp;);
</span><ins>+    static Ref&lt;IDBRequest&gt; createObjectStoreGet(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IndexedDB::ObjectStoreRecordType, IDBTransaction&amp;);
</ins><span class="cx">     static Ref&lt;IDBRequest&gt; createIndexGet(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, IDBTransaction&amp;);
</span><span class="cx"> 
</span><span class="cx">     const IDBResourceIdentifier&amp; resourceIdentifier() const { return m_resourceIdentifier; }
</span><span class="lines">@@ -80,6 +81,7 @@
</span><span class="cx"> 
</span><span class="cx">     uint64_t sourceObjectStoreIdentifier() const;
</span><span class="cx">     uint64_t sourceIndexIdentifier() const;
</span><ins>+    IndexedDB::ObjectStoreRecordType requestedObjectStoreRecordType() const;
</ins><span class="cx">     IndexedDB::IndexRecordType requestedIndexRecordType() const;
</span><span class="cx"> 
</span><span class="cx">     ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
</span><span class="lines">@@ -132,6 +134,7 @@
</span><span class="cx">     IDBRequest(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBTransaction&amp;);
</span><span class="cx">     IDBRequest(ScriptExecutionContext&amp;, IDBCursor&amp;, IDBTransaction&amp;);
</span><span class="cx">     IDBRequest(ScriptExecutionContext&amp;, IDBIndex&amp;, IDBTransaction&amp;);
</span><ins>+    IDBRequest(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IndexedDB::ObjectStoreRecordType, IDBTransaction&amp;);
</ins><span class="cx">     IDBRequest(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, IDBTransaction&amp;);
</span><span class="cx"> 
</span><span class="cx">     void clearResult();
</span><span class="lines">@@ -168,7 +171,8 @@
</span><span class="cx">     RefPtr&lt;IDBCursor&gt; m_cursorSource;
</span><span class="cx"> 
</span><span class="cx">     bool m_hasPendingActivity { true };
</span><del>-    IndexedDB::IndexRecordType m_requestedIndexRecordType;
</del><ins>+    IndexedDB::ObjectStoreRecordType m_requestedObjectStoreRecordType { IndexedDB::ObjectStoreRecordType::ValueOnly };
+    IndexedDB::IndexRecordType m_requestedIndexRecordType { IndexedDB::IndexRecordType::Key };
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;IDBCursor&gt; m_pendingCursor;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -952,7 +952,9 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT_UNUSED(state, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;state));
</span><span class="cx"> 
</span><del>-    auto request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</del><ins>+    IndexedDB::ObjectStoreRecordType type = getRecordData.type == IDBGetRecordDataType::KeyAndValue ? IndexedDB::ObjectStoreRecordType::ValueOnly : IndexedDB::ObjectStoreRecordType::KeyOnly;
+
+    auto request = IDBRequest::createObjectStoreGet(*scriptExecutionContext(), objectStore, type, *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, getRecordData));
</span><span class="lines">@@ -988,7 +990,7 @@
</span><span class="cx">     auto request = IDBRequest::createIndexGet(*scriptExecutionContext(), index, type, *this);
</span><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><del>-    IDBGetRecordData getRecordData = { range };
</del><ins>+    IDBGetRecordData getRecordData = { range, IDBGetRecordDataType::KeyAndValue };
</ins><span class="cx">     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, getRecordData));
</span><span class="cx"> 
</span><span class="cx">     return request;
</span><span class="lines">@@ -1014,9 +1016,13 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(resultData.type() == IDBResultType::GetRecordSuccess);
</span><span class="cx"> 
</span><ins>+    bool useResultKey = request.sourceIndexIdentifier() &amp;&amp; request.requestedIndexRecordType() == IndexedDB::IndexRecordType::Key;
+    if (!useResultKey)
+        useResultKey = request.requestedObjectStoreRecordType() == IndexedDB::ObjectStoreRecordType::KeyOnly;
+
</ins><span class="cx">     const IDBGetResult&amp; result = resultData.getResult();
</span><span class="cx"> 
</span><del>-    if (request.sourceIndexIdentifier() &amp;&amp; request.requestedIndexRecordType() == IndexedDB::IndexRecordType::Key) {
</del><ins>+    if (useResultKey) {
</ins><span class="cx">         if (!result.keyData().isNull())
</span><span class="cx">             request.setResult(result.keyData());
</span><span class="cx">         else
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIndexedDBh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -74,6 +74,11 @@
</span><span class="cx">     Value,
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum class ObjectStoreRecordType {
+    ValueOnly,
+    KeyOnly,
+};
+
</ins><span class="cx"> // In order of the least to the highest precedent in terms of sort order.
</span><span class="cx"> enum KeyType {
</span><span class="cx">     Max = -1,
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx"> class IDBValue;
</span><span class="cx"> class ThreadSafeDataBuffer;
</span><span class="cx"> 
</span><ins>+enum class IDBGetRecordDataType;
+
</ins><span class="cx"> struct IDBGetAllRecordsData;
</span><span class="cx"> struct IDBIterateCursorData;
</span><span class="cx"> struct IDBKeyRangeData;
</span><span class="lines">@@ -80,7 +82,7 @@
</span><span class="cx">     virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) = 0;
</span><span class="cx">     virtual IDBError deleteRange(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;) = 0;
</span><span class="cx">     virtual IDBError addRecord(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;, const IDBKeyData&amp;, const IDBValue&amp;) = 0;
</span><del>-    virtual IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IDBGetResult&amp; outValue) = 0;
</del><ins>+    virtual IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IDBGetRecordDataType, IDBGetResult&amp; outValue) = 0;
</ins><span class="cx">     virtual IDBError getAllRecords(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBGetAllRecordsData&amp;, IDBGetAllResult&amp; outValue) = 0;
</span><span class="cx">     virtual IDBError getIndexRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;, IDBGetResult&amp; outValue) = 0;
</span><span class="cx">     virtual IDBError getCount(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;, uint64_t&amp; outCount) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IDBCursorInfo.h&quot;
</span><span class="cx"> #include &quot;IDBGetAllRecordsData.h&quot;
</span><ins>+#include &quot;IDBGetRecordData.h&quot;
</ins><span class="cx"> #include &quot;IDBGetResult.h&quot;
</span><span class="cx"> #include &quot;IDBIndexInfo.h&quot;
</span><span class="cx"> #include &quot;IDBIterateCursorData.h&quot;
</span><span class="lines">@@ -350,7 +351,7 @@
</span><span class="cx">     return objectStore-&gt;addRecord(*transaction, keyData, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError MemoryIDBBackingStore::getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; range, IDBGetResult&amp; outValue)
</del><ins>+IDBError MemoryIDBBackingStore::getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; range, IDBGetRecordDataType type, IDBGetResult&amp; outValue)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::getRecord&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -363,7 +364,15 @@
</span><span class="cx">     if (!objectStore)
</span><span class="cx">         return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;No backing store object store found&quot;) };
</span><span class="cx"> 
</span><del>-    outValue = objectStore-&gt;valueForKeyRange(range);
</del><ins>+    switch (type) {
+    case IDBGetRecordDataType::KeyAndValue:
+        outValue = objectStore-&gt;valueForKeyRange(range);
+        break;
+    case IDBGetRecordDataType::KeyOnly:
+        outValue = objectStore-&gt;lowestKeyWithRecordInRange(range);
+        break;
+    }
+
</ins><span class="cx">     return { };
</span><span class="cx"> }
</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 (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) final;
</span><span class="cx">     IDBError deleteRange(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;) final;
</span><span class="cx">     IDBError addRecord(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;, const IDBKeyData&amp;, const IDBValue&amp;) final;
</span><del>-    IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IDBGetResult&amp; outValue) final;
</del><ins>+    IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IDBGetRecordDataType, IDBGetResult&amp; outValue) final;
</ins><span class="cx">     IDBError getAllRecords(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBGetAllRecordsData&amp;, IDBGetAllResult&amp; outValue) final;
</span><span class="cx">     IDBError getIndexRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;, IDBGetResult&amp; outValue) final;
</span><span class="cx">     IDBError getCount(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;, uint64_t&amp; outCount) final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx"> 
</span><span class="cx">     ThreadSafeDataBuffer valueForKey(const IDBKeyData&amp;) const;
</span><span class="cx">     ThreadSafeDataBuffer valueForKeyRange(const IDBKeyRangeData&amp;) const;
</span><ins>+    IDBKeyData lowestKeyWithRecordInRange(const IDBKeyRangeData&amp;) const;
</ins><span class="cx">     IDBGetResult indexValueForKeyRange(uint64_t indexIdentifier, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;) const;
</span><span class="cx">     uint64_t countForKeyRange(uint64_t indexIdentifier, const IDBKeyRangeData&amp;) const;
</span><span class="cx"> 
</span><span class="lines">@@ -106,7 +107,6 @@
</span><span class="cx"> private:
</span><span class="cx">     MemoryObjectStore(const IDBObjectStoreInfo&amp;);
</span><span class="cx"> 
</span><del>-    IDBKeyData lowestKeyWithRecordInRange(const IDBKeyRangeData&amp;) const;
</del><span class="cx">     std::set&lt;IDBKeyData&gt;::iterator lowestIteratorInRange(const IDBKeyRangeData&amp;, bool reverse) const;
</span><span class="cx"> 
</span><span class="cx">     IDBError populateIndexWithExistingRecords(MemoryIndex&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;IDBDatabaseException.h&quot;
</span><span class="cx"> #include &quot;IDBGetAllRecordsData.h&quot;
</span><span class="cx"> #include &quot;IDBGetAllResult.h&quot;
</span><ins>+#include &quot;IDBGetRecordData.h&quot;
</ins><span class="cx"> #include &quot;IDBGetResult.h&quot;
</span><span class="cx"> #include &quot;IDBIterateCursorData.h&quot;
</span><span class="cx"> #include &quot;IDBKeyData.h&quot;
</span><span class="lines">@@ -1785,7 +1786,7 @@
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError SQLiteIDBBackingStore::getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreID, const IDBKeyRangeData&amp; keyRange, IDBGetResult&amp; resultValue)
</del><ins>+IDBError SQLiteIDBBackingStore::getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreID, const IDBKeyRangeData&amp; keyRange, IDBGetRecordDataType type, IDBGetResult&amp; resultValue)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;SQLiteIDBBackingStore::getRecord - key range %s, object store %&quot; PRIu64, keyRange.loggingString().utf8().data(), objectStoreID);
</span><span class="cx"> 
</span><span class="lines">@@ -1824,17 +1825,39 @@
</span><span class="cx">         static NeverDestroyed&lt;ASCIILiteral&gt; lowerClosedUpperOpen(&quot;SELECT value, ROWID FROM Records WHERE objectStoreID = ? AND key &gt;= CAST(? AS TEXT) AND key &lt; CAST(? AS TEXT) ORDER BY key;&quot;);
</span><span class="cx">         static NeverDestroyed&lt;ASCIILiteral&gt; lowerClosedUpperClosed(&quot;SELECT value, ROWID FROM Records WHERE objectStoreID = ? AND key &gt;= CAST(? AS TEXT) AND key &lt;= CAST(? AS TEXT) ORDER BY key;&quot;);
</span><span class="cx"> 
</span><ins>+        static NeverDestroyed&lt;ASCIILiteral&gt; lowerOpenUpperOpenKeyOnly(&quot;SELECT key FROM Records WHERE objectStoreID = ? AND key &gt; CAST(? AS TEXT) AND key &lt; CAST(? AS TEXT) ORDER BY key;&quot;);
+        static NeverDestroyed&lt;ASCIILiteral&gt; lowerOpenUpperClosedKeyOnly(&quot;SELECT key FROM Records WHERE objectStoreID = ? AND key &gt; CAST(? AS TEXT) AND key &lt;= CAST(? AS TEXT) ORDER BY key;&quot;);
+        static NeverDestroyed&lt;ASCIILiteral&gt; lowerClosedUpperOpenKeyOnly(&quot;SELECT key FROM Records WHERE objectStoreID = ? AND key &gt;= CAST(? AS TEXT) AND key &lt; CAST(? AS TEXT) ORDER BY key;&quot;);
+        static NeverDestroyed&lt;ASCIILiteral&gt; lowerClosedUpperClosedKeyOnly(&quot;SELECT key FROM Records WHERE objectStoreID = ? AND key &gt;= CAST(? AS TEXT) AND key &lt;= CAST(? AS TEXT) ORDER BY key;&quot;);
+
</ins><span class="cx">         SQLiteStatement* sql = nullptr;
</span><del>-        if (keyRange.lowerOpen) {
-            if (keyRange.upperOpen)
-                sql = cachedStatement(SQL::GetValueRecordsLowerOpenUpperOpen, lowerOpenUpperOpen.get());
-            else
-                sql = cachedStatement(SQL::GetValueRecordsLowerOpenUpperClosed, lowerOpenUpperClosed.get());
-        } else {
-            if (keyRange.upperOpen)
-                sql = cachedStatement(SQL::GetValueRecordsLowerClosedUpperOpen, lowerClosedUpperOpen.get());
-            else
-                sql = cachedStatement(SQL::GetValueRecordsLowerClosedUpperClosed, lowerClosedUpperClosed.get());
</del><ins>+
+        switch (type) {
+        case IDBGetRecordDataType::KeyAndValue:
+            if (keyRange.lowerOpen) {
+                if (keyRange.upperOpen)
+                    sql = cachedStatement(SQL::GetValueRecordsLowerOpenUpperOpen, lowerOpenUpperOpen.get());
+                else
+                    sql = cachedStatement(SQL::GetValueRecordsLowerOpenUpperClosed, lowerOpenUpperClosed.get());
+            } else {
+                if (keyRange.upperOpen)
+                    sql = cachedStatement(SQL::GetValueRecordsLowerClosedUpperOpen, lowerClosedUpperOpen.get());
+                else
+                    sql = cachedStatement(SQL::GetValueRecordsLowerClosedUpperClosed, lowerClosedUpperClosed.get());
+            }
+            break;
+        case IDBGetRecordDataType::KeyOnly:
+            if (keyRange.lowerOpen) {
+                if (keyRange.upperOpen)
+                    sql = cachedStatement(SQL::GetKeyRecordsLowerOpenUpperOpen, lowerOpenUpperOpenKeyOnly.get());
+                else
+                    sql = cachedStatement(SQL::GetKeyRecordsLowerOpenUpperClosed, lowerOpenUpperClosedKeyOnly.get());
+            } else {
+                if (keyRange.upperOpen)
+                    sql = cachedStatement(SQL::GetKeyRecordsLowerClosedUpperOpen, lowerClosedUpperOpenKeyOnly.get());
+                else
+                    sql = cachedStatement(SQL::GetKeyRecordsLowerClosedUpperClosed, lowerClosedUpperClosedKeyOnly.get());
+            }
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!sql
</span><span class="lines">@@ -1861,9 +1884,27 @@
</span><span class="cx">         sql-&gt;getColumnBlobAsVector(0, buffer);
</span><span class="cx">         resultBuffer = ThreadSafeDataBuffer::adoptVector(buffer);
</span><span class="cx"> 
</span><del>-        recordID = sql-&gt;getColumnInt64(1);
</del><ins>+        if (type == IDBGetRecordDataType::KeyAndValue)
+            recordID = sql-&gt;getColumnInt64(1);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (type == IDBGetRecordDataType::KeyOnly) {
+        auto* vector = resultBuffer.data();
+        if (!vector) {
+            LOG_ERROR(&quot;Unable to deserialize key data from database for IDBObjectStore.getKey()&quot;);
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Error extracting key data from database executing IDBObjectStore.getKey()&quot;) };
+        }
+
+        IDBKeyData keyData;
+        if (!deserializeIDBKeyData(vector-&gt;data(), vector-&gt;size(), keyData)) {
+            LOG_ERROR(&quot;Unable to deserialize key data from database for IDBObjectStore.getKey()&quot;);
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Error extracting key data from database executing IDBObjectStore.getKey()&quot;) };
+        }
+
+        resultValue = { keyData };
+        return { };
+    }
+
</ins><span class="cx">     ASSERT(recordID);
</span><span class="cx">     Vector&lt;String&gt; blobURLs, blobFilePaths;
</span><span class="cx">     auto error = getBlobRecordsForObjectStoreRecord(recordID, blobURLs, blobFilePaths);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">     IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) final;
</span><span class="cx">     IDBError deleteRange(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;) final;
</span><span class="cx">     IDBError addRecord(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBObjectStoreInfo&amp;, const IDBKeyData&amp;, const IDBValue&amp;) final;
</span><del>-    IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IDBGetResult&amp; outValue) final;
</del><ins>+    IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IDBGetRecordDataType, IDBGetResult&amp; outValue) final;
</ins><span class="cx">     IDBError getAllRecords(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBGetAllRecordsData&amp;, IDBGetAllResult&amp; outValue) final;
</span><span class="cx">     IDBError getIndexRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;, IDBGetResult&amp; outValue) final;
</span><span class="cx">     IDBError getCount(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;, uint64_t&amp; outCount) final;
</span><span class="lines">@@ -159,6 +159,10 @@
</span><span class="cx">         GetValueRecordsLowerOpenUpperClosed,
</span><span class="cx">         GetValueRecordsLowerClosedUpperOpen,
</span><span class="cx">         GetValueRecordsLowerClosedUpperClosed,
</span><ins>+        GetKeyRecordsLowerOpenUpperOpen,
+        GetKeyRecordsLowerOpenUpperClosed,
+        GetKeyRecordsLowerClosedUpperOpen,
+        GetKeyRecordsLowerClosedUpperClosed,
</ins><span class="cx">         Count
</span><span class="cx">     };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -1051,7 +1051,7 @@
</span><span class="cx">     if (uint64_t indexIdentifier = requestData.indexIdentifier())
</span><span class="cx">         postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performGetIndexRecord, callbackID, requestData.transactionIdentifier(), requestData.objectStoreIdentifier(), indexIdentifier, requestData.indexRecordType(), getRecordData.keyRangeData));
</span><span class="cx">     else
</span><del>-        postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performGetRecord, callbackID, requestData.transactionIdentifier(), requestData.objectStoreIdentifier(), getRecordData.keyRangeData));
</del><ins>+        postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performGetRecord, callbackID, requestData.transactionIdentifier(), requestData.objectStoreIdentifier(), getRecordData.keyRangeData, getRecordData.type));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::getAllRecords(const IDBRequestData&amp; requestData, const IDBGetAllRecordsData&amp; getAllRecordsData, GetAllResultsCallback callback)
</span><span class="lines">@@ -1066,7 +1066,7 @@
</span><span class="cx">     postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performGetAllRecords, callbackID, requestData.transactionIdentifier(), getAllRecordsData));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; keyRangeData)
</del><ins>+void UniqueIDBDatabase::performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; keyRangeData, IDBGetRecordDataType type)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(db) UniqueIDBDatabase::performGetRecord&quot;);
</span><span class="lines">@@ -1074,7 +1074,7 @@
</span><span class="cx">     ASSERT(m_backingStore);
</span><span class="cx"> 
</span><span class="cx">     IDBGetResult result;
</span><del>-    IDBError error = m_backingStore-&gt;getRecord(transactionIdentifier, objectStoreIdentifier, keyRangeData, result);
</del><ins>+    IDBError error = m_backingStore-&gt;getRecord(transactionIdentifier, objectStoreIdentifier, keyRangeData, type, result);
</ins><span class="cx"> 
</span><span class="cx">     postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformGetRecord, 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 (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -57,6 +57,8 @@
</span><span class="cx"> class IDBRequestData;
</span><span class="cx"> class IDBTransactionInfo;
</span><span class="cx"> 
</span><ins>+enum class IDBGetRecordDataType;
+
</ins><span class="cx"> namespace IndexedDB {
</span><span class="cx"> enum class IndexRecordType;
</span><span class="cx"> }
</span><span class="lines">@@ -156,7 +158,7 @@
</span><span class="cx">     void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier);
</span><span class="cx">     void performRenameIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const String&amp; newName);
</span><span class="cx">     void performPutOrAdd(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const IDBValue&amp;, IndexedDB::ObjectStoreOverwriteMode);
</span><del>-    void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;);
</del><ins>+    void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IDBGetRecordDataType);
</ins><span class="cx">     void performGetAllRecords(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBGetAllRecordsData&amp;);
</span><span class="cx">     void performGetIndexRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;);
</span><span class="cx">     void performGetCount(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBGetRecordDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> IDBGetRecordData IDBGetRecordData::isolatedCopy() const
</span><span class="cx"> {
</span><del>-    return { keyRangeData.isolatedCopy() };
</del><ins>+    return { keyRangeData.isolatedCopy(), type };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBGetRecordDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h (209196 => 209197)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h        2016-12-01 21:23:27 UTC (rev 209196)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h        2016-12-01 21:33:17 UTC (rev 209197)
</span><span class="lines">@@ -31,8 +31,14 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+enum class IDBGetRecordDataType {
+    KeyOnly,
+    KeyAndValue,
+};
+
</ins><span class="cx"> struct IDBGetRecordData {
</span><span class="cx">     IDBKeyRangeData keyRangeData;
</span><ins>+    IDBGetRecordDataType type;
</ins><span class="cx"> 
</span><span class="cx">     IDBGetRecordData isolatedCopy() const;
</span><span class="cx"> 
</span><span class="lines">@@ -44,6 +50,7 @@
</span><span class="cx"> void IDBGetRecordData::encode(Encoder&amp; encoder) const
</span><span class="cx"> {
</span><span class="cx">     encoder &lt;&lt; keyRangeData;
</span><ins>+    encoder.encodeEnum(type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;class Decoder&gt;
</span><span class="lines">@@ -52,6 +59,9 @@
</span><span class="cx">     if (!decoder.decode(getRecordData.keyRangeData))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    if (!decoder.decodeEnum(getRecordData.type))
+        return false;
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>