<!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.
&lt;rdar://problem/28806927&gt; 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  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Support binary keys.
+        &lt;rdar://problem/28806927&gt; 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  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSS.supports(&quot;font-variation-settings&quot;, &quot;'wght' 500&quot;) 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  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Support binary keys.
+        &lt;rdar://problem/28806927&gt; 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  &lt;beidson@apple.com&gt;
</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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Initial upgrade needed: Old version - 0 New version - 1
+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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Initial upgrade needed: Old version - 0 New version - 1
+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>+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+enablePrivateBrowsing = true;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/binary-keys-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/binary-keys-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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(&quot;This test verifies the basic use of binary keys.&quot;);
+
+indexedDBTest(prepareDatabase);
+
+function log(message)
+{
+    debug(message);
+}
+
+var testGenerator;
+function next()
+{
+    testGenerator.next();
+}
+
+function asyncNext()
+{
+    setTimeout(&quot;testGenerator.next();&quot;, 0);
+}
+
+var db;
+var dbName;
+var dbVersion;
+
+function prepareDatabase(event)
+{
+    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    db = event.target.result;
+    dbName = db.name;
+    dbVersion = db.version;
+
+    db.createObjectStore(&quot;TestObjectStore&quot;);
+    
+    event.target.onsuccess = function() {
+        testGenerator = testSteps();
+        testGenerator.next();
+    };
+}
+
+// Some testing values borrowed from &lt;root&gt;/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb_binary_key_conversion.htm
+function* testSteps()
+{
+    binary = new ArrayBuffer(0);
+    key = IDBKeyRange.lowerBound(binary).lower;
+
+    shouldBeTrue(&quot;key instanceof ArrayBuffer&quot;);
+    shouldBe(&quot;key.byteLength&quot;, &quot;0&quot;);
+    shouldBe(&quot;key.byteLength&quot;, &quot;binary.byteLength&quot;);
+
+    // Key based on ArrayBuffer
+    binary = new ArrayBuffer(4);
+    dataView = new DataView(binary);
+    dataView.setUint32(0, 1234567890);
+    key = IDBKeyRange.lowerBound(binary).lower;
+
+    shouldBeTrue(&quot;key instanceof ArrayBuffer&quot;);
+    shouldBe(&quot;key.byteLength&quot;, &quot;4&quot;);
+    shouldBe(&quot;dataView.getUint32(0)&quot;, &quot;new DataView(key).getUint32(0)&quot;);
+
+    // Key based on DataView
+    binary = new ArrayBuffer(4);
+    dataView = new DataView(binary);
+    dataView.setUint32(0, 1234567890);
+    key = IDBKeyRange.lowerBound(dataView).lower;
+
+    shouldBeTrue(&quot;key instanceof ArrayBuffer&quot;);
+    shouldBe(&quot;key.byteLength&quot;, &quot;4&quot;);
+    shouldBe(&quot;dataView.getUint32(0)&quot;, &quot;new DataView(key).getUint32(0)&quot;);
+
+    // 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(&quot;key instanceof ArrayBuffer&quot;);
+    shouldBe(&quot;key.byteLength&quot;, &quot;4&quot;);
+    for (i = 0; i &lt; int8Array.length; ++i) {
+        shouldBe(&quot;keyInInt8Array[i]&quot;, &quot;int8Array[i]&quot;);
+    }
+
+    transaction = db.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    objectStore.put(&quot;Value&quot;, dataView).onsuccess = next;
+    yield;
+
+        objectStore.openCursor().onsuccess = function(event) {
+                debug(&quot;Got the key and value with a cursor&quot;);
+                key = event.target.result.key;
+            keyInInt8Array = new Int8Array(key);
+
+            shouldBeTrue(&quot;key instanceof ArrayBuffer&quot;);
+            shouldBe(&quot;key.byteLength&quot;, &quot;4&quot;);
+            for (i = 0; i &lt; int8Array.length; ++i) {
+                shouldBe(&quot;keyInInt8Array[i]&quot;, &quot;int8Array[i]&quot;);
+            }
+
+                retrievedValue = event.target.result.value;
+                expectedValue = &quot;Value&quot;
+                shouldBe(&quot;retrievedValue&quot;, &quot;expectedValue&quot;);
+                
+                next();
+        }
+        yield;
+
+    objectStore.get(dataView).onsuccess = function(event) {
+        debug(&quot;Got the value with a DataView key: &quot; + event.target.result);
+        next();
+    }
+    yield;
+
+    objectStore.get(binary).onsuccess = function(event) {
+        debug(&quot;Got the value with an ArrayBuffer key: &quot; + event.target.result);
+        next();
+    }
+    yield;
+
+    objectStore.get(int8Array).onsuccess = function(event) {
+        debug(&quot;Got the value with a Typed Array key: &quot; + event.target.result);
+        next();
+    }
+    yield;
+    
+    int8Array.set([10, 10, 10, 10]);
+    objectStore.get(int8Array).onsuccess = function(event) {
+        debug(&quot;Got the value with a Typed Array key, but changed from the original put: &quot; + 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">         &quot;'\uD834\uDD1E'&quot;, // U+1D11E MUSICAL SYMBOL G-CLEF (UTF-16 surrogate pair)
</span><span class="cx">         &quot;'\uFFFD'&quot;, // U+FFFD REPLACEMENT CHARACTER
</span><span class="cx"> 
</span><ins>+        &quot;new Uint8Array()&quot;,
+        &quot;new Uint8Array([0])&quot;,
+        &quot;new Uint8Array([0, 0])&quot;,
+        &quot;new Uint8Array([0, 1])&quot;,
+        &quot;new Uint8Array([1])&quot;,
+        &quot;new Uint8Array([1, 0])&quot;,
+        &quot;new Uint8Array([1, 1])&quot;,
+        &quot;new Uint8Array([255])&quot;,
+
</ins><span class="cx">         &quot;[]&quot;,
</span><span class="cx"> 
</span><span class="cx">         &quot;[-Infinity]&quot;,
</span><span class="lines">@@ -77,6 +86,15 @@
</span><span class="cx">         &quot;['\uD834\uDD1E']&quot;, // U+1D11E MUSICAL SYMBOL G-CLEF (UTF-16 surrogate pair)
</span><span class="cx">         &quot;['\uFFFD']&quot;, // U+FFFD REPLACEMENT CHARACTER
</span><span class="cx"> 
</span><ins>+        &quot;[new Uint8Array()]&quot;,
+        &quot;[new Uint8Array([0])]&quot;,
+        &quot;[new Uint8Array([0, 0])]&quot;,
+        &quot;[new Uint8Array([0, 1])]&quot;,
+        &quot;[new Uint8Array([1])]&quot;,
+        &quot;[new Uint8Array([1, 0])]&quot;,
+        &quot;[new Uint8Array([1, 1])]&quot;,
+        &quot;[new Uint8Array([255])]&quot;,
+
</ins><span class="cx">         &quot;[[]]&quot;,
</span><span class="cx"> 
</span><span class="cx">         &quot;[[], []]&quot;,
</span><span class="lines">@@ -83,7 +101,7 @@
</span><span class="cx">         &quot;[[], [], []]&quot;,
</span><span class="cx"> 
</span><span class="cx">         &quot;[[[]]]&quot;,
</span><del>-        &quot;[[[[]]]]&quot;
</del><ins>+        &quot;[[[[]]]]&quot;,
</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">         &quot;self&quot;,
</span><span class="cx">         &quot;self.document&quot;,
</span><span class="cx">         &quot;self.document.body&quot;,
</span><del>-        &quot;new Uint8Array()&quot;,
-        &quot;new Uint8Array([0])&quot;,
-        &quot;new Uint8Array([0, 0])&quot;,
-        &quot;new Uint8Array([0, 1])&quot;,
-        &quot;new Uint8Array([1])&quot;,
-        &quot;new Uint8Array([1, 0])&quot;,
-        &quot;new Uint8Array([1, 1])&quot;,
-        &quot;new Uint8Array([255])&quot;,
-        &quot;[new Uint8Array()]&quot;,
-        &quot;[new Uint8Array([0])]&quot;,
-        &quot;[new Uint8Array([0, 0])]&quot;,
-        &quot;[new Uint8Array([0, 1])]&quot;,
-        &quot;[new Uint8Array([1])]&quot;,
-        &quot;[new Uint8Array([1, 0])]&quot;,
-        &quot;[new Uint8Array([1, 1])]&quot;,
-        &quot;[new Uint8Array([255])]&quot;,
</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(&quot;Test IndexedDB binary keys&quot;);
</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(&quot;&quot;);
</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(&quot;trans = db.transaction('store', 'readwrite')&quot;);
</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(&quot;&quot;);
</span><del>-            evalAndExpectException(&quot;store.put(&quot; + JSON.stringify(value) + &quot;, new Uint8Array(&quot; + key + &quot;));&quot;, &quot;0&quot;, &quot;'DataError'&quot;);
</del><ins>+            evalAndLog(&quot;store.put(&quot; + JSON.stringify(value) + &quot;, new Uint8Array(&quot; + key + &quot;));&quot;);
</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(&quot;trans = db.transaction('store', 'readwrite')&quot;);
</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(&quot;&quot;);
</span><del>-        evalAndExpectException(&quot;store.put('value', &quot; + testCase + &quot;)&quot;, &quot;0&quot;, &quot;'DataError'&quot;);
</del><ins>+        evalAndLog(&quot;store.put('value', &quot; + testCase + &quot;)&quot;);
</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  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Support binary keys.
+        &lt;rdar://problem/28806927&gt; 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  &lt;fpizlo@apple.com&gt;
</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&lt;UChar&gt;(static_cast&lt;const UChar*&gt;(data), length / sizeof(UChar));
</del><ins>+        size_t lengthInUChar = length / sizeof(UChar);
+        StringHasher hasher;
+        hasher.addCharactersAssumingAligned(static_cast&lt;const UChar*&gt;(data), lengthInUChar);
+
+        for (size_t i = 0; i &lt; length % sizeof(UChar); ++i)
+            hasher.addCharacter(static_cast&lt;const char*&gt;(data)[lengthInUChar * sizeof(UChar) + i]);
+
+        return hasher.hash();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     template&lt;size_t length&gt; static unsigned hashMemory(const void* data)
</span><span class="cx">     {
</span><del>-        static_assert(!(length % 2), &quot;length must be a multiple of two!&quot;);
</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  &lt;beidson@apple.com&gt;
+
+        IndexedDB 2.0: Support binary keys.
+        &lt;rdar://problem/28806927&gt; 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  &lt;timothy_horton@apple.com&gt;
</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 &quot;IDBKeyData.h&quot;
</span><ins>+#include &lt;runtime/ArrayBufferView.h&gt;
+#include &lt;runtime/JSArrayBuffer.h&gt;
+#include &lt;runtime/JSArrayBufferView.h&gt;
+#include &lt;runtime/JSCInlines.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> using IDBKeyVector = Vector&lt;RefPtr&lt;IDBKey&gt;&gt;;
</span><span class="cx"> 
</span><ins>+Ref&lt;IDBKey&gt; IDBKey::createBinary(const ThreadSafeDataBuffer&amp; buffer)
+{
+    return adoptRef(*new IDBKey(buffer));
+}
+
+Ref&lt;IDBKey&gt; IDBKey::createBinary(JSC::JSArrayBuffer&amp; arrayBuffer)
+{
+    auto* buffer = arrayBuffer.impl();
+    return adoptRef(*new IDBKey(ThreadSafeDataBuffer::copyData(buffer-&gt;data(), buffer-&gt;byteLength())));
+}
+
+Ref&lt;IDBKey&gt; IDBKey::createBinary(JSC::JSArrayBufferView&amp; arrayBufferView)
+{
+    auto bufferView = arrayBufferView.possiblySharedImpl();
+    return adoptRef(*new IDBKey(ThreadSafeDataBuffer::copyData(bufferView-&gt;data(), bufferView-&gt;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&amp; 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&lt;ThreadSafeDataBuffer&gt;(m_value), WTF::get&lt;ThreadSafeDataBuffer&gt;(other.m_value));
</ins><span class="cx">     case KeyType::String:
</span><span class="cx">         return -codePointCompare(WTF::get&lt;String&gt;(other.m_value), WTF::get&lt;String&gt;(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 &quot;IndexedDB.h&quot;
</span><ins>+#include &quot;ThreadSafeDataBuffer.h&quot;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/Variant.h&gt;
</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&lt;IDBKey&gt; {
</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&lt;IDBKey&gt; createBinary(const ThreadSafeDataBuffer&amp;);
+    static Ref&lt;IDBKey&gt; createBinary(JSC::JSArrayBuffer&amp;);
+    static Ref&lt;IDBKey&gt; createBinary(JSC::JSArrayBufferView&amp;);
+
</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&lt;double&gt;(m_value);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    const ThreadSafeDataBuffer&amp; binary() const
+    {
+        ASSERT(m_type == KeyType::Binary);
+        return WTF::get&lt;ThreadSafeDataBuffer&gt;(m_value);
+    }
+
</ins><span class="cx">     int compare(const IDBKey&amp; other) const;
</span><span class="cx">     bool isLessThan(const IDBKey&amp; other) const;
</span><span class="cx">     bool isEqual(const IDBKey&amp; 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&amp; value);
</span><span class="cx">     IDBKey(const Vector&lt;RefPtr&lt;IDBKey&gt;&gt;&amp; keyArray, size_t arraySize);
</span><ins>+    explicit IDBKey(const ThreadSafeDataBuffer&amp;);
</ins><span class="cx"> 
</span><span class="cx">     const KeyType m_type;
</span><del>-    Variant&lt;Vector&lt;RefPtr&lt;IDBKey&gt;&gt;, String, double&gt; m_value;
</del><ins>+    Variant&lt;Vector&lt;RefPtr&lt;IDBKey&gt;&gt;, String, double, ThreadSafeDataBuffer&gt; 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&lt;uint8_t&gt;&amp; a, const Vector&lt;uint8_t&gt;&amp; b)
+{
+    size_t length = std::min(a.size(), b.size());
+
+    for (size_t i = 0; i &lt; length; ++i) {
+        if (a[i] &gt; b[i])
+            return 1;
+        if (a[i] &lt; b[i])
+            return -1;
+    }
+
+    if (a.size() == b.size())
+        return 0;
+
+    if (a.size() &gt; b.size())
+        return 1;
+
+    return -1;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline int compareBinaryKeyData(const ThreadSafeDataBuffer&amp; a, const ThreadSafeDataBuffer&amp; 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 &amp;&amp; !bData)
+        return 1;
+    if (!aData &amp;&amp; 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-&gt;binary();
+        break;
</ins><span class="cx">     case KeyType::String:
</span><span class="cx">         m_value = key-&gt;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&lt;ThreadSafeDataBuffer&gt;(m_value));
</ins><span class="cx">     case KeyType::String:
</span><span class="cx">         return IDBKey::createString(WTF::get&lt;String&gt;(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&lt;ThreadSafeDataBuffer&gt;(source.m_value);
+        return;
</ins><span class="cx">     case KeyType::String:
</span><span class="cx">         destination.m_value = WTF::get&lt;String&gt;(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&lt;ThreadSafeDataBuffer&gt;(m_value).data();
+        encoder.encodeBool(&quot;hasBinary&quot;, !!data);
+        if (data)
+            encoder.encodeBytes(&quot;binary&quot;, data-&gt;data(), data-&gt;size());
+        return;
+    }
</ins><span class="cx">     case KeyType::String:
</span><span class="cx">         encoder.encodeString(&quot;string&quot;, WTF::get&lt;String&gt;(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(&quot;number&quot;, WTF::get&lt;double&gt;(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(&quot;hasBinary&quot;, hasBinaryData))
+            return false;
+
+        if (!hasBinaryData)
+            return true;
+
+        Vector&lt;uint8_t&gt; bytes;
+        if (!decoder.decodeBytes(&quot;binary&quot;, 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&amp; decoder, IDBKeyData&amp; 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&lt;ThreadSafeDataBuffer&gt;(m_value), WTF::get&lt;ThreadSafeDataBuffer&gt;(other.m_value));
</ins><span class="cx">     case KeyType::String:
</span><span class="cx">         return codePointCompare(WTF::get&lt;String&gt;(m_value), WTF::get&lt;String&gt;(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(&quot;&lt;binary&gt; - &quot;);
+
+        auto* data = WTF::get&lt;ThreadSafeDataBuffer&gt;(m_value).data();
+        if (!data) {
+            builder.append(&quot;(null)&quot;);
+            result = builder.toString();
+            break;
+        }
+
+        size_t i = 0;
+        for (; i &lt; 8 &amp;&amp; i &lt; data-&gt;size(); ++i)
+            builder.append(String::format(&quot;%02x&quot;, data-&gt;at(i)));
+
+        if (data-&gt;size() &gt; 8)
+            builder.append(&quot;...&quot;);
+
+        result = builder.toString();
+        break;
+    }
</ins><span class="cx">     case KeyType::String:
</span><span class="cx">         result = &quot;&lt;string&gt; - &quot; + WTF::get&lt;String&gt;(m_value);
</span><span class="cx">         break;
</span><span class="lines">@@ -310,8 +367,6 @@
</span><span class="cx">         return &quot;&lt;maximum&gt;&quot;;
</span><span class="cx">     case KeyType::Min:
</span><span class="cx">         return &quot;&lt;minimum&gt;&quot;;
</span><del>-    default:
-        return String();
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (result.length() &gt; 150) {
</span><span class="lines">@@ -382,6 +437,8 @@
</span><span class="cx">         return WTF::get&lt;double&gt;(m_value) == WTF::get&lt;double&gt;(other.m_value);
</span><span class="cx">     case KeyType::String:
</span><span class="cx">         return WTF::get&lt;String&gt;(m_value) == WTF::get&lt;String&gt;(other.m_value);
</span><ins>+    case KeyType::Binary:
+        return WTF::get&lt;ThreadSafeDataBuffer&gt;(m_value) == WTF::get&lt;ThreadSafeDataBuffer&gt;(other.m_value);
</ins><span class="cx">     case KeyType::Array:
</span><span class="cx">         return WTF::get&lt;Vector&lt;IDBKeyData&gt;&gt;(m_value) == WTF::get&lt;Vector&lt;IDBKeyData&gt;&gt;(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&lt;String&gt;(m_value)));
</span><span class="cx">             break;
</span><ins>+        case KeyType::Binary: {
+            auto* data = WTF::get&lt;ThreadSafeDataBuffer&gt;(m_value).data();
+            if (!data)
+                hashCodes.append(0);
+            else
+                hashCodes.append(StringHasher::hashMemory(data-&gt;data(), data-&gt;size()));
+            break;
+        }
</ins><span class="cx">         case KeyType::Array:
</span><span class="cx">             for (auto&amp; key : WTF::get&lt;Vector&lt;IDBKeyData&gt;&gt;(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&amp; source, IDBKeyData&amp; destination);
</span><span class="cx"> 
</span><span class="cx">     KeyType m_type;
</span><del>-    Variant&lt;Vector&lt;IDBKeyData&gt;, String, double&gt; m_value;
</del><ins>+    Variant&lt;Vector&lt;IDBKeyData&gt;, String, double, ThreadSafeDataBuffer&gt; 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 &lt;&lt; WTF::get&lt;Vector&lt;IDBKeyData&gt;&gt;(m_value);
</span><span class="cx">         break;
</span><ins>+    case KeyType::Binary:
+        encoder &lt;&lt; WTF::get&lt;ThreadSafeDataBuffer&gt;(m_value);
+        break;
</ins><span class="cx">     case KeyType::String:
</span><span class="cx">         encoder &lt;&lt; WTF::get&lt;String&gt;(m_value);
</span><span class="cx">         break;
</span><span class="lines">@@ -246,6 +256,11 @@
</span><span class="cx">         if (!decoder.decode(WTF::get&lt;Vector&lt;IDBKeyData&gt;&gt;(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&lt;ThreadSafeDataBuffer&gt;(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&lt;String&gt;(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 &quot;SerializedScriptValue.h&quot;
</span><span class="cx"> #include &quot;SharedBuffer.h&quot;
</span><span class="cx"> #include &quot;ThreadSafeDataBuffer.h&quot;
</span><ins>+#include &lt;runtime/ArrayBuffer.h&gt;
</ins><span class="cx"> #include &lt;runtime/DateInstance.h&gt;
</span><span class="cx"> #include &lt;runtime/ObjectConstructor.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -104,6 +105,20 @@
</span><span class="cx">             outArray-&gt;putDirectIndex(&amp;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-&gt;binary().data();
+        if (!data) {
+            ASSERT_NOT_REACHED();
+            return jsNull();
+        }
+
+        auto arrayBuffer = ArrayBuffer::create(data-&gt;data(), data-&gt;size());
+        Structure* structure = globalObject.arrayBufferStructure(arrayBuffer-&gt;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(&amp;state, key-&gt;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&lt;JSArrayBuffer*&gt;(value))
+            return IDBKey::createBinary(*arrayBuffer);
+
+        if (auto* arrayBufferView = jsDynamicCast&lt;JSArrayBufferView*&gt;(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&lt;uint8_t&gt; 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 ? &amp;m_impl-&gt;m_data : nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    size_t size() const
+    {
+        return m_impl ? m_impl-&gt;m_data.size() : 0;
+    }
+
+    bool operator==(const ThreadSafeDataBuffer&amp; other) const
+    {
+        if (!m_impl)
+            return !other.m_impl;
+
+        return m_impl-&gt;m_data == other.m_impl-&gt;m_data;
+    }
+
</ins><span class="cx">     template&lt;class Encoder&gt; void encode(Encoder&amp;) const;
</span><span class="cx">     template&lt;class Decoder&gt; static bool decode(Decoder&amp;, ThreadSafeDataBuffer&amp;);
</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&lt;ThreadSafeDataBufferImpl&gt; m_impl;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>