<!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>[208349] 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/208349">208349</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-11-03 14:47:21 -0700 (Thu, 03 Nov 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>IndexedDB 2.0: Support binary keys.
<rdar://problem/28806927> and https://bugs.webkit.org/show_bug.cgi?id=164359
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
* web-platform-tests/IndexedDB/idb_binary_key_conversion-expected.txt:
* web-platform-tests/IndexedDB/idbfactory_cmp3-expected.txt:
* web-platform-tests/IndexedDB/idbfactory_cmp4-expected.txt:
Source/WebCore:
Tests: storage/indexeddb/modern/binary-keys-1-private.html
storage/indexeddb/modern/binary-keys-1.html
Changes to other existing tests.
* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::createBinary):
(WebCore::IDBKey::IDBKey):
(WebCore::IDBKey::compare):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::binary):
(WebCore::compareBinaryKeyData):
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey):
(WebCore::IDBKeyData::isolatedCopy):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):
(WebCore::IDBKeyData::compare):
(WebCore::IDBKeyData::loggingString):
(WebCore::IDBKeyData::operator==):
* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyData::hash):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):
* Modules/indexeddb/IndexedDB.h: Add new enum for the new key type.
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::toJS):
(WebCore::createIDBKeyFromValue):
* platform/ThreadSafeDataBuffer.h:
(WebCore::ThreadSafeDataBufferImpl::ThreadSafeDataBufferImpl):
(WebCore::ThreadSafeDataBuffer::copyData):
(WebCore::ThreadSafeDataBuffer::size):
(WebCore::ThreadSafeDataBuffer::operator==):
(WebCore::ThreadSafeDataBuffer::ThreadSafeDataBuffer):
Source/WTF:
* wtf/Hasher.h:
(WTF::StringHasher::hashMemory): Teach hashMemory() to handle buffers with odd lengths.
LayoutTests:
* storage/indexeddb/factory-cmp-expected.txt:
* storage/indexeddb/factory-cmp-private-expected.txt:
* storage/indexeddb/key-type-binary-expected.txt:
* storage/indexeddb/key-type-binary-private-expected.txt:
* storage/indexeddb/modern/binary-keys-1-expected.txt: Added.
* storage/indexeddb/modern/binary-keys-1-private-expected.txt: Added.
* storage/indexeddb/modern/binary-keys-1-private.html: Added.
* storage/indexeddb/modern/binary-keys-1.html: Added.
* storage/indexeddb/modern/resources/binary-keys-1.js: Added.
* storage/indexeddb/resources/factory-cmp.js:
* storage/indexeddb/resources/key-type-binary.js:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidb_binary_key_conversionexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbfactory_cmp3expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbfactory_cmp4expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp4-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbfactorycmpexpectedtxt">trunk/LayoutTests/storage/indexeddb/factory-cmp-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbfactorycmpprivateexpectedtxt">trunk/LayoutTests/storage/indexeddb/factory-cmp-private-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbkeytypebinaryexpectedtxt">trunk/LayoutTests/storage/indexeddb/key-type-binary-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbkeytypebinaryprivateexpectedtxt">trunk/LayoutTests/storage/indexeddb/key-type-binary-private-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbresourcesfactorycmpjs">trunk/LayoutTests/storage/indexeddb/resources/factory-cmp.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbresourceskeytypebinaryjs">trunk/LayoutTests/storage/indexeddb/resources/key-type-binary.js</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfHasherh">trunk/Source/WTF/wtf/Hasher.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeycpp">trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyh">trunk/Source/WebCore/Modules/indexeddb/IDBKey.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyDatacpp">trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyDatah">trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIndexedDBh">trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp">trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformThreadSafeDataBufferh">trunk/Source/WebCore/platform/ThreadSafeDataBuffer.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernbinarykeys1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernbinarykeys1privateexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-private-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernbinarykeys1privatehtml">trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-private.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernbinarykeys1html">trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesbinarykeys1js">trunk/LayoutTests/storage/indexeddb/modern/resources/binary-keys-1.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/ChangeLog        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-11-03 Brady Eidson <beidson@apple.com>
+
+ IndexedDB 2.0: Support binary keys.
+ <rdar://problem/28806927> and https://bugs.webkit.org/show_bug.cgi?id=164359
+
+ Reviewed by Alex Christensen.
+
+ * storage/indexeddb/factory-cmp-expected.txt:
+ * storage/indexeddb/factory-cmp-private-expected.txt:
+ * storage/indexeddb/key-type-binary-expected.txt:
+ * storage/indexeddb/key-type-binary-private-expected.txt:
+ * storage/indexeddb/modern/binary-keys-1-expected.txt: Added.
+ * storage/indexeddb/modern/binary-keys-1-private-expected.txt: Added.
+ * storage/indexeddb/modern/binary-keys-1-private.html: Added.
+ * storage/indexeddb/modern/binary-keys-1.html: Added.
+ * storage/indexeddb/modern/resources/binary-keys-1.js: Added.
+ * storage/indexeddb/resources/factory-cmp.js:
+ * storage/indexeddb/resources/key-type-binary.js:
+
</ins><span class="cx"> 2016-11-02 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> CSS.supports("font-variation-settings", "'wght' 500") erroneously returns false
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-11-03 Brady Eidson <beidson@apple.com>
+
+ IndexedDB 2.0: Support binary keys.
+ <rdar://problem/28806927> and https://bugs.webkit.org/show_bug.cgi?id=164359
+
+ Reviewed by Alex Christensen.
+
+ * web-platform-tests/IndexedDB/idb_binary_key_conversion-expected.txt:
+ * web-platform-tests/IndexedDB/idbfactory_cmp3-expected.txt:
+ * web-platform-tests/IndexedDB/idbfactory_cmp4-expected.txt:
+
</ins><span class="cx"> 2016-11-01 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> IndexedDB 2.0: Support IDBIndex getAll/getAllKeys.
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidb_binary_key_conversionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion-expected.txt (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion-expected.txt        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx">
</span><del>-FAIL Empty ArrayBuffer The data provided does not meet requirements.
-FAIL ArrayBuffer The data provided does not meet requirements.
-FAIL DataView The data provided does not meet requirements.
-FAIL TypedArray(Int8Array) The data provided does not meet requirements.
-FAIL Array of TypedArray(Int8Array) The data provided does not meet requirements.
</del><ins>+PASS Empty ArrayBuffer
+PASS ArrayBuffer
+PASS DataView
+PASS TypedArray(Int8Array)
+PASS Array of TypedArray(Int8Array)
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbfactory_cmp3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp3-expected.txt (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp3-expected.txt        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp3-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx">
</span><del>-FAIL Array v.s. Binary Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-FAIL Binary v.s. String Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
</del><ins>+PASS Array v.s. Binary
+PASS Binary v.s. String
</ins><span class="cx"> PASS String v.s. Date
</span><span class="cx"> PASS Date v.s. Number
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbfactory_cmp4expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp4-expected.txt (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp4-expected.txt        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_cmp4-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx">
</span><del>-FAIL Compare in unsigned octet values (in the range [0, 255]) Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-FAIL Compare values in then same length Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-FAIL Compare values in different lengths Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-FAIL Compare when the values in the range of their minimal length are the same Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
</del><ins>+PASS Compare in unsigned octet values (in the range [0, 255])
+PASS Compare values in then same length
+PASS Compare values in different lengths
+PASS Compare when the values in the range of their minimal length are the same
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbfactorycmpexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/factory-cmp-expected.txt (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/factory-cmp-expected.txt        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/storage/indexeddb/factory-cmp-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -92,9 +92,41 @@
</span><span class="cx"> PASS indexedDB.cmp('�','𝄞') is 1
</span><span class="cx"> PASS indexedDB.cmp('𝄞','𝄞') is 0
</span><span class="cx"> PASS indexedDB.cmp('�','�') is 0
</span><del>-PASS indexedDB.cmp('�',[]) is -1
-PASS indexedDB.cmp([],'�') is 1
</del><ins>+PASS indexedDB.cmp('�',new Uint8Array()) is -1
+PASS indexedDB.cmp(new Uint8Array(),'�') is 1
</ins><span class="cx"> PASS indexedDB.cmp('�','�') is 0
</span><ins>+PASS indexedDB.cmp(new Uint8Array(),new Uint8Array()) is 0
+PASS indexedDB.cmp(new Uint8Array(),new Uint8Array([0])) is -1
+PASS indexedDB.cmp(new Uint8Array([0]),new Uint8Array()) is 1
+PASS indexedDB.cmp(new Uint8Array(),new Uint8Array()) is 0
+PASS indexedDB.cmp(new Uint8Array([0]),new Uint8Array([0])) is 0
+PASS indexedDB.cmp(new Uint8Array([0]),new Uint8Array([0, 0])) is -1
+PASS indexedDB.cmp(new Uint8Array([0, 0]),new Uint8Array([0])) is 1
+PASS indexedDB.cmp(new Uint8Array([0]),new Uint8Array([0])) is 0
+PASS indexedDB.cmp(new Uint8Array([0, 0]),new Uint8Array([0, 0])) is 0
+PASS indexedDB.cmp(new Uint8Array([0, 0]),new Uint8Array([0, 1])) is -1
+PASS indexedDB.cmp(new Uint8Array([0, 1]),new Uint8Array([0, 0])) is 1
+PASS indexedDB.cmp(new Uint8Array([0, 0]),new Uint8Array([0, 0])) is 0
+PASS indexedDB.cmp(new Uint8Array([0, 1]),new Uint8Array([0, 1])) is 0
+PASS indexedDB.cmp(new Uint8Array([0, 1]),new Uint8Array([1])) is -1
+PASS indexedDB.cmp(new Uint8Array([1]),new Uint8Array([0, 1])) is 1
+PASS indexedDB.cmp(new Uint8Array([0, 1]),new Uint8Array([0, 1])) is 0
+PASS indexedDB.cmp(new Uint8Array([1]),new Uint8Array([1])) is 0
+PASS indexedDB.cmp(new Uint8Array([1]),new Uint8Array([1, 0])) is -1
+PASS indexedDB.cmp(new Uint8Array([1, 0]),new Uint8Array([1])) is 1
+PASS indexedDB.cmp(new Uint8Array([1]),new Uint8Array([1])) is 0
+PASS indexedDB.cmp(new Uint8Array([1, 0]),new Uint8Array([1, 0])) is 0
+PASS indexedDB.cmp(new Uint8Array([1, 0]),new Uint8Array([1, 1])) is -1
+PASS indexedDB.cmp(new Uint8Array([1, 1]),new Uint8Array([1, 0])) is 1
+PASS indexedDB.cmp(new Uint8Array([1, 0]),new Uint8Array([1, 0])) is 0
+PASS indexedDB.cmp(new Uint8Array([1, 1]),new Uint8Array([1, 1])) is 0
+PASS indexedDB.cmp(new Uint8Array([1, 1]),new Uint8Array([255])) is -1
+PASS indexedDB.cmp(new Uint8Array([255]),new Uint8Array([1, 1])) is 1
+PASS indexedDB.cmp(new Uint8Array([1, 1]),new Uint8Array([1, 1])) is 0
+PASS indexedDB.cmp(new Uint8Array([255]),new Uint8Array([255])) is 0
+PASS indexedDB.cmp(new Uint8Array([255]),[]) is -1
+PASS indexedDB.cmp([],new Uint8Array([255])) is 1
+PASS indexedDB.cmp(new Uint8Array([255]),new Uint8Array([255])) is 0
</ins><span class="cx"> PASS indexedDB.cmp([],[]) is 0
</span><span class="cx"> PASS indexedDB.cmp([],[-Infinity]) is -1
</span><span class="cx"> PASS indexedDB.cmp([-Infinity],[]) is 1
</span><span class="lines">@@ -184,9 +216,41 @@
</span><span class="cx"> PASS indexedDB.cmp(['�'],['𝄞']) is 1
</span><span class="cx"> PASS indexedDB.cmp(['𝄞'],['𝄞']) is 0
</span><span class="cx"> PASS indexedDB.cmp(['�'],['�']) is 0
</span><del>-PASS indexedDB.cmp(['�'],[[]]) is -1
-PASS indexedDB.cmp([[]],['�']) is 1
</del><ins>+PASS indexedDB.cmp(['�'],[new Uint8Array()]) is -1
+PASS indexedDB.cmp([new Uint8Array()],['�']) is 1
</ins><span class="cx"> PASS indexedDB.cmp(['�'],['�']) is 0
</span><ins>+PASS indexedDB.cmp([new Uint8Array()],[new Uint8Array()]) is 0
+PASS indexedDB.cmp([new Uint8Array()],[new Uint8Array([0])]) is -1
+PASS indexedDB.cmp([new Uint8Array([0])],[new Uint8Array()]) is 1
+PASS indexedDB.cmp([new Uint8Array()],[new Uint8Array()]) is 0
+PASS indexedDB.cmp([new Uint8Array([0])],[new Uint8Array([0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0])],[new Uint8Array([0, 0])]) is -1
+PASS indexedDB.cmp([new Uint8Array([0, 0])],[new Uint8Array([0])]) is 1
+PASS indexedDB.cmp([new Uint8Array([0])],[new Uint8Array([0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0, 0])],[new Uint8Array([0, 0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0, 0])],[new Uint8Array([0, 1])]) is -1
+PASS indexedDB.cmp([new Uint8Array([0, 1])],[new Uint8Array([0, 0])]) is 1
+PASS indexedDB.cmp([new Uint8Array([0, 0])],[new Uint8Array([0, 0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0, 1])],[new Uint8Array([0, 1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0, 1])],[new Uint8Array([1])]) is -1
+PASS indexedDB.cmp([new Uint8Array([1])],[new Uint8Array([0, 1])]) is 1
+PASS indexedDB.cmp([new Uint8Array([0, 1])],[new Uint8Array([0, 1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1])],[new Uint8Array([1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1])],[new Uint8Array([1, 0])]) is -1
+PASS indexedDB.cmp([new Uint8Array([1, 0])],[new Uint8Array([1])]) is 1
+PASS indexedDB.cmp([new Uint8Array([1])],[new Uint8Array([1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1, 0])],[new Uint8Array([1, 0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1, 0])],[new Uint8Array([1, 1])]) is -1
+PASS indexedDB.cmp([new Uint8Array([1, 1])],[new Uint8Array([1, 0])]) is 1
+PASS indexedDB.cmp([new Uint8Array([1, 0])],[new Uint8Array([1, 0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1, 1])],[new Uint8Array([1, 1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1, 1])],[new Uint8Array([255])]) is -1
+PASS indexedDB.cmp([new Uint8Array([255])],[new Uint8Array([1, 1])]) is 1
+PASS indexedDB.cmp([new Uint8Array([1, 1])],[new Uint8Array([1, 1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([255])],[new Uint8Array([255])]) is 0
+PASS indexedDB.cmp([new Uint8Array([255])],[[]]) is -1
+PASS indexedDB.cmp([[]],[new Uint8Array([255])]) is 1
+PASS indexedDB.cmp([new Uint8Array([255])],[new Uint8Array([255])]) is 0
</ins><span class="cx"> PASS indexedDB.cmp([[]],[[]]) is 0
</span><span class="cx"> PASS indexedDB.cmp([[]],[[], []]) is -1
</span><span class="cx"> PASS indexedDB.cmp([[], []],[[]]) is 1
</span><span class="lines">@@ -536,486 +600,6 @@
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'DataError'
</span><span class="cx"> Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
</span><del>-Expecting exception from indexedDB.cmp(self.document.body, new Uint8Array())
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array(), self.document.body)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(self.document.body, 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', self.document.body)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array(), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array())
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array(), new Uint8Array([0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0]), new Uint8Array())
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array(), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array())
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0]), new Uint8Array([0, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 0]), new Uint8Array([0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 0]), new Uint8Array([0, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 1]), new Uint8Array([0, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 1]), new Uint8Array([1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1]), new Uint8Array([0, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1]), new Uint8Array([1, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 0]), new Uint8Array([1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 0]), new Uint8Array([1, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 1]), new Uint8Array([1, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 1]), new Uint8Array([255]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([255]), new Uint8Array([1, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([255]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([255]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([255]), [new Uint8Array()])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array()], new Uint8Array([255]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([255]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([255]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array()], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array()])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array()], [new Uint8Array([0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0])], [new Uint8Array()])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array()], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array()])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0])], [new Uint8Array([0, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 0])], [new Uint8Array([0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 0])], [new Uint8Array([0, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 1])], [new Uint8Array([0, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 1])], [new Uint8Array([1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1])], [new Uint8Array([0, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1])], [new Uint8Array([1, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 0])], [new Uint8Array([1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 0])], [new Uint8Array([1, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 1])], [new Uint8Array([1, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 1])], [new Uint8Array([255])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([255])], [new Uint8Array([1, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([255])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([255])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
</del><span class="cx">
</span><span class="cx"> compare identical keys
</span><span class="cx"> PASS indexedDB.cmp(0, -0) is 0
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbfactorycmpprivateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/factory-cmp-private-expected.txt (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/factory-cmp-private-expected.txt        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/storage/indexeddb/factory-cmp-private-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -92,9 +92,41 @@
</span><span class="cx"> PASS indexedDB.cmp('�','𝄞') is 1
</span><span class="cx"> PASS indexedDB.cmp('𝄞','𝄞') is 0
</span><span class="cx"> PASS indexedDB.cmp('�','�') is 0
</span><del>-PASS indexedDB.cmp('�',[]) is -1
-PASS indexedDB.cmp([],'�') is 1
</del><ins>+PASS indexedDB.cmp('�',new Uint8Array()) is -1
+PASS indexedDB.cmp(new Uint8Array(),'�') is 1
</ins><span class="cx"> PASS indexedDB.cmp('�','�') is 0
</span><ins>+PASS indexedDB.cmp(new Uint8Array(),new Uint8Array()) is 0
+PASS indexedDB.cmp(new Uint8Array(),new Uint8Array([0])) is -1
+PASS indexedDB.cmp(new Uint8Array([0]),new Uint8Array()) is 1
+PASS indexedDB.cmp(new Uint8Array(),new Uint8Array()) is 0
+PASS indexedDB.cmp(new Uint8Array([0]),new Uint8Array([0])) is 0
+PASS indexedDB.cmp(new Uint8Array([0]),new Uint8Array([0, 0])) is -1
+PASS indexedDB.cmp(new Uint8Array([0, 0]),new Uint8Array([0])) is 1
+PASS indexedDB.cmp(new Uint8Array([0]),new Uint8Array([0])) is 0
+PASS indexedDB.cmp(new Uint8Array([0, 0]),new Uint8Array([0, 0])) is 0
+PASS indexedDB.cmp(new Uint8Array([0, 0]),new Uint8Array([0, 1])) is -1
+PASS indexedDB.cmp(new Uint8Array([0, 1]),new Uint8Array([0, 0])) is 1
+PASS indexedDB.cmp(new Uint8Array([0, 0]),new Uint8Array([0, 0])) is 0
+PASS indexedDB.cmp(new Uint8Array([0, 1]),new Uint8Array([0, 1])) is 0
+PASS indexedDB.cmp(new Uint8Array([0, 1]),new Uint8Array([1])) is -1
+PASS indexedDB.cmp(new Uint8Array([1]),new Uint8Array([0, 1])) is 1
+PASS indexedDB.cmp(new Uint8Array([0, 1]),new Uint8Array([0, 1])) is 0
+PASS indexedDB.cmp(new Uint8Array([1]),new Uint8Array([1])) is 0
+PASS indexedDB.cmp(new Uint8Array([1]),new Uint8Array([1, 0])) is -1
+PASS indexedDB.cmp(new Uint8Array([1, 0]),new Uint8Array([1])) is 1
+PASS indexedDB.cmp(new Uint8Array([1]),new Uint8Array([1])) is 0
+PASS indexedDB.cmp(new Uint8Array([1, 0]),new Uint8Array([1, 0])) is 0
+PASS indexedDB.cmp(new Uint8Array([1, 0]),new Uint8Array([1, 1])) is -1
+PASS indexedDB.cmp(new Uint8Array([1, 1]),new Uint8Array([1, 0])) is 1
+PASS indexedDB.cmp(new Uint8Array([1, 0]),new Uint8Array([1, 0])) is 0
+PASS indexedDB.cmp(new Uint8Array([1, 1]),new Uint8Array([1, 1])) is 0
+PASS indexedDB.cmp(new Uint8Array([1, 1]),new Uint8Array([255])) is -1
+PASS indexedDB.cmp(new Uint8Array([255]),new Uint8Array([1, 1])) is 1
+PASS indexedDB.cmp(new Uint8Array([1, 1]),new Uint8Array([1, 1])) is 0
+PASS indexedDB.cmp(new Uint8Array([255]),new Uint8Array([255])) is 0
+PASS indexedDB.cmp(new Uint8Array([255]),[]) is -1
+PASS indexedDB.cmp([],new Uint8Array([255])) is 1
+PASS indexedDB.cmp(new Uint8Array([255]),new Uint8Array([255])) is 0
</ins><span class="cx"> PASS indexedDB.cmp([],[]) is 0
</span><span class="cx"> PASS indexedDB.cmp([],[-Infinity]) is -1
</span><span class="cx"> PASS indexedDB.cmp([-Infinity],[]) is 1
</span><span class="lines">@@ -184,9 +216,41 @@
</span><span class="cx"> PASS indexedDB.cmp(['�'],['𝄞']) is 1
</span><span class="cx"> PASS indexedDB.cmp(['𝄞'],['𝄞']) is 0
</span><span class="cx"> PASS indexedDB.cmp(['�'],['�']) is 0
</span><del>-PASS indexedDB.cmp(['�'],[[]]) is -1
-PASS indexedDB.cmp([[]],['�']) is 1
</del><ins>+PASS indexedDB.cmp(['�'],[new Uint8Array()]) is -1
+PASS indexedDB.cmp([new Uint8Array()],['�']) is 1
</ins><span class="cx"> PASS indexedDB.cmp(['�'],['�']) is 0
</span><ins>+PASS indexedDB.cmp([new Uint8Array()],[new Uint8Array()]) is 0
+PASS indexedDB.cmp([new Uint8Array()],[new Uint8Array([0])]) is -1
+PASS indexedDB.cmp([new Uint8Array([0])],[new Uint8Array()]) is 1
+PASS indexedDB.cmp([new Uint8Array()],[new Uint8Array()]) is 0
+PASS indexedDB.cmp([new Uint8Array([0])],[new Uint8Array([0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0])],[new Uint8Array([0, 0])]) is -1
+PASS indexedDB.cmp([new Uint8Array([0, 0])],[new Uint8Array([0])]) is 1
+PASS indexedDB.cmp([new Uint8Array([0])],[new Uint8Array([0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0, 0])],[new Uint8Array([0, 0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0, 0])],[new Uint8Array([0, 1])]) is -1
+PASS indexedDB.cmp([new Uint8Array([0, 1])],[new Uint8Array([0, 0])]) is 1
+PASS indexedDB.cmp([new Uint8Array([0, 0])],[new Uint8Array([0, 0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0, 1])],[new Uint8Array([0, 1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([0, 1])],[new Uint8Array([1])]) is -1
+PASS indexedDB.cmp([new Uint8Array([1])],[new Uint8Array([0, 1])]) is 1
+PASS indexedDB.cmp([new Uint8Array([0, 1])],[new Uint8Array([0, 1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1])],[new Uint8Array([1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1])],[new Uint8Array([1, 0])]) is -1
+PASS indexedDB.cmp([new Uint8Array([1, 0])],[new Uint8Array([1])]) is 1
+PASS indexedDB.cmp([new Uint8Array([1])],[new Uint8Array([1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1, 0])],[new Uint8Array([1, 0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1, 0])],[new Uint8Array([1, 1])]) is -1
+PASS indexedDB.cmp([new Uint8Array([1, 1])],[new Uint8Array([1, 0])]) is 1
+PASS indexedDB.cmp([new Uint8Array([1, 0])],[new Uint8Array([1, 0])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1, 1])],[new Uint8Array([1, 1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([1, 1])],[new Uint8Array([255])]) is -1
+PASS indexedDB.cmp([new Uint8Array([255])],[new Uint8Array([1, 1])]) is 1
+PASS indexedDB.cmp([new Uint8Array([1, 1])],[new Uint8Array([1, 1])]) is 0
+PASS indexedDB.cmp([new Uint8Array([255])],[new Uint8Array([255])]) is 0
+PASS indexedDB.cmp([new Uint8Array([255])],[[]]) is -1
+PASS indexedDB.cmp([[]],[new Uint8Array([255])]) is 1
+PASS indexedDB.cmp([new Uint8Array([255])],[new Uint8Array([255])]) is 0
</ins><span class="cx"> PASS indexedDB.cmp([[]],[[]]) is 0
</span><span class="cx"> PASS indexedDB.cmp([[]],[[], []]) is -1
</span><span class="cx"> PASS indexedDB.cmp([[], []],[[]]) is 1
</span><span class="lines">@@ -536,486 +600,6 @@
</span><span class="cx"> PASS code is 0
</span><span class="cx"> PASS ename is 'DataError'
</span><span class="cx"> Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
</span><del>-Expecting exception from indexedDB.cmp(self.document.body, new Uint8Array())
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array(), self.document.body)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(self.document.body, 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', self.document.body)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array(), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array())
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array(), new Uint8Array([0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0]), new Uint8Array())
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array(), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array())
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0]), new Uint8Array([0, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 0]), new Uint8Array([0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 0]), new Uint8Array([0, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 1]), new Uint8Array([0, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 1]), new Uint8Array([1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1]), new Uint8Array([0, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([0, 1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([0, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1]), new Uint8Array([1, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 0]), new Uint8Array([1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 0]), new Uint8Array([1, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 1]), new Uint8Array([1, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 0]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1, 0]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 1]), new Uint8Array([255]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([255]), new Uint8Array([1, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([1, 1]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([1, 1]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([255]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([255]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([255]), [new Uint8Array()])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array()], new Uint8Array([255]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp(new Uint8Array([255]), 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', new Uint8Array([255]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array()], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array()])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array()], [new Uint8Array([0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0])], [new Uint8Array()])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array()], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array()])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0])], [new Uint8Array([0, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 0])], [new Uint8Array([0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 0])], [new Uint8Array([0, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 1])], [new Uint8Array([0, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 1])], [new Uint8Array([1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1])], [new Uint8Array([0, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([0, 1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([0, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1])], [new Uint8Array([1, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 0])], [new Uint8Array([1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 0])], [new Uint8Array([1, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 1])], [new Uint8Array([1, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 0])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1, 0])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 1])], [new Uint8Array([255])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([255])], [new Uint8Array([1, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([1, 1])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([1, 1])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp([new Uint8Array([255])], 'valid')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
-Expecting exception from indexedDB.cmp('valid', [new Uint8Array([255])])
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
</del><span class="cx">
</span><span class="cx"> compare identical keys
</span><span class="cx"> PASS indexedDB.cmp(0, -0) is 0
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbkeytypebinaryexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/key-type-binary-expected.txt (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/key-type-binary-expected.txt        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/storage/indexeddb/key-type-binary-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -10,121 +10,49 @@
</span><span class="cx"> db.createObjectStore('store');
</span><span class="cx">
</span><span class="cx">
</span><del>-testInvalidBinaryKeys1():
</del><ins>+testBinaryKeys1():
</ins><span class="cx"> trans = db.transaction('store', 'readwrite')
</span><span class="cx"> store = trans.objectStore('store')
</span><span class="cx">
</span><del>-Expecting exception from store.put(0, new Uint8Array([]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(0, new Uint8Array([]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(1, new Uint8Array([0]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(1, new Uint8Array([0]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(2, new Uint8Array([0, 0]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(2, new Uint8Array([0, 0]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(3, new Uint8Array([0, 1]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(3, new Uint8Array([0, 1]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(4, new Uint8Array([1]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(4, new Uint8Array([1]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(5, new Uint8Array([1, 0]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(5, new Uint8Array([1, 0]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(6, new Uint8Array([1, 1]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(6, new Uint8Array([1, 1]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(7, new Uint8Array([255]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(7, new Uint8Array([255]));
</ins><span class="cx">
</span><del>-testInvalidBinaryKeys2():
</del><ins>+testBinaryKeys2():
</ins><span class="cx"> trans = db.transaction('store', 'readwrite')
</span><span class="cx"> store = trans.objectStore('store')
</span><span class="cx">
</span><del>-Expecting exception from store.put('value', new Uint8ClampedArray([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Uint8ClampedArray([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Uint16Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Uint16Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Uint32Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Uint32Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Int8Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Int8Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Int16Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Int16Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Int32Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Int32Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Float32Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Float32Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Float64Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Float64Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Uint8Array([1,2,3]).buffer)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Uint8Array([1,2,3]).buffer)
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new DataView(new Uint8Array([1,2,3]).buffer))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new DataView(new Uint8Array([1,2,3]).buffer))
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbkeytypebinaryprivateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/key-type-binary-private-expected.txt (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/key-type-binary-private-expected.txt        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/storage/indexeddb/key-type-binary-private-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -10,121 +10,49 @@
</span><span class="cx"> db.createObjectStore('store');
</span><span class="cx">
</span><span class="cx">
</span><del>-testInvalidBinaryKeys1():
</del><ins>+testBinaryKeys1():
</ins><span class="cx"> trans = db.transaction('store', 'readwrite')
</span><span class="cx"> store = trans.objectStore('store')
</span><span class="cx">
</span><del>-Expecting exception from store.put(0, new Uint8Array([]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(0, new Uint8Array([]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(1, new Uint8Array([0]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(1, new Uint8Array([0]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(2, new Uint8Array([0, 0]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(2, new Uint8Array([0, 0]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(3, new Uint8Array([0, 1]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(3, new Uint8Array([0, 1]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(4, new Uint8Array([1]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(4, new Uint8Array([1]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(5, new Uint8Array([1, 0]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(5, new Uint8Array([1, 0]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(6, new Uint8Array([1, 1]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(6, new Uint8Array([1, 1]));
</ins><span class="cx">
</span><del>-Expecting exception from store.put(7, new Uint8Array([255]));
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put(7, new Uint8Array([255]));
</ins><span class="cx">
</span><del>-testInvalidBinaryKeys2():
</del><ins>+testBinaryKeys2():
</ins><span class="cx"> trans = db.transaction('store', 'readwrite')
</span><span class="cx"> store = trans.objectStore('store')
</span><span class="cx">
</span><del>-Expecting exception from store.put('value', new Uint8ClampedArray([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Uint8ClampedArray([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Uint16Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Uint16Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Uint32Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Uint32Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Int8Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Int8Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Int16Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Int16Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Int32Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Int32Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Float32Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Float32Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Float64Array([1,2,3]))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Float64Array([1,2,3]))
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new Uint8Array([1,2,3]).buffer)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new Uint8Array([1,2,3]).buffer)
</ins><span class="cx">
</span><del>-Expecting exception from store.put('value', new DataView(new Uint8Array([1,2,3]).buffer))
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
</del><ins>+store.put('value', new DataView(new Uint8Array([1,2,3]).buffer))
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernbinarykeys1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-expected.txt (0 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-expected.txt         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+This test verifies the basic use of binary keys.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Initial upgrade needed: Old version - 0 New version - 1
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 0
+PASS key.byteLength is binary.byteLength
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 4
+PASS dataView.getUint32(0) is new DataView(key).getUint32(0)
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 4
+PASS dataView.getUint32(0) is new DataView(key).getUint32(0)
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 4
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+Got the key and value with a cursor
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 4
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS retrievedValue is expectedValue
+Got the value with a DataView key: Value
+Got the value with an ArrayBuffer key: Value
+Got the value with a Typed Array key: Value
+Got the value with a Typed Array key, but changed from the original put: undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernbinarykeys1privateexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-private-expected.txt (0 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-private-expected.txt         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-private-expected.txt        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+This test verifies the basic use of binary keys.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Initial upgrade needed: Old version - 0 New version - 1
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 0
+PASS key.byteLength is binary.byteLength
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 4
+PASS dataView.getUint32(0) is new DataView(key).getUint32(0)
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 4
+PASS dataView.getUint32(0) is new DataView(key).getUint32(0)
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 4
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+Got the key and value with a cursor
+PASS key instanceof ArrayBuffer is true
+PASS key.byteLength is 4
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS keyInInt8Array[i] is int8Array[i]
+PASS retrievedValue is expectedValue
+Got the value with a DataView key: Value
+Got the value with an ArrayBuffer key: Value
+Got the value with a Typed Array key: Value
+Got the value with a Typed Array key, but changed from the original put: undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernbinarykeys1privatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-private.html (0 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-private.html         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1-private.html        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<html>
+<head>
+<script>
+enablePrivateBrowsing = true;
+</script>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/binary-keys-1.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernbinarykeys1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1.html (0 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1.html         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/binary-keys-1.html        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/binary-keys-1.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesbinarykeys1js"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/binary-keys-1.js (0 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/binary-keys-1.js         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/binary-keys-1.js        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+description("This test verifies the basic use of binary keys.");
+
+indexedDBTest(prepareDatabase);
+
+function log(message)
+{
+ debug(message);
+}
+
+var testGenerator;
+function next()
+{
+ testGenerator.next();
+}
+
+function asyncNext()
+{
+ setTimeout("testGenerator.next();", 0);
+}
+
+var db;
+var dbName;
+var dbVersion;
+
+function prepareDatabase(event)
+{
+ log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+
+ db = event.target.result;
+ dbName = db.name;
+ dbVersion = db.version;
+
+ db.createObjectStore("TestObjectStore");
+
+ event.target.onsuccess = function() {
+ testGenerator = testSteps();
+ testGenerator.next();
+ };
+}
+
+// Some testing values borrowed from <root>/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion.htm
+function* testSteps()
+{
+ binary = new ArrayBuffer(0);
+ key = IDBKeyRange.lowerBound(binary).lower;
+
+ shouldBeTrue("key instanceof ArrayBuffer");
+ shouldBe("key.byteLength", "0");
+ shouldBe("key.byteLength", "binary.byteLength");
+
+ // Key based on ArrayBuffer
+ binary = new ArrayBuffer(4);
+ dataView = new DataView(binary);
+ dataView.setUint32(0, 1234567890);
+ key = IDBKeyRange.lowerBound(binary).lower;
+
+ shouldBeTrue("key instanceof ArrayBuffer");
+ shouldBe("key.byteLength", "4");
+ shouldBe("dataView.getUint32(0)", "new DataView(key).getUint32(0)");
+
+ // Key based on DataView
+ binary = new ArrayBuffer(4);
+ dataView = new DataView(binary);
+ dataView.setUint32(0, 1234567890);
+ key = IDBKeyRange.lowerBound(dataView).lower;
+
+ shouldBeTrue("key instanceof ArrayBuffer");
+ shouldBe("key.byteLength", "4");
+ shouldBe("dataView.getUint32(0)", "new DataView(key).getUint32(0)");
+
+ // Typed array
+ binary = new ArrayBuffer(4);
+ dataView = new DataView(binary);
+ int8Array = new Int8Array(binary);
+ int8Array.set([16, -32, 64, -128]);
+
+ key = IDBKeyRange.lowerBound(int8Array).lower;
+ keyInInt8Array = new Int8Array(key);
+
+ shouldBeTrue("key instanceof ArrayBuffer");
+ shouldBe("key.byteLength", "4");
+ for (i = 0; i < int8Array.length; ++i) {
+ shouldBe("keyInInt8Array[i]", "int8Array[i]");
+ }
+
+ transaction = db.transaction("TestObjectStore", "readwrite");
+ objectStore = transaction.objectStore("TestObjectStore");
+ objectStore.put("Value", dataView).onsuccess = next;
+ yield;
+
+        objectStore.openCursor().onsuccess = function(event) {
+                debug("Got the key and value with a cursor");
+                key = event.target.result.key;
+         keyInInt8Array = new Int8Array(key);
+
+         shouldBeTrue("key instanceof ArrayBuffer");
+         shouldBe("key.byteLength", "4");
+         for (i = 0; i < int8Array.length; ++i) {
+         shouldBe("keyInInt8Array[i]", "int8Array[i]");
+         }
+
+                retrievedValue = event.target.result.value;
+                expectedValue = "Value"
+                shouldBe("retrievedValue", "expectedValue");
+                
+                next();
+        }
+        yield;
+
+ objectStore.get(dataView).onsuccess = function(event) {
+ debug("Got the value with a DataView key: " + event.target.result);
+ next();
+ }
+ yield;
+
+ objectStore.get(binary).onsuccess = function(event) {
+ debug("Got the value with an ArrayBuffer key: " + event.target.result);
+ next();
+ }
+ yield;
+
+ objectStore.get(int8Array).onsuccess = function(event) {
+ debug("Got the value with a Typed Array key: " + event.target.result);
+ next();
+ }
+ yield;
+
+ int8Array.set([10, 10, 10, 10]);
+ objectStore.get(int8Array).onsuccess = function(event) {
+ debug("Got the value with a Typed Array key, but changed from the original put: " + event.target.result);
+ next();
+ }
+ yield;
+
+ finishJSTest();
+}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbresourcesfactorycmpjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/resources/factory-cmp.js (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/resources/factory-cmp.js        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/storage/indexeddb/resources/factory-cmp.js        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -49,6 +49,15 @@
</span><span class="cx"> "'\uD834\uDD1E'", // U+1D11E MUSICAL SYMBOL G-CLEF (UTF-16 surrogate pair)
</span><span class="cx"> "'\uFFFD'", // U+FFFD REPLACEMENT CHARACTER
</span><span class="cx">
</span><ins>+ "new Uint8Array()",
+ "new Uint8Array([0])",
+ "new Uint8Array([0, 0])",
+ "new Uint8Array([0, 1])",
+ "new Uint8Array([1])",
+ "new Uint8Array([1, 0])",
+ "new Uint8Array([1, 1])",
+ "new Uint8Array([255])",
+
</ins><span class="cx"> "[]",
</span><span class="cx">
</span><span class="cx"> "[-Infinity]",
</span><span class="lines">@@ -77,6 +86,15 @@
</span><span class="cx"> "['\uD834\uDD1E']", // U+1D11E MUSICAL SYMBOL G-CLEF (UTF-16 surrogate pair)
</span><span class="cx"> "['\uFFFD']", // U+FFFD REPLACEMENT CHARACTER
</span><span class="cx">
</span><ins>+ "[new Uint8Array()]",
+ "[new Uint8Array([0])]",
+ "[new Uint8Array([0, 0])]",
+ "[new Uint8Array([0, 1])]",
+ "[new Uint8Array([1])]",
+ "[new Uint8Array([1, 0])]",
+ "[new Uint8Array([1, 1])]",
+ "[new Uint8Array([255])]",
+
</ins><span class="cx"> "[[]]",
</span><span class="cx">
</span><span class="cx"> "[[], []]",
</span><span class="lines">@@ -83,7 +101,7 @@
</span><span class="cx"> "[[], [], []]",
</span><span class="cx">
</span><span class="cx"> "[[[]]]",
</span><del>- "[[[[]]]]"
</del><ins>+ "[[[[]]]]",
</ins><span class="cx"> ];
</span><span class="cx">
</span><span class="cx"> var i, key1, key2;
</span><span class="lines">@@ -115,22 +133,6 @@
</span><span class="cx"> "self",
</span><span class="cx"> "self.document",
</span><span class="cx"> "self.document.body",
</span><del>- "new Uint8Array()",
- "new Uint8Array([0])",
- "new Uint8Array([0, 0])",
- "new Uint8Array([0, 1])",
- "new Uint8Array([1])",
- "new Uint8Array([1, 0])",
- "new Uint8Array([1, 1])",
- "new Uint8Array([255])",
- "[new Uint8Array()]",
- "[new Uint8Array([0])]",
- "[new Uint8Array([0, 0])]",
- "[new Uint8Array([0, 1])]",
- "[new Uint8Array([1])]",
- "[new Uint8Array([1, 0])]",
- "[new Uint8Array([1, 1])]",
- "[new Uint8Array([255])]",
</del><span class="cx"> ];
</span><span class="cx">
</span><span class="cx"> var i, key1, key2;
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbresourceskeytypebinaryjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/resources/key-type-binary.js (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/resources/key-type-binary.js        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/LayoutTests/storage/indexeddb/resources/key-type-binary.js        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">
</span><span class="cx"> description("Test IndexedDB binary keys");
</span><span class="cx">
</span><del>-indexedDBTest(prepareDatabase, testInvalidBinaryKeys1);
</del><ins>+indexedDBTest(prepareDatabase, testBinaryKeys1);
</ins><span class="cx"> function prepareDatabase()
</span><span class="cx"> {
</span><span class="cx"> db = event.target.result;
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> debug("");
</span><span class="cx"> }
</span><span class="cx">
</span><del>-function testInvalidBinaryKeys1()
</del><ins>+function testBinaryKeys1()
</ins><span class="cx"> {
</span><span class="cx"> preamble();
</span><span class="cx"> evalAndLog("trans = db.transaction('store', 'readwrite')");
</span><span class="lines">@@ -39,14 +39,14 @@
</span><span class="cx"> key = cases.shift();
</span><span class="cx"> value = n++;
</span><span class="cx"> debug("");
</span><del>- evalAndExpectException("store.put(" + JSON.stringify(value) + ", new Uint8Array(" + key + "));", "0", "'DataError'");
</del><ins>+ evalAndLog("store.put(" + JSON.stringify(value) + ", new Uint8Array(" + key + "));");
</ins><span class="cx"> }
</span><span class="cx"> }());
</span><span class="cx">
</span><del>- trans.oncomplete = testInvalidBinaryKeys2;
</del><ins>+ trans.oncomplete = testBinaryKeys2;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-function testInvalidBinaryKeys2()
</del><ins>+function testBinaryKeys2()
</ins><span class="cx"> {
</span><span class="cx"> preamble();
</span><span class="cx"> evalAndLog("trans = db.transaction('store', 'readwrite')");
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">
</span><span class="cx"> cases.forEach(function(testCase) {
</span><span class="cx"> debug("");
</span><del>- evalAndExpectException("store.put('value', " + testCase + ")", "0", "'DataError'");
</del><ins>+ evalAndLog("store.put('value', " + testCase + ")");
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> finishJSTest();
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WTF/ChangeLog        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-11-03 Brady Eidson <beidson@apple.com>
+
+ IndexedDB 2.0: Support binary keys.
+ <rdar://problem/28806927> and https://bugs.webkit.org/show_bug.cgi?id=164359
+
+ Reviewed by Alex Christensen.
+
+ * wtf/Hasher.h:
+ (WTF::StringHasher::hashMemory): Teach hashMemory() to handle buffers with odd lengths.
+
</ins><span class="cx"> 2016-11-02 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> The GC should be in a thread
</span></span></pre></div>
<a id="trunkSourceWTFwtfHasherh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Hasher.h (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Hasher.h        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WTF/wtf/Hasher.h        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -240,16 +240,18 @@
</span><span class="cx">
</span><span class="cx"> static unsigned hashMemory(const void* data, unsigned length)
</span><span class="cx"> {
</span><del>- // FIXME: Why does this function use the version of the hash that drops the top 8 bits?
- // We want that for all string hashing so we can use those bits in StringImpl and hash
- // strings consistently, but I don't see why we'd want that for general memory hashing.
- ASSERT(!(length % 2));
- return computeHashAndMaskTop8Bits<UChar>(static_cast<const UChar*>(data), length / sizeof(UChar));
</del><ins>+ size_t lengthInUChar = length / sizeof(UChar);
+ StringHasher hasher;
+ hasher.addCharactersAssumingAligned(static_cast<const UChar*>(data), lengthInUChar);
+
+ for (size_t i = 0; i < length % sizeof(UChar); ++i)
+ hasher.addCharacter(static_cast<const char*>(data)[lengthInUChar * sizeof(UChar) + i]);
+
+ return hasher.hash();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<size_t length> static unsigned hashMemory(const void* data)
</span><span class="cx"> {
</span><del>- static_assert(!(length % 2), "length must be a multiple of two!");
</del><span class="cx"> return hashMemory(data, length);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WebCore/ChangeLog        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2016-11-03 Brady Eidson <beidson@apple.com>
+
+ IndexedDB 2.0: Support binary keys.
+ <rdar://problem/28806927> and https://bugs.webkit.org/show_bug.cgi?id=164359
+
+ Reviewed by Alex Christensen.
+
+ Tests: storage/indexeddb/modern/binary-keys-1-private.html
+ storage/indexeddb/modern/binary-keys-1.html
+ Changes to other existing tests.
+
+ * Modules/indexeddb/IDBKey.cpp:
+ (WebCore::IDBKey::createBinary):
+ (WebCore::IDBKey::IDBKey):
+ (WebCore::IDBKey::compare):
+ * Modules/indexeddb/IDBKey.h:
+ (WebCore::IDBKey::binary):
+ (WebCore::compareBinaryKeyData):
+
+ * Modules/indexeddb/IDBKeyData.cpp:
+ (WebCore::IDBKeyData::IDBKeyData):
+ (WebCore::IDBKeyData::maybeCreateIDBKey):
+ (WebCore::IDBKeyData::isolatedCopy):
+ (WebCore::IDBKeyData::encode):
+ (WebCore::IDBKeyData::decode):
+ (WebCore::IDBKeyData::compare):
+ (WebCore::IDBKeyData::loggingString):
+ (WebCore::IDBKeyData::operator==):
+ * Modules/indexeddb/IDBKeyData.h:
+ (WebCore::IDBKeyData::hash):
+ (WebCore::IDBKeyData::encode):
+ (WebCore::IDBKeyData::decode):
+
+ * Modules/indexeddb/IndexedDB.h: Add new enum for the new key type.
+
+ * bindings/js/IDBBindingUtilities.cpp:
+ (WebCore::toJS):
+ (WebCore::createIDBKeyFromValue):
+
+ * platform/ThreadSafeDataBuffer.h:
+ (WebCore::ThreadSafeDataBufferImpl::ThreadSafeDataBufferImpl):
+ (WebCore::ThreadSafeDataBuffer::copyData):
+ (WebCore::ThreadSafeDataBuffer::size):
+ (WebCore::ThreadSafeDataBuffer::operator==):
+ (WebCore::ThreadSafeDataBuffer::ThreadSafeDataBuffer):
+
</ins><span class="cx"> 2016-11-03 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Printing to PDF should produce internal links when HTML has internal links
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -29,11 +29,32 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><span class="cx"> #include "IDBKeyData.h"
</span><ins>+#include <runtime/ArrayBufferView.h>
+#include <runtime/JSArrayBuffer.h>
+#include <runtime/JSArrayBufferView.h>
+#include <runtime/JSCInlines.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> using IDBKeyVector = Vector<RefPtr<IDBKey>>;
</span><span class="cx">
</span><ins>+Ref<IDBKey> IDBKey::createBinary(const ThreadSafeDataBuffer& buffer)
+{
+ return adoptRef(*new IDBKey(buffer));
+}
+
+Ref<IDBKey> IDBKey::createBinary(JSC::JSArrayBuffer& arrayBuffer)
+{
+ auto* buffer = arrayBuffer.impl();
+ return adoptRef(*new IDBKey(ThreadSafeDataBuffer::copyData(buffer->data(), buffer->byteLength())));
+}
+
+Ref<IDBKey> IDBKey::createBinary(JSC::JSArrayBufferView& arrayBufferView)
+{
+ auto bufferView = arrayBufferView.possiblySharedImpl();
+ return adoptRef(*new IDBKey(ThreadSafeDataBuffer::copyData(bufferView->data(), bufferView->byteLength())));
+}
+
</ins><span class="cx"> IDBKey::IDBKey(KeyType type, double number)
</span><span class="cx"> : m_type(type)
</span><span class="cx"> , m_value(number)
</span><span class="lines">@@ -55,6 +76,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+IDBKey::IDBKey(const ThreadSafeDataBuffer& buffer)
+ : m_type(KeyType::Binary)
+ , m_value(buffer)
+ , m_sizeEstimate(OverheadSize + buffer.size())
+{
+}
+
</ins><span class="cx"> IDBKey::~IDBKey()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -93,6 +121,8 @@
</span><span class="cx"> return 1;
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><ins>+ case KeyType::Binary:
+ return compareBinaryKeyData(WTF::get<ThreadSafeDataBuffer>(m_value), WTF::get<ThreadSafeDataBuffer>(other.m_value));
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> return -codePointCompare(WTF::get<String>(other.m_value), WTF::get<String>(m_value));
</span><span class="cx"> case KeyType::Date:
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKey.h (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKey.h        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKey.h        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -23,12 +23,12 @@
</span><span class="cx"> * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef IDBKey_h
-#define IDBKey_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><span class="cx"> #include "IndexedDB.h"
</span><ins>+#include "ThreadSafeDataBuffer.h"
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/Variant.h>
</span><span class="lines">@@ -37,6 +37,11 @@
</span><span class="cx">
</span><span class="cx"> using WebCore::IndexedDB::KeyType;
</span><span class="cx">
</span><ins>+namespace JSC {
+class JSArrayBuffer;
+class JSArrayBufferView;
+}
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class IDBKey : public RefCounted<IDBKey> {
</span><span class="lines">@@ -96,6 +101,10 @@
</span><span class="cx"> return adoptRef(*new IDBKey(array, sizeEstimate));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ static Ref<IDBKey> createBinary(const ThreadSafeDataBuffer&);
+ static Ref<IDBKey> createBinary(JSC::JSArrayBuffer&);
+ static Ref<IDBKey> createBinary(JSC::JSArrayBufferView&);
+
</ins><span class="cx"> WEBCORE_EXPORT ~IDBKey();
</span><span class="cx">
</span><span class="cx"> KeyType type() const { return m_type; }
</span><span class="lines">@@ -125,6 +134,12 @@
</span><span class="cx"> return WTF::get<double>(m_value);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ const ThreadSafeDataBuffer& binary() const
+ {
+ ASSERT(m_type == KeyType::Binary);
+ return WTF::get<ThreadSafeDataBuffer>(m_value);
+ }
+
</ins><span class="cx"> int compare(const IDBKey& other) const;
</span><span class="cx"> bool isLessThan(const IDBKey& other) const;
</span><span class="cx"> bool isEqual(const IDBKey& other) const;
</span><span class="lines">@@ -153,9 +168,10 @@
</span><span class="cx"> IDBKey(KeyType, double number);
</span><span class="cx"> explicit IDBKey(const String& value);
</span><span class="cx"> IDBKey(const Vector<RefPtr<IDBKey>>& keyArray, size_t arraySize);
</span><ins>+ explicit IDBKey(const ThreadSafeDataBuffer&);
</ins><span class="cx">
</span><span class="cx"> const KeyType m_type;
</span><del>- Variant<Vector<RefPtr<IDBKey>>, String, double> m_value;
</del><ins>+ Variant<Vector<RefPtr<IDBKey>>, String, double, ThreadSafeDataBuffer> m_value;
</ins><span class="cx">
</span><span class="cx"> const size_t m_sizeEstimate;
</span><span class="cx">
</span><span class="lines">@@ -163,8 +179,43 @@
</span><span class="cx"> enum { OverheadSize = 16 };
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+inline int compareBinaryKeyData(const Vector<uint8_t>& a, const Vector<uint8_t>& b)
+{
+ size_t length = std::min(a.size(), b.size());
+
+ for (size_t i = 0; i < length; ++i) {
+ if (a[i] > b[i])
+ return 1;
+ if (a[i] < b[i])
+ return -1;
+ }
+
+ if (a.size() == b.size())
+ return 0;
+
+ if (a.size() > b.size())
+ return 1;
+
+ return -1;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+inline int compareBinaryKeyData(const ThreadSafeDataBuffer& a, const ThreadSafeDataBuffer& b)
+{
+ auto* aData = a.data();
+ auto* bData = b.data();
+
+ // Covers the cases where both pointers are null as well as both pointing to the same buffer.
+ if (aData == bData)
+ return 0;
+
+ if (aData && !bData)
+ return 1;
+ if (!aData && bData)
+ return -1;
+
+ return compareBinaryKeyData(*aData, *bData);
+}
+
+}
+
</ins><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span><del>-
-#endif // IDBKey_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -53,6 +53,9 @@
</span><span class="cx"> array.append(IDBKeyData(key2.get()));
</span><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+ case KeyType::Binary:
+ m_value = key->binary();
+ break;
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> m_value = key->string();
</span><span class="cx"> break;
</span><span class="lines">@@ -84,6 +87,8 @@
</span><span class="cx"> }
</span><span class="cx"> return IDBKey::createArray(array);
</span><span class="cx"> }
</span><ins>+ case KeyType::Binary:
+ return IDBKey::createBinary(WTF::get<ThreadSafeDataBuffer>(m_value));
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> return IDBKey::createString(WTF::get<String>(m_value));
</span><span class="cx"> case KeyType::Date:
</span><span class="lines">@@ -125,6 +130,9 @@
</span><span class="cx"> destinationArray.append(key.isolatedCopy());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><ins>+ case KeyType::Binary:
+ destination.m_value = WTF::get<ThreadSafeDataBuffer>(source.m_value);
+ return;
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> destination.m_value = WTF::get<String>(source.m_value).isolatedCopy();
</span><span class="cx"> return;
</span><span class="lines">@@ -158,6 +166,13 @@
</span><span class="cx"> });
</span><span class="cx"> return;
</span><span class="cx"> }
</span><ins>+ case KeyType::Binary: {
+ auto* data = WTF::get<ThreadSafeDataBuffer>(m_value).data();
+ encoder.encodeBool("hasBinary", !!data);
+ if (data)
+ encoder.encodeBytes("binary", data->data(), data->size());
+ return;
+ }
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> encoder.encodeString("string", WTF::get<String>(m_value));
</span><span class="cx"> return;
</span><span class="lines">@@ -185,6 +200,7 @@
</span><span class="cx"> return value == KeyType::Max
</span><span class="cx"> || value == KeyType::Invalid
</span><span class="cx"> || value == KeyType::Array
</span><ins>+ || value == KeyType::Binary
</ins><span class="cx"> || value == KeyType::String
</span><span class="cx"> || value == KeyType::Date
</span><span class="cx"> || value == KeyType::Number
</span><span class="lines">@@ -212,6 +228,24 @@
</span><span class="cx"> return decoder.decodeDouble("number", WTF::get<double>(result.m_value));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (result.m_type == KeyType::Binary) {
+ result.m_value = ThreadSafeDataBuffer();
+
+ bool hasBinaryData;
+ if (!decoder.decodeBool("hasBinary", hasBinaryData))
+ return false;
+
+ if (!hasBinaryData)
+ return true;
+
+ Vector<uint8_t> bytes;
+ if (!decoder.decodeBytes("binary", bytes))
+ return false;
+
+ result.m_value = ThreadSafeDataBuffer::adoptVector(bytes);
+ return true;
+ }
+
</ins><span class="cx"> ASSERT(result.m_type == KeyType::Array);
</span><span class="cx">
</span><span class="cx"> auto arrayFunction = [](KeyedDecoder& decoder, IDBKeyData& result) {
</span><span class="lines">@@ -255,6 +289,8 @@
</span><span class="cx"> return 1;
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><ins>+ case KeyType::Binary:
+ return compareBinaryKeyData(WTF::get<ThreadSafeDataBuffer>(m_value), WTF::get<ThreadSafeDataBuffer>(other.m_value));
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> return codePointCompare(WTF::get<String>(m_value), WTF::get<String>(other.m_value));
</span><span class="cx"> case KeyType::Date:
</span><span class="lines">@@ -299,6 +335,27 @@
</span><span class="cx"> result = builder.toString();
</span><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+ case KeyType::Binary: {
+ StringBuilder builder;
+ builder.append("<binary> - ");
+
+ auto* data = WTF::get<ThreadSafeDataBuffer>(m_value).data();
+ if (!data) {
+ builder.append("(null)");
+ result = builder.toString();
+ break;
+ }
+
+ size_t i = 0;
+ for (; i < 8 && i < data->size(); ++i)
+ builder.append(String::format("%02x", data->at(i)));
+
+ if (data->size() > 8)
+ builder.append("...");
+
+ result = builder.toString();
+ break;
+ }
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> result = "<string> - " + WTF::get<String>(m_value);
</span><span class="cx"> break;
</span><span class="lines">@@ -310,8 +367,6 @@
</span><span class="cx"> return "<maximum>";
</span><span class="cx"> case KeyType::Min:
</span><span class="cx"> return "<minimum>";
</span><del>- default:
- return String();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (result.length() > 150) {
</span><span class="lines">@@ -382,6 +437,8 @@
</span><span class="cx"> return WTF::get<double>(m_value) == WTF::get<double>(other.m_value);
</span><span class="cx"> case KeyType::String:
</span><span class="cx"> return WTF::get<String>(m_value) == WTF::get<String>(other.m_value);
</span><ins>+ case KeyType::Binary:
+ return WTF::get<ThreadSafeDataBuffer>(m_value) == WTF::get<ThreadSafeDataBuffer>(other.m_value);
</ins><span class="cx"> case KeyType::Array:
</span><span class="cx"> return WTF::get<Vector<IDBKeyData>>(m_value) == WTF::get<Vector<IDBKeyData>>(other.m_value);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef IDBKeyData_h
-#define IDBKeyData_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><span class="lines">@@ -120,6 +119,14 @@
</span><span class="cx"> case KeyType::String:
</span><span class="cx"> hashCodes.append(StringHash::hash(WTF::get<String>(m_value)));
</span><span class="cx"> break;
</span><ins>+ case KeyType::Binary: {
+ auto* data = WTF::get<ThreadSafeDataBuffer>(m_value).data();
+ if (!data)
+ hashCodes.append(0);
+ else
+ hashCodes.append(StringHasher::hashMemory(data->data(), data->size()));
+ break;
+ }
</ins><span class="cx"> case KeyType::Array:
</span><span class="cx"> for (auto& key : WTF::get<Vector<IDBKeyData>>(m_value))
</span><span class="cx"> hashCodes.append(key.hash());
</span><span class="lines">@@ -160,7 +167,7 @@
</span><span class="cx"> static void isolatedCopy(const IDBKeyData& source, IDBKeyData& destination);
</span><span class="cx">
</span><span class="cx"> KeyType m_type;
</span><del>- Variant<Vector<IDBKeyData>, String, double> m_value;
</del><ins>+ Variant<Vector<IDBKeyData>, String, double, ThreadSafeDataBuffer> m_value;
</ins><span class="cx">
</span><span class="cx"> bool m_isNull { false };
</span><span class="cx"> bool m_isDeletedValue { false };
</span><span class="lines">@@ -214,6 +221,9 @@
</span><span class="cx"> case KeyType::Array:
</span><span class="cx"> encoder << WTF::get<Vector<IDBKeyData>>(m_value);
</span><span class="cx"> break;
</span><ins>+ case KeyType::Binary:
+ encoder << WTF::get<ThreadSafeDataBuffer>(m_value);
+ break;
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> encoder << WTF::get<String>(m_value);
</span><span class="cx"> break;
</span><span class="lines">@@ -246,6 +256,11 @@
</span><span class="cx"> if (!decoder.decode(WTF::get<Vector<IDBKeyData>>(keyData.m_value)))
</span><span class="cx"> return false;
</span><span class="cx"> break;
</span><ins>+ case KeyType::Binary:
+ keyData.m_value = ThreadSafeDataBuffer();
+ if (!decoder.decode(WTF::get<ThreadSafeDataBuffer>(keyData.m_value)))
+ return false;
+ break;
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> keyData.m_value = String();
</span><span class="cx"> if (!decoder.decode(WTF::get<String>(keyData.m_value)))
</span><span class="lines">@@ -265,4 +280,3 @@
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span><del>-#endif // IDBKeyData_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIndexedDBh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> Max = -1,
</span><span class="cx"> Invalid = 0,
</span><span class="cx"> Array,
</span><ins>+ Binary,
</ins><span class="cx"> String,
</span><span class="cx"> Date,
</span><span class="cx"> Number,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #include "SerializedScriptValue.h"
</span><span class="cx"> #include "SharedBuffer.h"
</span><span class="cx"> #include "ThreadSafeDataBuffer.h"
</span><ins>+#include <runtime/ArrayBuffer.h>
</ins><span class="cx"> #include <runtime/DateInstance.h>
</span><span class="cx"> #include <runtime/ObjectConstructor.h>
</span><span class="cx">
</span><span class="lines">@@ -104,6 +105,20 @@
</span><span class="cx"> outArray->putDirectIndex(&state, i, toJS(state, globalObject, inArray.at(i).get()));
</span><span class="cx"> return outArray;
</span><span class="cx"> }
</span><ins>+ case KeyType::Binary: {
+ auto* data = key->binary().data();
+ if (!data) {
+ ASSERT_NOT_REACHED();
+ return jsNull();
+ }
+
+ auto arrayBuffer = ArrayBuffer::create(data->data(), data->size());
+ Structure* structure = globalObject.arrayBufferStructure(arrayBuffer->sharingMode());
+ if (!structure)
+ return jsNull();
+
+ return JSArrayBuffer::create(state.vm(), structure, WTFMove(arrayBuffer));
+ }
</ins><span class="cx"> case KeyType::String:
</span><span class="cx"> return jsStringWithCache(&state, key->string());
</span><span class="cx"> case KeyType::Date:
</span><span class="lines">@@ -163,6 +178,12 @@
</span><span class="cx"> stack.removeLast();
</span><span class="cx"> return IDBKey::createArray(subkeys);
</span><span class="cx"> }
</span><ins>+
+ if (auto* arrayBuffer = jsDynamicCast<JSArrayBuffer*>(value))
+ return IDBKey::createBinary(*arrayBuffer);
+
+ if (auto* arrayBufferView = jsDynamicCast<JSArrayBufferView*>(value))
+ return IDBKey::createBinary(*arrayBufferView);
</ins><span class="cx"> }
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformThreadSafeDataBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ThreadSafeDataBuffer.h (208348 => 208349)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ThreadSafeDataBuffer.h        2016-11-03 21:20:12 UTC (rev 208348)
+++ trunk/Source/WebCore/platform/ThreadSafeDataBuffer.h        2016-11-03 21:47:21 UTC (rev 208349)
</span><span class="lines">@@ -47,6 +47,12 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ ThreadSafeDataBufferImpl(const void* data, unsigned length)
+ : m_data(length)
+ {
+ memcpy(m_data.data(), data, length);
+ }
+
</ins><span class="cx"> Vector<uint8_t> m_data;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -62,6 +68,11 @@
</span><span class="cx"> return ThreadSafeDataBuffer(data);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ static ThreadSafeDataBuffer copyData(const void* data, unsigned length)
+ {
+ return ThreadSafeDataBuffer(data, length);
+ }
+
</ins><span class="cx"> ThreadSafeDataBuffer()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -71,6 +82,19 @@
</span><span class="cx"> return m_impl ? &m_impl->m_data : nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ size_t size() const
+ {
+ return m_impl ? m_impl->m_data.size() : 0;
+ }
+
+ bool operator==(const ThreadSafeDataBuffer& other) const
+ {
+ if (!m_impl)
+ return !other.m_impl;
+
+ return m_impl->m_data == other.m_impl->m_data;
+ }
+
</ins><span class="cx"> template<class Encoder> void encode(Encoder&) const;
</span><span class="cx"> template<class Decoder> static bool decode(Decoder&, ThreadSafeDataBuffer&);
</span><span class="cx">
</span><span class="lines">@@ -85,6 +109,11 @@
</span><span class="cx"> m_impl = adoptRef(new ThreadSafeDataBufferImpl(data));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ explicit ThreadSafeDataBuffer(const void* data, unsigned length)
+ {
+ m_impl = adoptRef(new ThreadSafeDataBufferImpl(data, length));
+ }
+
</ins><span class="cx"> RefPtr<ThreadSafeDataBufferImpl> m_impl;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>