<!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 <beidson@apple.com>
</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 <beidson@apple.com>
+
</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 "0"
+ALERT: Success getting keyRange [-1 (Open), undefined (Open)]
+ALERT: Result is "0"
+ALERT: Success getting keyRange [0 (Closed), undefined (Open)]
+ALERT: Result is "0"
+ALERT: Success getting keyRange [0 (Open), undefined (Open)]
+ALERT: Result is "1"
+ALERT: Success getting keyRange [0.1 (Closed), undefined (Open)]
+ALERT: Result is "1"
+ALERT: Success getting keyRange [0.1 (Open), undefined (Open)]
+ALERT: Result is "1"
+ALERT: Success getting keyRange [99 (Closed), undefined (Open)]
+ALERT: Result is "99"
+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 "3"
+ALERT: Success getting keyRange [-0.5 (Closed), 0.5 (Closed)]
+ALERT: Result is "0"
+ALERT: Success getting keyRange [98.5 (Closed), 99.5 (Closed)]
+ALERT: Result is "99"
+ALERT: Success getting keyRange [-1 (Closed), 0 (Closed)]
+ALERT: Result is "0"
+ALERT: Success getting keyRange [-1 (Open), 0 (Closed)]
+ALERT: Result is "0"
+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 "3"
+ALERT: Success getting keyRange [3 (Open), 4 (Closed)]
+ALERT: Result is "4"
+ALERT: Success getting keyRange [3 (Closed), 4 (Open)]
+ALERT: Result is "3"
+ALERT: Success getting keyRange [3 (Open), 4 (Open)]
+ALERT: Result is undefined
+ALERT: Success getting keyRange [99 (Closed), 100 (Closed)]
+ALERT: Result is "99"
+ALERT: Success getting keyRange [99 (Open), 100 (Closed)]
+ALERT: Result is undefined
+ALERT: Success getting keyRange [99 (Closed), 100 (Open)]
+ALERT: Result is "99"
+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.
+<script>
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+
+function done()
+{
+ alert("Done");
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+var createRequest = window.indexedDB.open("GetKeyRangeDatabase", 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+ alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ var versionTransaction = createRequest.transaction;
+ database = event.target.result;
+ var objectStore = database.createObjectStore("TestObjectStore");
+ for (var i = 0; i < 100; ++i)
+ objectStore.put("\"" + i + "\"", i);
+
+ objectStore.put("PosInf", Infinity);
+ objectStore.put("NegInf", -Infinity);
+
+ objectStore.put("A", "A");
+ objectStore.put("As", "As");
+ objectStore.put("AS", "AS");
+ objectStore.put("a", "a");
+
+ objectStore.put("array 1", [1, "hello"]);
+ objectStore.put("array 2", [2, "goodbye"]);
+ objectStore.put("array 3", []);
+
+ versionTransaction.onabort = function(event) {
+ alert("Initial upgrade versionchange transaction unexpected aborted");
+ done();
+ }
+
+ versionTransaction.oncomplete = function(event) {
+ alert("Initial upgrade versionchange transaction complete");
+ continueTest1();
+ }
+
+ versionTransaction.onerror = function(event) {
+ alert("Initial upgrade versionchange transaction unexpected error" + event);
+ done();
+ }
+}
+
+var objectStore;
+
+function testGet(keyRange) {
+ var request = objectStore.get(keyRange);
+ request.onsuccess = function()
+ {
+ alert("Success getting keyRange [" + keyRange.lower + " (" + (keyRange.lowerOpen ? "Open" : "Closed") + "), " + keyRange.upper + " (" + (keyRange.upperOpen ? "Open" : "Closed") + ")]");
+ alert("Result is " + request.result);
+ }
+ request.onerror = function()
+ {
+ alert("Unexpected error getting keyRange [" + keyRange.lower + " (" + keyRange.lowerOpen + "), " + keyRange.upper + " (" + keyRange.upperOpen + ")]");
+ }
+}
+
+function continueTest1()
+{
+ var transaction = database.transaction("TestObjectStore", "readonly");
+ objectStore = transaction.objectStore("TestObjectStore");
+
+ 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, "a"));
+ testGet(IDBKeyRange.bound(Infinity, "a", true));
+ testGet(IDBKeyRange.bound(Infinity, "a", false, true));
+ testGet(IDBKeyRange.bound(Infinity, "a", true, true));
+
+ testGet(IDBKeyRange.bound("AS", "a"));
+ testGet(IDBKeyRange.bound("AS", "a", true));
+ testGet(IDBKeyRange.bound("AS", "a", false, true));
+ testGet(IDBKeyRange.bound("AS", "a", 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("readonly transaction unexpected abort" + event);
+ done();
+ }
+
+ transaction.oncomplete = function(event) {
+ alert("readonly transaction complete");
+ done();
+ }
+
+ transaction.onerror = function(event) {
+ alert("readonly transaction unexpected error" + event);
+ done();
+ }
+}
+
+</script>
</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 <beidson@apple.com>
</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 <beidson@apple.com>
+
</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 "IDBKey.h"
+
</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& 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&);
+
</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 "IDBKeyRangeData.h"
</ins><span class="cx"> #include "IDBOpenDBRequestImpl.h"
</span><span class="cx"> #include "IDBRequestData.h"
</span><span class="cx"> #include "IDBResultData.h"
</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& operation, RefPtr<IDBKey>& key)
</del><ins>+void IDBConnectionToServer::getRecord(TransactionOperation& operation, const IDBKeyRangeData& keyRangeData)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBConnectionToServer::getRecord");
</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->getRecord(IDBRequestData(operation), key.get());
</del><ins>+ m_delegate->getRecord(IDBRequestData(operation), keyRangeData);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBConnectionToServer::didGetRecord(const IDBResultData& 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&, RefPtr<IDBKey>&, RefPtr<SerializedScriptValue>&, const IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx"> void didPutOrAdd(const IDBResultData&);
</span><span class="cx">
</span><del>- void getRecord(TransactionOperation&, RefPtr<IDBKey>&);
</del><ins>+ void getRecord(TransactionOperation&, const IDBKeyRangeData&);
</ins><span class="cx"> void didGetRecord(const IDBResultData&);
</span><span class="cx">
</span><span class="cx"> void commitTransaction(IDBTransaction&);
</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&, const String& objectStoreName) = 0;
</span><span class="cx"> virtual void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx"> virtual void putOrAdd(const IDBRequestData&, IDBKey*, SerializedScriptValue&, const IndexedDB::ObjectStoreOverwriteMode) = 0;
</span><del>- virtual void getRecord(const IDBRequestData&, IDBKey*) = 0;
</del><ins>+ virtual void getRecord(const IDBRequestData&, const IDBKeyRangeData&) = 0;
</ins><span class="cx"> virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&) = 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 "IDBBindingUtilities.h"
</span><span class="cx"> #include "IDBError.h"
</span><span class="cx"> #include "IDBKey.h"
</span><ins>+#include "IDBKeyRangeData.h"
</ins><span class="cx"> #include "IDBRequestImpl.h"
</span><span class="cx"> #include "IDBTransactionImpl.h"
</span><span class="cx"> #include "IndexedDB.h"
</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<IDBRequest> request = m_transaction->requestGetRecord(*context, *this, *idbKey);
- return adoptRef(request.leakRef());
</del><ins>+ Ref<IDBRequest> request = m_transaction->requestGetRecord(*context, *this, idbKey.get());
+ return WTF::move(request);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::IDBRequest> IDBObjectStore::get(ScriptExecutionContext*, IDBKeyRange*, ExceptionCode&)
</del><ins>+RefPtr<WebCore::IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, IDBKeyRange* keyRange, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- RELEASE_ASSERT_NOT_REACHED();
</del><ins>+ LOG(IndexedDB, "IDBObjectStore::get");
+
+ if (!context) {
+ ec = INVALID_STATE_ERR;
+ return nullptr;
+ }
+
+ if (!m_transaction->isActive()) {
+ ec = static_cast<ExceptionCode>(IDBExceptionCode::TransactionInactiveError);
+ return nullptr;
+ }
+
+ if (m_deleted) {
+ ec = INVALID_STATE_ERR;
+ return nullptr;
+ }
+
+ IDBKeyRangeData keyRangeData(keyRange);
+ if (keyRangeData.isNull
+ || (!keyRangeData.lowerKey.isValid() && !keyRangeData.lowerKey.isNull())
+ || (!keyRangeData.upperKey.isValid() && !keyRangeData.upperKey.isNull())) {
+ ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);
+ return nullptr;
+ }
+
+ Ref<IDBRequest> request = m_transaction->requestGetRecord(*context, *this, keyRangeData);
+ return WTF::move(request);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<WebCore::IDBRequest> IDBObjectStore::add(JSC::ExecState& execState, Deprecated::ScriptValue& value, const Deprecated::ScriptValue& key, ExceptionCode& 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 "IDBDatabaseImpl.h"
</span><span class="cx"> #include "IDBError.h"
</span><span class="cx"> #include "IDBEventDispatcher.h"
</span><ins>+#include "IDBKeyRangeData.h"
</ins><span class="cx"> #include "IDBObjectStore.h"
</span><span class="cx"> #include "IDBRequestImpl.h"
</span><span class="cx"> #include "IDBResultData.h"
</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<IDBRequest> IDBTransaction::requestGetRecord(ScriptExecutionContext& context, IDBObjectStore& objectStore, IDBKey& key)
</del><ins>+Ref<IDBRequest> IDBTransaction::requestGetRecord(ScriptExecutionContext& context, IDBObjectStore& objectStore, const IDBKeyRangeData& keyRangeData)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::requestGetRecord");
</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<IDBRequest> request = IDBRequest::create(context, objectStore, *this);
</span><span class="cx">
</span><del>- auto operation = createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, &key);
</del><ins>+ auto operation = createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &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& operation, RefPtr<IDBKey> key)
</del><ins>+void IDBTransaction::getRecordOnServer(TransactionOperation& operation, const IDBKeyRangeData& keyRange)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBTransaction::getRecordOnServer");
</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& request, const IDBResultData& 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<IDBObjectStore> createObjectStore(const IDBObjectStoreInfo&);
</span><span class="cx">
</span><span class="cx"> Ref<IDBRequest> requestPutOrAdd(ScriptExecutionContext&, IDBObjectStore&, IDBKey*, SerializedScriptValue&, IndexedDB::ObjectStoreOverwriteMode);
</span><del>- Ref<IDBRequest> requestGetRecord(ScriptExecutionContext&, IDBObjectStore&, IDBKey&);
</del><ins>+ Ref<IDBRequest> requestGetRecord(ScriptExecutionContext&, IDBObjectStore&, const IDBKeyRangeData&);
</ins><span class="cx"> Ref<IDBRequest> requestClearObjectStore(ScriptExecutionContext&, IDBObjectStore&);
</span><span class="cx">
</span><span class="cx"> void deleteObjectStore(const String& objectStoreName);
</span><span class="lines">@@ -128,7 +130,7 @@
</span><span class="cx"> void putOrAddOnServer(TransactionOperation&, RefPtr<IDBKey>, RefPtr<SerializedScriptValue>, const IndexedDB::ObjectStoreOverwriteMode&);
</span><span class="cx"> void didPutOrAddOnServer(IDBRequest&, const IDBResultData&);
</span><span class="cx">
</span><del>- void getRecordOnServer(TransactionOperation&, RefPtr<IDBKey>);
</del><ins>+ void getRecordOnServer(TransactionOperation&, const IDBKeyRangeData&);
</ins><span class="cx"> void didGetRecordOnServer(IDBRequest&, const IDBResultData&);
</span><span class="cx">
</span><span class="cx"> void deleteObjectStoreOnServer(TransactionOperation&, const String& 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& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, bool& keyExists) = 0;
</span><span class="cx"> virtual IDBError deleteRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&) = 0;
</span><span class="cx"> virtual IDBError putRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, const ThreadSafeDataBuffer& value) = 0;
</span><del>- virtual IDBError getRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, ThreadSafeDataBuffer& outValue) = 0;
</del><ins>+ virtual IDBError getRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&, ThreadSafeDataBuffer& outValue) = 0;
</ins><span class="cx"> virtual IDBError generateKeyNumber(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t& 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->putOrAdd(requestData, keyData, valueData, overwriteMode);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBServer::getRecord(const IDBRequestData& requestData, const IDBKeyData& keyData)
</del><ins>+void IDBServer::getRecord(const IDBRequestData& requestData, const IDBKeyRangeData& keyRangeData)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBServer::getRecord");
</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->getRecord(requestData, keyData);
</del><ins>+ transaction->getRecord(requestData, keyRangeData);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBServer::establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo& 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&, const String& objectStoreName);
</span><span class="cx"> void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
</span><span class="cx"> void putOrAdd(const IDBRequestData&, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><del>- void getRecord(const IDBRequestData&, const IDBKeyData&);
</del><ins>+ void getRecord(const IDBRequestData&, const IDBKeyRangeData&);
</ins><span class="cx"> void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&);
</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 "IDBKeyRangeData.h"
</ins><span class="cx"> #include "IndexedDB.h"
</span><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "MemoryIDBBackingStore.h"
</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->value = objectStore.valueForKey(key);
</del><ins>+ addResult.iterator->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& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData& keyData, ThreadSafeDataBuffer& outValue)
</del><ins>+IDBError MemoryIDBBackingStore::getRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData& keyRangeData, ThreadSafeDataBuffer& outValue)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "MemoryIDBBackingStore::getRecord");
</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("No backing store object store found"));
</span><span class="cx">
</span><del>- outValue = objectStore->valueForKey(keyData);
</del><ins>+ outValue = objectStore->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& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, bool& keyExists) override final;
</span><span class="cx"> virtual IDBError deleteRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&) override final;
</span><span class="cx"> virtual IDBError putRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, const ThreadSafeDataBuffer& value) override final;
</span><del>- virtual IDBError getRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, ThreadSafeDataBuffer& outValue) override final;
</del><ins>+ virtual IDBError getRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&, ThreadSafeDataBuffer& outValue) override final;
</ins><span class="cx"> virtual IDBError generateKeyNumber(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t& keyNumber) override final;
</span><span class="cx">
</span><span class="cx"> void removeObjectStoreForVersionChangeAbort(MemoryObjectStore&);
</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 "IDBKeyRangeData.h"
</ins><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "MemoryBackingStoreTransaction.h"
</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->remove(key);
</span><del>- if (m_orderedKeys)
- m_orderedKeys->erase(key);
</del><ins>+ m_orderedKeys->erase(key);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MemoryObjectStore::putRecord(MemoryBackingStoreTransaction& transaction, const IDBKeyData& keyData, const ThreadSafeDataBuffer& value)
</span><span class="lines">@@ -118,22 +120,48 @@
</span><span class="cx">
</span><span class="cx"> void MemoryObjectStore::setKeyValue(const IDBKeyData& keyData, const ThreadSafeDataBuffer& 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<KeyValueMap>();
</span><ins>+ m_orderedKeys = std::make_unique<std::set<IDBKeyData>>();
+ }
</ins><span class="cx">
</span><span class="cx"> auto result = m_keyValueStore->set(keyData, value);
</span><del>- if (result.isNewEntry && m_orderedKeys)
</del><ins>+ if (result.isNewEntry)
</ins><span class="cx"> m_orderedKeys->insert(keyData);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ThreadSafeDataBuffer MemoryObjectStore::valueForKey(const IDBKeyData& keyData) const
</del><ins>+ThreadSafeDataBuffer MemoryObjectStore::valueForKeyRange(const IDBKeyRangeData& keyRangeData) const
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "MemoryObjectStore::valueForKey");
</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->get(keyData);
</del><ins>+ if (keyRangeData.isExactlyOneKey())
+ return m_keyValueStore->get(keyRangeData.lowerKey);
+
+ ASSERT(m_orderedKeys);
+
+ auto lowestInRange = m_orderedKeys->lower_bound(keyRangeData.lowerKey);
+
+ if (lowestInRange == m_orderedKeys->end())
+ return ThreadSafeDataBuffer();
+
+ if (keyRangeData.lowerOpen && *lowestInRange == keyRangeData.lowerKey)
+ ++lowestInRange;
+
+ if (lowestInRange == m_orderedKeys->end())
+ return ThreadSafeDataBuffer();
+
+ if (!keyRangeData.upperKey.isNull()) {
+ if (lowestInRange->compare(keyRangeData.upperKey) > 0)
+ return ThreadSafeDataBuffer();
+ if (keyRangeData.upperOpen && *lowestInRange == keyRangeData.upperKey)
+ return ThreadSafeDataBuffer();
+ }
+
+ return m_keyValueStore->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<KeyValueMap>&&);
</span><span class="cx">
</span><del>- ThreadSafeDataBuffer valueForKey(const IDBKeyData&) const;
</del><ins>+ ThreadSafeDataBuffer valueForKeyRange(const IDBKeyRangeData&) const;
</ins><span class="cx">
</span><span class="cx"> const IDBObjectStoreInfo& 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 "IDBKeyRangeData.h"
</ins><span class="cx"> #include "IDBResultData.h"
</span><span class="cx"> #include "IDBServer.h"
</span><span class="cx"> #include "IDBTransactionInfo.h"
</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& requestData, const IDBKeyData& keyData, ValueDataCallback callback)
</del><ins>+void UniqueIDBDatabase::getRecord(const IDBRequestData& requestData, const IDBKeyRangeData& keyRangeData, ValueDataCallback callback)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="cx"> LOG(IndexedDB, "(main) UniqueIDBDatabase::getRecord");
</span><span class="cx">
</span><span class="cx"> uint64_t callbackID = storeCallback(callback);
</span><del>- m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performGetRecord, callbackID, requestData.transactionIdentifier(), requestData.objectStoreIdentifier(), keyData));
</del><ins>+ m_server.postDatabaseTask(createCrossThreadTask(*this, &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& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData& keyData)
</del><ins>+void UniqueIDBDatabase::performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData& keyRangeData)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!isMainThread());
</span><span class="cx"> LOG(IndexedDB, "(db) UniqueIDBDatabase::performGetRecord");
</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->getRecord(transactionIdentifier, objectStoreIdentifier, keyData, valueData);
</del><ins>+ IDBError error = m_backingStore->getRecord(transactionIdentifier, objectStoreIdentifier, keyRangeData, valueData);
</ins><span class="cx">
</span><span class="cx"> m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &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&, const String& objectStoreName, ErrorCallback);
</span><span class="cx"> void clearObjectStore(UniqueIDBDatabaseTransaction&, uint64_t objectStoreIdentifier, ErrorCallback);
</span><span class="cx"> void putOrAdd(const IDBRequestData&, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode, KeyDataCallback);
</span><del>- void getRecord(const IDBRequestData&, const IDBKeyData&, ValueDataCallback);
</del><ins>+ void getRecord(const IDBRequestData&, const IDBKeyRangeData&, ValueDataCallback);
</ins><span class="cx"> void commitTransaction(UniqueIDBDatabaseTransaction&, ErrorCallback);
</span><span class="cx"> void abortTransaction(UniqueIDBDatabaseTransaction&, ErrorCallback);
</span><span class="cx"> void transactionDestroyed(UniqueIDBDatabaseTransaction&);
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const String& objectStoreName);
</span><span class="cx"> void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier);
</span><span class="cx"> void performPutOrAdd(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><del>- void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&);
</del><ins>+ void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&);
</ins><span class="cx"> void performActivateTransactionInBackingStore(uint64_t callbackIdentifier, const IDBTransactionInfo&);
</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& requestData, const IDBKeyData& keyData)
</del><ins>+void UniqueIDBDatabaseTransaction::getRecord(const IDBRequestData& requestData, const IDBKeyRangeData& keyRangeData)
</ins><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "UniqueIDBDatabaseTransaction::getRecord");
</span><span class="cx">
</span><span class="cx"> ASSERT(m_transactionInfo.identifier() == requestData.transactionIdentifier());
</span><span class="cx">
</span><span class="cx"> RefPtr<UniqueIDBDatabaseTransaction> self(this);
</span><del>- m_databaseConnection->database().getRecord(requestData, keyData, [this, self, requestData](const IDBError& error, const ThreadSafeDataBuffer& valueData) {
</del><ins>+ m_databaseConnection->database().getRecord(requestData, keyRangeData, [this, self, requestData](const IDBError& error, const ThreadSafeDataBuffer& valueData) {
</ins><span class="cx"> LOG(IndexedDB, "UniqueIDBDatabaseTransaction::getRecord (callback)");
</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&, const String& objectStoreName);
</span><span class="cx"> void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier);
</span><span class="cx"> void putOrAdd(const IDBRequestData&, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><del>- void getRecord(const IDBRequestData&, const IDBKeyData&);
</del><ins>+ void getRecord(const IDBRequestData&, const IDBKeyRangeData&);
</ins><span class="cx">
</span><span class="cx"> void didActivateInBackingStore(const IDBError&);
</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 "IDBConnectionToClient.h"
</span><span class="cx"> #include "IDBConnectionToServer.h"
</span><del>-#include "IDBKeyData.h"
</del><ins>+#include "IDBKeyRangeData.h"
</ins><span class="cx"> #include "IDBOpenDBRequestImpl.h"
</span><span class="cx"> #include "IDBRequestData.h"
</span><span class="cx"> #include "IDBResultData.h"
</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& requestData, IDBKey* key)
</del><ins>+void InProcessIDBServer::getRecord(const IDBRequestData& requestData, const IDBKeyRangeData& keyRangeData)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<InProcessIDBServer> self(this);
</span><del>- IDBKeyData keyData(key);
</del><span class="cx">
</span><del>- RunLoop::current().dispatch([this, self, requestData, keyData] {
- m_server->getRecord(requestData, keyData);
</del><ins>+ RunLoop::current().dispatch([this, self, requestData, keyRangeData] {
+ m_server->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&, const String& objectStoreName) override final;
</span><span class="cx"> virtual void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier) override final;
</span><span class="cx"> virtual void putOrAdd(const IDBRequestData&, IDBKey*, SerializedScriptValue&, const IndexedDB::ObjectStoreOverwriteMode) override final;
</span><del>- virtual void getRecord(const IDBRequestData&, IDBKey*) override final;
</del><ins>+ virtual void getRecord(const IDBRequestData&, const IDBKeyRangeData&) override final;
</ins><span class="cx"> virtual void establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo&) 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>