<!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>[191832] 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/191832">191832</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-10-30 17:17:49 -0700 (Fri, 30 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: Support IDBObjectStore.get() for IDBKeyRanges.
https://bugs.webkit.org/show_bug.cgi?id=150718

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/get-keyrange.html

* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::IDBKeyRangeData):
* Modules/indexeddb/IDBKeyRangeData.h:

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

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::get):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::requestGetRecord):
(WebCore::IDBClient::IDBTransaction::getRecordOnServer):
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/server/IDBBackingStore.h:

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

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):

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

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::deleteRecord):
(WebCore::IDBServer::MemoryObjectStore::setKeyValue):
(WebCore::IDBServer::MemoryObjectStore::valueForKeyRange): Using a std::set, find the appropriate
  key in the range, and return the value if one exists.
(WebCore::IDBServer::MemoryObjectStore::valueForKey): Deleted.
* Modules/indexeddb/server/MemoryObjectStore.h:

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

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

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

LayoutTests:

* storage/indexeddb/modern/get-keyrange.html: Added.
* storage/indexeddb/modern/get-keyrange-expected.txt: 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="#trunkSourceWebCoreModulesindexeddbIDBKeyRangeDatacpp">trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyRangeDatah">trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.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="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.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="#trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp</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="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.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>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderngetkeyrangeexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderngetkeyrangehtml">trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/LayoutTests/ChangeLog        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2015-10-30  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Modern IDB: Support IDBObjectStore.get() for IDBKeyRanges.
+        https://bugs.webkit.org/show_bug.cgi?id=150718
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/get-keyrange.html: Added.
+        * storage/indexeddb/modern/get-keyrange-expected.txt: Added.
+
+2015-10-30  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         Modern IDB: IDBObjectStore.clear() support.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=150733
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderngetkeyrangeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt (0 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -0,0 +1,103 @@
</span><ins>+ALERT: Initial upgrade needed: Old version - 0 New version - 1
+ALERT: Initial upgrade versionchange transaction complete
+ALERT: Success getting keyRange [-1 (Closed), undefined (Open)]
+ALERT: Result is &quot;0&quot;
+ALERT: Success getting keyRange [-1 (Open), undefined (Open)]
+ALERT: Result is &quot;0&quot;
+ALERT: Success getting keyRange [0 (Closed), undefined (Open)]
+ALERT: Result is &quot;0&quot;
+ALERT: Success getting keyRange [0 (Open), undefined (Open)]
+ALERT: Result is &quot;1&quot;
+ALERT: Success getting keyRange [0.1 (Closed), undefined (Open)]
+ALERT: Result is &quot;1&quot;
+ALERT: Success getting keyRange [0.1 (Open), undefined (Open)]
+ALERT: Result is &quot;1&quot;
+ALERT: Success getting keyRange [99 (Closed), undefined (Open)]
+ALERT: Result is &quot;99&quot;
+ALERT: Success getting keyRange [99 (Open), undefined (Open)]
+ALERT: Result is PosInf
+ALERT: Success getting keyRange [99.1 (Closed), undefined (Open)]
+ALERT: Result is PosInf
+ALERT: Success getting keyRange [99.1 (Open), undefined (Open)]
+ALERT: Result is PosInf
+ALERT: Success getting keyRange [undefined (Open), 100 (Closed)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 100 (Open)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 99 (Closed)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 99 (Open)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 98.99999 (Closed)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 98.99999 (Open)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 98 (Closed)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 98 (Open)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 0 (Closed)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), 0 (Open)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), -0.1 (Closed)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [undefined (Open), -0.1 (Open)]
+ALERT: Result is NegInf
+ALERT: Success getting keyRange [2.5 (Closed), 3.5 (Closed)]
+ALERT: Result is &quot;3&quot;
+ALERT: Success getting keyRange [-0.5 (Closed), 0.5 (Closed)]
+ALERT: Result is &quot;0&quot;
+ALERT: Success getting keyRange [98.5 (Closed), 99.5 (Closed)]
+ALERT: Result is &quot;99&quot;
+ALERT: Success getting keyRange [-1 (Closed), 0 (Closed)]
+ALERT: Result is &quot;0&quot;
+ALERT: Success getting keyRange [-1 (Open), 0 (Closed)]
+ALERT: Result is &quot;0&quot;
+ALERT: Success getting keyRange [-1 (Closed), 0 (Open)]
+ALERT: Result is undefined
+ALERT: Success getting keyRange [-1 (Open), 0 (Open)]
+ALERT: Result is undefined
+ALERT: Success getting keyRange [3 (Closed), 4 (Closed)]
+ALERT: Result is &quot;3&quot;
+ALERT: Success getting keyRange [3 (Open), 4 (Closed)]
+ALERT: Result is &quot;4&quot;
+ALERT: Success getting keyRange [3 (Closed), 4 (Open)]
+ALERT: Result is &quot;3&quot;
+ALERT: Success getting keyRange [3 (Open), 4 (Open)]
+ALERT: Result is undefined
+ALERT: Success getting keyRange [99 (Closed), 100 (Closed)]
+ALERT: Result is &quot;99&quot;
+ALERT: Success getting keyRange [99 (Open), 100 (Closed)]
+ALERT: Result is undefined
+ALERT: Success getting keyRange [99 (Closed), 100 (Open)]
+ALERT: Result is &quot;99&quot;
+ALERT: Success getting keyRange [99 (Open), 100 (Open)]
+ALERT: Result is undefined
+ALERT: Success getting keyRange [Infinity (Closed), a (Closed)]
+ALERT: Result is PosInf
+ALERT: Success getting keyRange [Infinity (Open), a (Closed)]
+ALERT: Result is A
+ALERT: Success getting keyRange [Infinity (Closed), a (Open)]
+ALERT: Result is PosInf
+ALERT: Success getting keyRange [Infinity (Open), a (Open)]
+ALERT: Result is A
+ALERT: Success getting keyRange [AS (Closed), a (Closed)]
+ALERT: Result is AS
+ALERT: Success getting keyRange [AS (Open), a (Closed)]
+ALERT: Result is As
+ALERT: Success getting keyRange [AS (Closed), a (Open)]
+ALERT: Result is AS
+ALERT: Success getting keyRange [AS (Open), a (Open)]
+ALERT: Result is As
+ALERT: Success getting keyRange [Infinity (Closed),  (Closed)]
+ALERT: Result is PosInf
+ALERT: Success getting keyRange [Infinity (Open),  (Closed)]
+ALERT: Result is A
+ALERT: Success getting keyRange [Infinity (Closed),  (Open)]
+ALERT: Result is PosInf
+ALERT: Success getting keyRange [Infinity (Open),  (Open)]
+ALERT: Result is A
+ALERT: readonly transaction complete
+ALERT: Done
+This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderngetkeyrangehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html (0 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -0,0 +1,147 @@
</span><ins>+This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.
+&lt;script&gt;
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    alert(&quot;Done&quot;);
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+var createRequest = window.indexedDB.open(&quot;GetKeyRangeDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    for (var i = 0; i &lt; 100; ++i)
+        objectStore.put(&quot;\&quot;&quot; + i + &quot;\&quot;&quot;, i);
+
+    objectStore.put(&quot;PosInf&quot;, Infinity);
+    objectStore.put(&quot;NegInf&quot;, -Infinity);
+
+    objectStore.put(&quot;A&quot;, &quot;A&quot;);
+    objectStore.put(&quot;As&quot;, &quot;As&quot;);
+    objectStore.put(&quot;AS&quot;, &quot;AS&quot;);
+    objectStore.put(&quot;a&quot;, &quot;a&quot;);
+
+    objectStore.put(&quot;array 1&quot;, [1, &quot;hello&quot;]);
+    objectStore.put(&quot;array 2&quot;, [2, &quot;goodbye&quot;]);
+    objectStore.put(&quot;array 3&quot;, []);
+
+    versionTransaction.onabort = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+var objectStore;
+
+function testGet(keyRange) {
+    var request = objectStore.get(keyRange);
+    request.onsuccess = function()
+    {
+        alert(&quot;Success getting keyRange [&quot; + keyRange.lower + &quot; (&quot; + (keyRange.lowerOpen ? &quot;Open&quot; : &quot;Closed&quot;) + &quot;), &quot; + keyRange.upper + &quot; (&quot; + (keyRange.upperOpen ? &quot;Open&quot; : &quot;Closed&quot;) + &quot;)]&quot;);
+        alert(&quot;Result is &quot; + request.result);
+    }
+    request.onerror = function()
+    {
+        alert(&quot;Unexpected error getting keyRange [&quot; + keyRange.lower + &quot; (&quot; + keyRange.lowerOpen + &quot;), &quot; + keyRange.upper + &quot; (&quot; + keyRange.upperOpen + &quot;)]&quot;);
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    testGet(IDBKeyRange.lowerBound(-1));
+    testGet(IDBKeyRange.lowerBound(-1, true));
+    testGet(IDBKeyRange.lowerBound(0));
+    testGet(IDBKeyRange.lowerBound(0, true));
+    testGet(IDBKeyRange.lowerBound(0.1));
+    testGet(IDBKeyRange.lowerBound(0.1, true));
+    testGet(IDBKeyRange.lowerBound(99));
+    testGet(IDBKeyRange.lowerBound(99, true));
+    testGet(IDBKeyRange.lowerBound(99.1));
+    testGet(IDBKeyRange.lowerBound(99.1, true));
+    
+    testGet(IDBKeyRange.upperBound(100));
+    testGet(IDBKeyRange.upperBound(100, true));
+    testGet(IDBKeyRange.upperBound(99));
+    testGet(IDBKeyRange.upperBound(99, true));
+    testGet(IDBKeyRange.upperBound(98.99999));
+    testGet(IDBKeyRange.upperBound(98.99999, true));
+    testGet(IDBKeyRange.upperBound(98));
+    testGet(IDBKeyRange.upperBound(98, true));
+    testGet(IDBKeyRange.upperBound(0));
+    testGet(IDBKeyRange.upperBound(0, true));
+    testGet(IDBKeyRange.upperBound(-0.1));
+    testGet(IDBKeyRange.upperBound(-0.1, true));
+    
+    testGet(IDBKeyRange.bound(2.5, 3.5));
+    testGet(IDBKeyRange.bound(-0.5, 0.5));
+    testGet(IDBKeyRange.bound(98.5, 99.5));
+    testGet(IDBKeyRange.bound(-1, 0));
+    testGet(IDBKeyRange.bound(-1, 0, true));
+    testGet(IDBKeyRange.bound(-1, 0, false, true));
+    testGet(IDBKeyRange.bound(-1, 0, true, true));
+    testGet(IDBKeyRange.bound(3, 4));
+    testGet(IDBKeyRange.bound(3, 4, true));
+    testGet(IDBKeyRange.bound(3, 4, false, true));
+    testGet(IDBKeyRange.bound(3, 4, true, true));
+    testGet(IDBKeyRange.bound(99, 100));
+    testGet(IDBKeyRange.bound(99, 100, true));
+    testGet(IDBKeyRange.bound(99, 100, false, true));
+    testGet(IDBKeyRange.bound(99, 100, true, true));
+
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, false, true));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true, true));
+
+    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;));
+    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, true));
+    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, false, true));
+    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, true, true));
+    
+    testGet(IDBKeyRange.bound(Infinity, []));
+    testGet(IDBKeyRange.bound(Infinity, [], true));
+    testGet(IDBKeyRange.bound(Infinity, [], false, true));
+    testGet(IDBKeyRange.bound(Infinity, [], true, true));
+    
+    transaction.onabort = function(event) {
+        alert(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        alert(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        alert(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/ChangeLog        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -1,5 +1,65 @@
</span><span class="cx"> 2015-10-30  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Modern IDB: Support IDBObjectStore.get() for IDBKeyRanges.
+        https://bugs.webkit.org/show_bug.cgi?id=150718
+
+        Reviewed by Alex Christensen.
+
+        Test: storage/indexeddb/modern/get-keyrange.html
+
+        * Modules/indexeddb/IDBKeyRangeData.cpp:
+        (WebCore::IDBKeyRangeData::IDBKeyRangeData):
+        * Modules/indexeddb/IDBKeyRangeData.h:
+        
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        (WebCore::IDBClient::IDBConnectionToServer::getRecord):
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
+        
+        * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
+        (WebCore::IDBClient::IDBObjectStore::get):
+        
+        * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+        (WebCore::IDBClient::IDBTransaction::requestGetRecord):
+        (WebCore::IDBClient::IDBTransaction::getRecordOnServer):
+        * Modules/indexeddb/client/IDBTransactionImpl.h:
+        
+        * Modules/indexeddb/server/IDBBackingStore.h:
+        
+        * Modules/indexeddb/server/IDBServer.cpp:
+        (WebCore::IDBServer::IDBServer::getRecord):
+        * Modules/indexeddb/server/IDBServer.h:
+        
+        * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
+        (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
+        
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+        
+        * Modules/indexeddb/server/MemoryObjectStore.cpp:
+        (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
+        (WebCore::IDBServer::MemoryObjectStore::setKeyValue):
+        (WebCore::IDBServer::MemoryObjectStore::valueForKeyRange): Using a std::set, find the appropriate
+          key in the range, and return the value if one exists.
+        (WebCore::IDBServer::MemoryObjectStore::valueForKey): Deleted.
+        * Modules/indexeddb/server/MemoryObjectStore.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
+        (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
+        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
+        
+        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+        (WebCore::InProcessIDBServer::getRecord):
+        * Modules/indexeddb/shared/InProcessIDBServer.h:
+
+2015-10-30  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         Modern IDB: IDBObjectStore.clear() support.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=150733
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -28,8 +28,28 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBKey.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+IDBKeyRangeData::IDBKeyRangeData(IDBKey* key)
+    : isNull(!key)
+    , lowerKey(key)
+    , upperKey(key)
+    , lowerOpen(false)
+    , upperOpen(false)
+{
+}
+
+IDBKeyRangeData::IDBKeyRangeData(const IDBKeyData&amp; keyData)
+    : isNull(keyData.isNull())
+    , lowerKey(keyData)
+    , upperKey(keyData)
+    , lowerOpen(false)
+    , upperOpen(false)
+{
+}
+
</ins><span class="cx"> IDBKeyRangeData IDBKeyRangeData::isolatedCopy() const
</span><span class="cx"> {
</span><span class="cx">     IDBKeyRangeData result;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class IDBKey;
+
</ins><span class="cx"> struct IDBKeyRangeData {
</span><span class="cx">     IDBKeyRangeData()
</span><span class="cx">         : isNull(true)
</span><span class="lines">@@ -41,6 +43,9 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    IDBKeyRangeData(IDBKey*);
+    IDBKeyRangeData(const IDBKeyData&amp;);
+
</ins><span class="cx">     IDBKeyRangeData(IDBKeyRange* keyRange)
</span><span class="cx">         : isNull(!keyRange)
</span><span class="cx">         , lowerOpen(false)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBKeyRangeData.h&quot;
</ins><span class="cx"> #include &quot;IDBOpenDBRequestImpl.h&quot;
</span><span class="cx"> #include &quot;IDBRequestData.h&quot;
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><span class="lines">@@ -153,14 +154,14 @@
</span><span class="cx">     completeOperation(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBConnectionToServer::getRecord(TransactionOperation&amp; operation, RefPtr&lt;IDBKey&gt;&amp; key)
</del><ins>+void IDBConnectionToServer::getRecord(TransactionOperation&amp; operation, const IDBKeyRangeData&amp; keyRangeData)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBConnectionToServer::getRecord&quot;);
</span><span class="cx"> 
</span><del>-    ASSERT(key);
</del><ins>+    ASSERT(!keyRangeData.isNull);
</ins><span class="cx"> 
</span><span class="cx">     saveOperation(operation);
</span><del>-    m_delegate-&gt;getRecord(IDBRequestData(operation), key.get());
</del><ins>+    m_delegate-&gt;getRecord(IDBRequestData(operation), keyRangeData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBConnectionToServer::didGetRecord(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 (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     void putOrAdd(TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;&amp;, RefPtr&lt;SerializedScriptValue&gt;&amp;, const IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx">     void didPutOrAdd(const IDBResultData&amp;);
</span><span class="cx"> 
</span><del>-    void getRecord(TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;&amp;);
</del><ins>+    void getRecord(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
</ins><span class="cx">     void didGetRecord(const IDBResultData&amp;);
</span><span class="cx"> 
</span><span class="cx">     void commitTransaction(IDBTransaction&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx"> enum class ObjectStoreOverwriteMode;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+struct IDBKeyRangeData;
+
</ins><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span><span class="cx"> class IDBConnectionToServerDelegate {
</span><span class="lines">@@ -58,7 +60,7 @@
</span><span class="cx">     virtual void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName) = 0;
</span><span class="cx">     virtual void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx">     virtual void putOrAdd(const IDBRequestData&amp;, IDBKey*, SerializedScriptValue&amp;, const IndexedDB::ObjectStoreOverwriteMode) = 0;
</span><del>-    virtual void getRecord(const IDBRequestData&amp;, IDBKey*) = 0;
</del><ins>+    virtual void getRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;) = 0;
</ins><span class="cx">     virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;) = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual void databaseConnectionClosed(uint64_t databaseConnectionIdentifier) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> #include &quot;IDBError.h&quot;
</span><span class="cx"> #include &quot;IDBKey.h&quot;
</span><ins>+#include &quot;IDBKeyRangeData.h&quot;
</ins><span class="cx"> #include &quot;IDBRequestImpl.h&quot;
</span><span class="cx"> #include &quot;IDBTransactionImpl.h&quot;
</span><span class="cx"> #include &quot;IndexedDB.h&quot;
</span><span class="lines">@@ -147,13 +148,39 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestGetRecord(*context, *this, *idbKey);
-    return adoptRef(request.leakRef());
</del><ins>+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestGetRecord(*context, *this, idbKey.get());
+    return WTF::move(request);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&amp;)
</del><ins>+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    RELEASE_ASSERT_NOT_REACHED();
</del><ins>+    LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
+
+    if (!context) {
+        ec = INVALID_STATE_ERR;
+        return nullptr;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::TransactionInactiveError);
+        return nullptr;
+    }
+
+    if (m_deleted) {
+        ec = INVALID_STATE_ERR;
+        return nullptr;
+    }
+
+    IDBKeyRangeData keyRangeData(keyRange);
+    if (keyRangeData.isNull
+        || (!keyRangeData.lowerKey.isValid() &amp;&amp; !keyRangeData.lowerKey.isNull())
+        || (!keyRangeData.upperKey.isValid() &amp;&amp; !keyRangeData.upperKey.isNull())) {
+        ec = static_cast&lt;ExceptionCode&gt;(IDBExceptionCode::DataError);
+        return nullptr;
+    }
+
+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestGetRecord(*context, *this, keyRangeData);
+    return WTF::move(request);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::add(JSC::ExecState&amp; execState, Deprecated::ScriptValue&amp; value, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;IDBDatabaseImpl.h&quot;
</span><span class="cx"> #include &quot;IDBError.h&quot;
</span><span class="cx"> #include &quot;IDBEventDispatcher.h&quot;
</span><ins>+#include &quot;IDBKeyRangeData.h&quot;
</ins><span class="cx"> #include &quot;IDBObjectStore.h&quot;
</span><span class="cx"> #include &quot;IDBRequestImpl.h&quot;
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><span class="lines">@@ -385,25 +386,25 @@
</span><span class="cx">     ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::CreateObjectStoreSuccess);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestGetRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBKey&amp; key)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestGetRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; keyRangeData)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestGetRecord&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><del>-    ASSERT(key.isValid());
</del><ins>+    ASSERT(!keyRangeData.isNull);
</ins><span class="cx"> 
</span><span class="cx">     Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
</span><span class="cx"> 
</span><del>-    auto operation = createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, &amp;key);
</del><ins>+    auto operation = createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, keyRangeData);
</ins><span class="cx">     scheduleOperation(WTF::move(operation));
</span><span class="cx"> 
</span><span class="cx">     return WTF::move(request);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBTransaction::getRecordOnServer(TransactionOperation&amp; operation, RefPtr&lt;IDBKey&gt; key)
</del><ins>+void IDBTransaction::getRecordOnServer(TransactionOperation&amp; operation, const IDBKeyRangeData&amp; keyRange)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::getRecordOnServer&quot;);
</span><span class="cx"> 
</span><del>-    serverConnection().getRecord(operation, key);
</del><ins>+    serverConnection().getRecord(operation, keyRange);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBTransaction::didGetRecordOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx"> class IDBObjectStoreInfo;
</span><span class="cx"> class IDBResultData;
</span><span class="cx"> 
</span><ins>+struct IDBKeyRangeData;
+
</ins><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span><span class="cx"> class IDBDatabase;
</span><span class="lines">@@ -88,7 +90,7 @@
</span><span class="cx">     Ref&lt;IDBObjectStore&gt; createObjectStore(const IDBObjectStoreInfo&amp;);
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;IDBRequest&gt; requestPutOrAdd(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBKey*, SerializedScriptValue&amp;, IndexedDB::ObjectStoreOverwriteMode);
</span><del>-    Ref&lt;IDBRequest&gt; requestGetRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBKey&amp;);
</del><ins>+    Ref&lt;IDBRequest&gt; requestGetRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
</ins><span class="cx">     Ref&lt;IDBRequest&gt; requestClearObjectStore(ScriptExecutionContext&amp;, IDBObjectStore&amp;);
</span><span class="cx"> 
</span><span class="cx">     void deleteObjectStore(const String&amp; objectStoreName);
</span><span class="lines">@@ -128,7 +130,7 @@
</span><span class="cx">     void putOrAddOnServer(TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;, RefPtr&lt;SerializedScriptValue&gt;, const IndexedDB::ObjectStoreOverwriteMode&amp;);
</span><span class="cx">     void didPutOrAddOnServer(IDBRequest&amp;, const IDBResultData&amp;);
</span><span class="cx"> 
</span><del>-    void getRecordOnServer(TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;);
</del><ins>+    void getRecordOnServer(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
</ins><span class="cx">     void didGetRecordOnServer(IDBRequest&amp;, const IDBResultData&amp;);
</span><span class="cx"> 
</span><span class="cx">     void deleteObjectStoreOnServer(TransactionOperation&amp;, const String&amp; objectStoreName);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -39,6 +39,8 @@
</span><span class="cx"> class IDBTransactionInfo;
</span><span class="cx"> class ThreadSafeDataBuffer;
</span><span class="cx"> 
</span><ins>+struct IDBKeyRangeData;
+
</ins><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><span class="cx"> class IDBBackingStore {
</span><span class="lines">@@ -57,7 +59,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 deleteRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;) = 0;
</span><span class="cx">     virtual IDBError putRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; value) = 0;
</span><del>-    virtual IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, ThreadSafeDataBuffer&amp; outValue) = 0;
</del><ins>+    virtual IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, ThreadSafeDataBuffer&amp; outValue) = 0;
</ins><span class="cx">     virtual IDBError generateKeyNumber(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t&amp; keyNumber) = 0;
</span><span class="cx"> 
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx">     transaction-&gt;putOrAdd(requestData, keyData, valueData, overwriteMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBServer::getRecord(const IDBRequestData&amp; requestData, const IDBKeyData&amp; keyData)
</del><ins>+void IDBServer::getRecord(const IDBRequestData&amp; requestData, const IDBKeyRangeData&amp; keyRangeData)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBServer::getRecord&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx">     if (!transaction)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    transaction-&gt;getRecord(requestData, keyData);
</del><ins>+    transaction-&gt;getRecord(requestData, keyRangeData);
</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 (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName);
</span><span class="cx">     void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier);
</span><span class="cx">     void putOrAdd(const IDBRequestData&amp;, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><del>-    void getRecord(const IDBRequestData&amp;, const IDBKeyData&amp;);
</del><ins>+    void getRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;);
</ins><span class="cx">     void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;);
</span><span class="cx">     void databaseConnectionClosed(uint64_t databaseConnectionIdentifier);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBKeyRangeData.h&quot;
</ins><span class="cx"> #include &quot;IndexedDB.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;MemoryIDBBackingStore.h&quot;
</span><span class="lines">@@ -133,7 +134,7 @@
</span><span class="cx">     if (!addResult.isNewEntry)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    addResult.iterator-&gt;value = objectStore.valueForKey(key);
</del><ins>+    addResult.iterator-&gt;value = objectStore.valueForKeyRange(IDBKeyRangeData(key));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MemoryBackingStoreTransaction::abort()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -242,7 +242,7 @@
</span><span class="cx">     return IDBError();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError MemoryIDBBackingStore::getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp; keyData, ThreadSafeDataBuffer&amp; outValue)
</del><ins>+IDBError MemoryIDBBackingStore::getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; keyRangeData, ThreadSafeDataBuffer&amp; outValue)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::getRecord&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx">     if (!objectStore)
</span><span class="cx">         return IDBError(IDBExceptionCode::Unknown, WTF::ASCIILiteral(&quot;No backing store object store found&quot;));
</span><span class="cx"> 
</span><del>-    outValue = objectStore-&gt;valueForKey(keyData);
</del><ins>+    outValue = objectStore-&gt;valueForKeyRange(keyRangeData);
</ins><span class="cx">     return IDBError();
</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 (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">     virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) override final;
</span><span class="cx">     virtual IDBError deleteRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;) override final;
</span><span class="cx">     virtual IDBError putRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; value) override final;
</span><del>-    virtual IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, ThreadSafeDataBuffer&amp; outValue) override final;
</del><ins>+    virtual IDBError getRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, ThreadSafeDataBuffer&amp; outValue) override final;
</ins><span class="cx">     virtual IDBError generateKeyNumber(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t&amp; keyNumber) override final;
</span><span class="cx"> 
</span><span class="cx">     void removeObjectStoreForVersionChangeAbort(MemoryObjectStore&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBKeyRangeData.h&quot;
</ins><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;MemoryBackingStoreTransaction.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -99,9 +100,10 @@
</span><span class="cx">     if (!m_keyValueStore)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    ASSERT(m_orderedKeys);
+
</ins><span class="cx">     m_keyValueStore-&gt;remove(key);
</span><del>-    if (m_orderedKeys)
-        m_orderedKeys-&gt;erase(key);
</del><ins>+    m_orderedKeys-&gt;erase(key);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MemoryObjectStore::putRecord(MemoryBackingStoreTransaction&amp; transaction, const IDBKeyData&amp; keyData, const ThreadSafeDataBuffer&amp; value)
</span><span class="lines">@@ -118,22 +120,48 @@
</span><span class="cx"> 
</span><span class="cx"> void MemoryObjectStore::setKeyValue(const IDBKeyData&amp; keyData, const ThreadSafeDataBuffer&amp; value)
</span><span class="cx"> {
</span><del>-    if (!m_keyValueStore)
</del><ins>+    if (!m_keyValueStore) {
+        ASSERT(!m_orderedKeys);
</ins><span class="cx">         m_keyValueStore = std::make_unique&lt;KeyValueMap&gt;();
</span><ins>+        m_orderedKeys = std::make_unique&lt;std::set&lt;IDBKeyData&gt;&gt;();
+    }
</ins><span class="cx"> 
</span><span class="cx">     auto result = m_keyValueStore-&gt;set(keyData, value);
</span><del>-    if (result.isNewEntry &amp;&amp; m_orderedKeys)
</del><ins>+    if (result.isNewEntry)
</ins><span class="cx">         m_orderedKeys-&gt;insert(keyData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ThreadSafeDataBuffer MemoryObjectStore::valueForKey(const IDBKeyData&amp; keyData) const
</del><ins>+ThreadSafeDataBuffer MemoryObjectStore::valueForKeyRange(const IDBKeyRangeData&amp; keyRangeData) const
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryObjectStore::valueForKey&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (!m_keyValueStore)
</span><span class="cx">         return ThreadSafeDataBuffer();
</span><span class="cx"> 
</span><del>-    return m_keyValueStore-&gt;get(keyData);
</del><ins>+    if (keyRangeData.isExactlyOneKey())
+        return m_keyValueStore-&gt;get(keyRangeData.lowerKey);
+
+    ASSERT(m_orderedKeys);
+
+    auto lowestInRange = m_orderedKeys-&gt;lower_bound(keyRangeData.lowerKey);
+
+    if (lowestInRange == m_orderedKeys-&gt;end())
+        return ThreadSafeDataBuffer();
+
+    if (keyRangeData.lowerOpen &amp;&amp; *lowestInRange == keyRangeData.lowerKey)
+        ++lowestInRange;
+
+    if (lowestInRange == m_orderedKeys-&gt;end())
+        return ThreadSafeDataBuffer();
+
+    if (!keyRangeData.upperKey.isNull()) {
+        if (lowestInRange-&gt;compare(keyRangeData.upperKey) &gt; 0)
+            return ThreadSafeDataBuffer();
+        if (keyRangeData.upperOpen &amp;&amp; *lowestInRange == keyRangeData.upperKey)
+            return ThreadSafeDataBuffer();
+    }
+
+    return m_keyValueStore-&gt;get(*lowestInRange);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace IDBServer
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx"> 
</span><span class="cx"> class IDBKeyData;
</span><span class="cx"> 
</span><ins>+struct IDBKeyRangeData;
+
</ins><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><span class="cx"> class MemoryBackingStoreTransaction;
</span><span class="lines">@@ -66,7 +68,7 @@
</span><span class="cx">     void clear();
</span><span class="cx">     void replaceKeyValueStore(std::unique_ptr&lt;KeyValueMap&gt;&amp;&amp;);
</span><span class="cx"> 
</span><del>-    ThreadSafeDataBuffer valueForKey(const IDBKeyData&amp;) const;
</del><ins>+    ThreadSafeDataBuffer valueForKeyRange(const IDBKeyRangeData&amp;) const;
</ins><span class="cx"> 
</span><span class="cx">     const IDBObjectStoreInfo&amp; info() const { return m_info; }
</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 (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBKeyRangeData.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;IDBTransactionInfo.h&quot;
</span><span class="lines">@@ -399,16 +400,16 @@
</span><span class="cx">     performKeyDataCallback(callbackIdentifier, error, resultKey);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::getRecord(const IDBRequestData&amp; requestData, const IDBKeyData&amp; keyData, ValueDataCallback callback)
</del><ins>+void UniqueIDBDatabase::getRecord(const IDBRequestData&amp; requestData, const IDBKeyRangeData&amp; keyRangeData, ValueDataCallback callback)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::getRecord&quot;);
</span><span class="cx"> 
</span><span class="cx">     uint64_t callbackID = storeCallback(callback);
</span><del>-    m_server.postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performGetRecord, callbackID, requestData.transactionIdentifier(), requestData.objectStoreIdentifier(), keyData));
</del><ins>+    m_server.postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performGetRecord, callbackID, requestData.transactionIdentifier(), requestData.objectStoreIdentifier(), keyRangeData));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp; keyData)
</del><ins>+void UniqueIDBDatabase::performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; keyRangeData)
</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">@@ -417,7 +418,7 @@
</span><span class="cx">     ASSERT(objectStoreIdentifier);
</span><span class="cx"> 
</span><span class="cx">     ThreadSafeDataBuffer valueData;
</span><del>-    IDBError error = m_backingStore-&gt;getRecord(transactionIdentifier, objectStoreIdentifier, keyData, valueData);
</del><ins>+    IDBError error = m_backingStore-&gt;getRecord(transactionIdentifier, objectStoreIdentifier, keyRangeData, valueData);
</ins><span class="cx"> 
</span><span class="cx">     m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformGetRecord, callbackIdentifier, error, valueData));
</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 (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     void deleteObjectStore(UniqueIDBDatabaseTransaction&amp;, const String&amp; objectStoreName, ErrorCallback);
</span><span class="cx">     void clearObjectStore(UniqueIDBDatabaseTransaction&amp;, uint64_t objectStoreIdentifier, ErrorCallback);
</span><span class="cx">     void putOrAdd(const IDBRequestData&amp;, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode, KeyDataCallback);
</span><del>-    void getRecord(const IDBRequestData&amp;, const IDBKeyData&amp;, ValueDataCallback);
</del><ins>+    void getRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;, ValueDataCallback);
</ins><span class="cx">     void commitTransaction(UniqueIDBDatabaseTransaction&amp;, ErrorCallback);
</span><span class="cx">     void abortTransaction(UniqueIDBDatabaseTransaction&amp;, ErrorCallback);
</span><span class="cx">     void transactionDestroyed(UniqueIDBDatabaseTransaction&amp;);
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx">     void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const String&amp; objectStoreName);
</span><span class="cx">     void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier);
</span><span class="cx">     void performPutOrAdd(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><del>-    void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;);
</del><ins>+    void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;);
</ins><span class="cx">     void performActivateTransactionInBackingStore(uint64_t callbackIdentifier, const IDBTransactionInfo&amp;);
</span><span class="cx"> 
</span><span class="cx">     // Main thread callbacks
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -164,14 +164,14 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabaseTransaction::getRecord(const IDBRequestData&amp; requestData, const IDBKeyData&amp; keyData)
</del><ins>+void UniqueIDBDatabaseTransaction::getRecord(const IDBRequestData&amp; requestData, const IDBKeyRangeData&amp; keyRangeData)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::getRecord&quot;);
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_transactionInfo.identifier() == requestData.transactionIdentifier());
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;UniqueIDBDatabaseTransaction&gt; self(this);
</span><del>-    m_databaseConnection-&gt;database().getRecord(requestData, keyData, [this, self, requestData](const IDBError&amp; error, const ThreadSafeDataBuffer&amp; valueData) {
</del><ins>+    m_databaseConnection-&gt;database().getRecord(requestData, keyRangeData, [this, self, requestData](const IDBError&amp; error, const ThreadSafeDataBuffer&amp; valueData) {
</ins><span class="cx">         LOG(IndexedDB, &quot;UniqueIDBDatabaseTransaction::getRecord (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 (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -42,6 +42,8 @@
</span><span class="cx"> class IDBRequestData;
</span><span class="cx"> class ThreadSafeDataBuffer;
</span><span class="cx"> 
</span><ins>+struct IDBKeyRangeData;
+
</ins><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><span class="cx"> class UniqueIDBDatabaseConnection;
</span><span class="lines">@@ -66,7 +68,7 @@
</span><span class="cx">     void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName);
</span><span class="cx">     void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier);
</span><span class="cx">     void putOrAdd(const IDBRequestData&amp;, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><del>-    void getRecord(const IDBRequestData&amp;, const IDBKeyData&amp;);
</del><ins>+    void getRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void didActivateInBackingStore(const IDBError&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IDBConnectionToClient.h&quot;
</span><span class="cx"> #include &quot;IDBConnectionToServer.h&quot;
</span><del>-#include &quot;IDBKeyData.h&quot;
</del><ins>+#include &quot;IDBKeyRangeData.h&quot;
</ins><span class="cx"> #include &quot;IDBOpenDBRequestImpl.h&quot;
</span><span class="cx"> #include &quot;IDBRequestData.h&quot;
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><span class="lines">@@ -210,13 +210,12 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InProcessIDBServer::getRecord(const IDBRequestData&amp; requestData, IDBKey* key)
</del><ins>+void InProcessIDBServer::getRecord(const IDBRequestData&amp; requestData, const IDBKeyRangeData&amp; keyRangeData)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;InProcessIDBServer&gt; self(this);
</span><del>-    IDBKeyData keyData(key);
</del><span class="cx"> 
</span><del>-    RunLoop::current().dispatch([this, self, requestData, keyData] {
-        m_server-&gt;getRecord(requestData, keyData);
</del><ins>+    RunLoop::current().dispatch([this, self, requestData, keyRangeData] {
+        m_server-&gt;getRecord(requestData, keyRangeData);
</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 (191831 => 191832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-31 00:12:28 UTC (rev 191831)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-31 00:17:49 UTC (rev 191832)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     virtual void deleteObjectStore(const IDBRequestData&amp;, const String&amp; objectStoreName) override final;
</span><span class="cx">     virtual void clearObjectStore(const IDBRequestData&amp;, uint64_t objectStoreIdentifier) override final;
</span><span class="cx">     virtual void putOrAdd(const IDBRequestData&amp;, IDBKey*, SerializedScriptValue&amp;, const IndexedDB::ObjectStoreOverwriteMode) override final;
</span><del>-    virtual void getRecord(const IDBRequestData&amp;, IDBKey*) override final;
</del><ins>+    virtual void getRecord(const IDBRequestData&amp;, const IDBKeyRangeData&amp;) override final;
</ins><span class="cx">     virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&amp;) override final;
</span><span class="cx">     virtual void databaseConnectionClosed(uint64_t databaseConnectionIdentifier) override final;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>