<!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>[192924] 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/192924">192924</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-01 16:20:37 -0800 (Tue, 01 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Give a more detailed message for TypeErrors that result from EnforceRange.
https://bugs.webkit.org/show_bug.cgi?id=151725

Reviewed by Tim Horton.

Source/WebCore:

No new tests (Covered by changes to existing tests).

* bindings/js/JSDOMBinding.cpp:
(WebCore::rangeErrorString):
(WebCore::enforceRange):

LayoutTests:

* crypto/subtle/aes-cbc-generate-key-expected.txt:
* js/dom/webidl-type-mapping-expected.txt:
* storage/indexeddb/intversion-bad-parameters-expected.txt:
* storage/indexeddb/version-change-event-basic-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcgeneratekeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomwebidltypemappingexpectedtxt">trunk/LayoutTests/js/dom/webidl-type-mapping-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbintversionbadparametersexpectedtxt">trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbversionchangeeventbasicexpectedtxt">trunk/LayoutTests/storage/indexeddb/version-change-event-basic-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingcpp">trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (192923 => 192924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-12-02 00:13:02 UTC (rev 192923)
+++ trunk/LayoutTests/ChangeLog        2015-12-02 00:20:37 UTC (rev 192924)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-12-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Give a more detailed message for TypeErrors that result from EnforceRange.
+        https://bugs.webkit.org/show_bug.cgi?id=151725
+
+        Reviewed by Tim Horton.
+
+        * crypto/subtle/aes-cbc-generate-key-expected.txt:
+        * js/dom/webidl-type-mapping-expected.txt:
+        * storage/indexeddb/intversion-bad-parameters-expected.txt:
+        * storage/indexeddb/version-change-event-basic-expected.txt:
+
</ins><span class="cx"> 2015-12-01  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Test gardening after r192894
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcgeneratekeyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt (192923 => 192924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt        2015-12-02 00:13:02 UTC (rev 192923)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt        2015-12-02 00:20:37 UTC (rev 192924)
</span><span class="lines">@@ -4,9 +4,9 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS crypto.subtle.generateKey(&quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;]) threw exception TypeError: Type error.
</span><del>-PASS crypto.subtle.generateKey({name: &quot;aes-cbc&quot;}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;]) threw exception TypeError: Type error.
-PASS crypto.subtle.generateKey({name: &quot;aes-cbc&quot;, length: undefined}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;]) threw exception TypeError: Type error.
-PASS crypto.subtle.generateKey({name: &quot;aes-cbc&quot;, length: {}}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;]) threw exception TypeError: Type error.
</del><ins>+PASS crypto.subtle.generateKey({name: &quot;aes-cbc&quot;}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;]) threw exception TypeError: Value NaN is outside the range [0, 65535].
+PASS crypto.subtle.generateKey({name: &quot;aes-cbc&quot;, length: undefined}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;]) threw exception TypeError: Value NaN is outside the range [0, 65535].
+PASS crypto.subtle.generateKey({name: &quot;aes-cbc&quot;, length: {}}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;]) threw exception TypeError: Value NaN is outside the range [0, 65535].
</ins><span class="cx"> Generating a key...
</span><span class="cx"> PASS key.type is 'secret'
</span><span class="cx"> PASS key.extractable is true
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomwebidltypemappingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/webidl-type-mapping-expected.txt (192923 => 192924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/webidl-type-mapping-expected.txt        2015-12-02 00:13:02 UTC (rev 192923)
+++ trunk/LayoutTests/js/dom/webidl-type-mapping-expected.txt        2015-12-02 00:20:37 UTC (rev 192924)
</span><span class="lines">@@ -113,25 +113,25 @@
</span><span class="cx"> PASS converter.testEnforceRangeLong is -0x8001
</span><span class="cx"> converter.testEnforceRangeLong = 0x7FFFFFFF
</span><span class="cx"> PASS converter.testEnforceRangeLong is 0x7FFFFFFF
</span><del>-PASS converter.testEnforceRangeLong = 0x80000000 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeLong = 0xFFFFFFFF threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLong = 0x80000000 threw exception TypeError: Value 2147483648 is outside the range [-2147483648, 2147483647].
+PASS converter.testEnforceRangeLong = 0xFFFFFFFF threw exception TypeError: Value 4294967295 is outside the range [-2147483648, 2147483647].
</ins><span class="cx"> converter.testEnforceRangeLong = -0x80000000
</span><span class="cx"> PASS converter.testEnforceRangeLong is -0x80000000
</span><del>-PASS converter.testEnforceRangeLong = -0x80000001 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeLong = 0xDCBA9876543210 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeLong = Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLong = -0x80000001 threw exception TypeError: Value -2147483649 is outside the range [-2147483648, 2147483647].
+PASS converter.testEnforceRangeLong = 0xDCBA9876543210 threw exception TypeError: Value 62129658859368980 is outside the range [-2147483648, 2147483647].
+PASS converter.testEnforceRangeLong = Number.MAX_VALUE threw exception TypeError: Value 1.7976931348623157e+308 is outside the range [-2147483648, 2147483647].
</ins><span class="cx"> converter.testEnforceRangeLong = Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeLong is 0
</span><del>-PASS converter.testEnforceRangeLong = -Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLong = -Number.MAX_VALUE threw exception TypeError: Value -1.7976931348623157e+308 is outside the range [-2147483648, 2147483647].
</ins><span class="cx"> converter.testEnforceRangeLong = -Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeLong is 0
</span><span class="cx"> converter.testEnforceRangeLong = 1.99
</span><span class="cx"> PASS converter.testEnforceRangeLong is 1
</span><span class="cx"> converter.testEnforceRangeLong = -1.99
</span><span class="cx"> PASS converter.testEnforceRangeLong is -1
</span><del>-PASS converter.testEnforceRangeLong = Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeLong = -Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeLong = NaN threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLong = Infinity threw exception TypeError: Value Infinity is outside the range [-2147483648, 2147483647].
+PASS converter.testEnforceRangeLong = -Infinity threw exception TypeError: Value -Infinity is outside the range [-2147483648, 2147483647].
+PASS converter.testEnforceRangeLong = NaN threw exception TypeError: Value NaN is outside the range [-2147483648, 2147483647].
</ins><span class="cx"> converter.testEnforceRangeLong = false
</span><span class="cx"> PASS converter.testEnforceRangeLong is 0
</span><span class="cx"> converter.testEnforceRangeLong = true
</span><span class="lines">@@ -140,10 +140,10 @@
</span><span class="cx"> PASS converter.testEnforceRangeLong is 0
</span><span class="cx"> converter.testEnforceRangeLong = '1'
</span><span class="cx"> PASS converter.testEnforceRangeLong is 1
</span><del>-PASS converter.testEnforceRangeLong = 'abc' threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLong = 'abc' threw exception TypeError: Value NaN is outside the range [-2147483648, 2147483647].
</ins><span class="cx"> converter.testEnforceRangeLong = null
</span><span class="cx"> PASS converter.testEnforceRangeLong is 0
</span><del>-PASS converter.testEnforceRangeLong = undefined threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLong = undefined threw exception TypeError: Value NaN is outside the range [-2147483648, 2147483647].
</ins><span class="cx"> PASS converter.testEnforceRangeLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
</span><span class="cx"> 
</span><span class="cx"> PASS 'testUnsignedLong' in converter is true
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = -0
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0
</span><del>-PASS converter.testEnforceRangeUnsignedLong = -1 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLong = -1 threw exception TypeError: Value -1 is outside the range [0, 4294967295].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLong = 1
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 1
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = 0x7F
</span><span class="lines">@@ -237,37 +237,37 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0x80
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = 0xFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0xFF
</span><del>-PASS converter.testEnforceRangeUnsignedLong = -0x80 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLong = -0x81 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLong = -0x80 threw exception TypeError: Value -128 is outside the range [0, 4294967295].
+PASS converter.testEnforceRangeUnsignedLong = -0x81 threw exception TypeError: Value -129 is outside the range [0, 4294967295].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLong = 0x7FFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0x7FFF
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = 0x8000
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0x8000
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = 0xFFFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0xFFFF
</span><del>-PASS converter.testEnforceRangeUnsignedLong = -0x8000 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLong = -0x8001 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLong = -0x8000 threw exception TypeError: Value -32768 is outside the range [0, 4294967295].
+PASS converter.testEnforceRangeUnsignedLong = -0x8001 threw exception TypeError: Value -32769 is outside the range [0, 4294967295].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLong = 0x7FFFFFFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0x7FFFFFFF
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = 0x80000000
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0x80000000
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = 0xFFFFFFFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0xFFFFFFFF
</span><del>-PASS converter.testEnforceRangeUnsignedLong = -0x80000000 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLong = -0x80000001 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLong = 0xDCBA9876543210 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLong = Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLong = -0x80000000 threw exception TypeError: Value -2147483648 is outside the range [0, 4294967295].
+PASS converter.testEnforceRangeUnsignedLong = -0x80000001 threw exception TypeError: Value -2147483649 is outside the range [0, 4294967295].
+PASS converter.testEnforceRangeUnsignedLong = 0xDCBA9876543210 threw exception TypeError: Value 62129658859368980 is outside the range [0, 4294967295].
+PASS converter.testEnforceRangeUnsignedLong = Number.MAX_VALUE threw exception TypeError: Value 1.7976931348623157e+308 is outside the range [0, 4294967295].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLong = Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0
</span><del>-PASS converter.testEnforceRangeUnsignedLong = -Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLong = -Number.MAX_VALUE threw exception TypeError: Value -1.7976931348623157e+308 is outside the range [0, 4294967295].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLong = -Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = 1.99
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 1
</span><del>-PASS converter.testEnforceRangeUnsignedLong = -1.99 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLong = Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLong = -Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLong = NaN threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLong = -1.99 threw exception TypeError: Value -1 is outside the range [0, 4294967295].
+PASS converter.testEnforceRangeUnsignedLong = Infinity threw exception TypeError: Value Infinity is outside the range [0, 4294967295].
+PASS converter.testEnforceRangeUnsignedLong = -Infinity threw exception TypeError: Value -Infinity is outside the range [0, 4294967295].
+PASS converter.testEnforceRangeUnsignedLong = NaN threw exception TypeError: Value NaN is outside the range [0, 4294967295].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLong = false
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = true
</span><span class="lines">@@ -276,10 +276,10 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedLong = '1'
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 1
</span><del>-PASS converter.testEnforceRangeUnsignedLong = 'abc' threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLong = 'abc' threw exception TypeError: Value NaN is outside the range [0, 4294967295].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLong = null
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLong is 0
</span><del>-PASS converter.testEnforceRangeUnsignedLong = undefined threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLong = undefined threw exception TypeError: Value NaN is outside the range [0, 4294967295].
</ins><span class="cx"> PASS converter.testEnforceRangeUnsignedLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
</span><span class="cx"> 
</span><span class="cx"> PASS 'testLongLong' in converter is true
</span><span class="lines">@@ -398,20 +398,20 @@
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is -0x80000000
</span><span class="cx"> converter.testEnforceRangeLongLong = -0x80000001
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is -0x80000001
</span><del>-PASS converter.testEnforceRangeLongLong = 0xDCBA9876543210 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLongLong = 0xDCBA9876543210 threw exception TypeError: Value 62129658859368980 is outside the range [-9007199254740991, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeLongLong = Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is 0
</span><span class="cx"> converter.testEnforceRangeLongLong = -Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is 0
</span><del>-PASS converter.testEnforceRangeLongLong = Number.MAX_VALUE threw exception TypeError: Type error.
-PASS converter.testEnforceRangeLongLong = -Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLongLong = Number.MAX_VALUE threw exception TypeError: Value 1.7976931348623157e+308 is outside the range [-9007199254740991, 9007199254740991].
+PASS converter.testEnforceRangeLongLong = -Number.MAX_VALUE threw exception TypeError: Value -1.7976931348623157e+308 is outside the range [-9007199254740991, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeLongLong = 1.99
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is 1
</span><span class="cx"> converter.testEnforceRangeLongLong = -1.99
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is -1
</span><del>-PASS converter.testEnforceRangeLongLong = Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeLongLong = -Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeLongLong = NaN threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLongLong = Infinity threw exception TypeError: Value Infinity is outside the range [-9007199254740991, 9007199254740991].
+PASS converter.testEnforceRangeLongLong = -Infinity threw exception TypeError: Value -Infinity is outside the range [-9007199254740991, 9007199254740991].
+PASS converter.testEnforceRangeLongLong = NaN threw exception TypeError: Value NaN is outside the range [-9007199254740991, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeLongLong = false
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is 0
</span><span class="cx"> converter.testEnforceRangeLongLong = true
</span><span class="lines">@@ -420,10 +420,10 @@
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is 0
</span><span class="cx"> converter.testEnforceRangeLongLong = '1'
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is 1
</span><del>-PASS converter.testEnforceRangeLongLong = 'abc' threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLongLong = 'abc' threw exception TypeError: Value NaN is outside the range [-9007199254740991, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeLongLong = null
</span><span class="cx"> PASS converter.testEnforceRangeLongLong is 0
</span><del>-PASS converter.testEnforceRangeLongLong = undefined threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeLongLong = undefined threw exception TypeError: Value NaN is outside the range [-9007199254740991, 9007199254740991].
</ins><span class="cx"> PASS converter.testEnforceRangeLongLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
</span><span class="cx"> 
</span><span class="cx"> PASS 'testUnsignedLongLong' in converter is true
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = -0
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0
</span><del>-PASS converter.testEnforceRangeUnsignedLongLong = -1 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLongLong = -1 threw exception TypeError: Value -1 is outside the range [0, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 1
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 1
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 0x7F
</span><span class="lines">@@ -517,37 +517,37 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0x80
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 0xFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0xFF
</span><del>-PASS converter.testEnforceRangeUnsignedLongLong = -0x80 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLongLong = -0x81 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLongLong = -0x80 threw exception TypeError: Value -128 is outside the range [0, 9007199254740991].
+PASS converter.testEnforceRangeUnsignedLongLong = -0x81 threw exception TypeError: Value -129 is outside the range [0, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 0x7FFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0x7FFF
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 0x8000
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0x8000
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 0xFFFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0xFFFF
</span><del>-PASS converter.testEnforceRangeUnsignedLongLong = -0x8000 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLongLong = -0x8001 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLongLong = -0x8000 threw exception TypeError: Value -32768 is outside the range [0, 9007199254740991].
+PASS converter.testEnforceRangeUnsignedLongLong = -0x8001 threw exception TypeError: Value -32769 is outside the range [0, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 0x7FFFFFFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0x7FFFFFFF
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 0x80000000
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0x80000000
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 0xFFFFFFFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0xFFFFFFFF
</span><del>-PASS converter.testEnforceRangeUnsignedLongLong = -0x80000000 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLongLong = -0x80000001 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLongLong = 0xDCBA9876543210 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLongLong = -0x80000000 threw exception TypeError: Value -2147483648 is outside the range [0, 9007199254740991].
+PASS converter.testEnforceRangeUnsignedLongLong = -0x80000001 threw exception TypeError: Value -2147483649 is outside the range [0, 9007199254740991].
+PASS converter.testEnforceRangeUnsignedLongLong = 0xDCBA9876543210 threw exception TypeError: Value 62129658859368980 is outside the range [0, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLongLong = Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = -Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0
</span><del>-PASS converter.testEnforceRangeUnsignedLongLong = Number.MAX_VALUE threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLongLong = -Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLongLong = Number.MAX_VALUE threw exception TypeError: Value 1.7976931348623157e+308 is outside the range [0, 9007199254740991].
+PASS converter.testEnforceRangeUnsignedLongLong = -Number.MAX_VALUE threw exception TypeError: Value -1.7976931348623157e+308 is outside the range [0, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLongLong = 1.99
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 1
</span><del>-PASS converter.testEnforceRangeUnsignedLongLong = -1.99 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLongLong = Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLongLong = -Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedLongLong = NaN threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLongLong = -1.99 threw exception TypeError: Value -1 is outside the range [0, 9007199254740991].
+PASS converter.testEnforceRangeUnsignedLongLong = Infinity threw exception TypeError: Value Infinity is outside the range [0, 9007199254740991].
+PASS converter.testEnforceRangeUnsignedLongLong = -Infinity threw exception TypeError: Value -Infinity is outside the range [0, 9007199254740991].
+PASS converter.testEnforceRangeUnsignedLongLong = NaN threw exception TypeError: Value NaN is outside the range [0, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLongLong = false
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = true
</span><span class="lines">@@ -556,10 +556,10 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedLongLong = '1'
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 1
</span><del>-PASS converter.testEnforceRangeUnsignedLongLong = 'abc' threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLongLong = 'abc' threw exception TypeError: Value NaN is outside the range [0, 9007199254740991].
</ins><span class="cx"> converter.testEnforceRangeUnsignedLongLong = null
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong is 0
</span><del>-PASS converter.testEnforceRangeUnsignedLongLong = undefined threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedLongLong = undefined threw exception TypeError: Value NaN is outside the range [0, 9007199254740991].
</ins><span class="cx"> PASS converter.testEnforceRangeUnsignedLongLong = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
</span><span class="cx"> 
</span><span class="cx"> PASS 'testByte' in converter is true
</span><span class="lines">@@ -638,15 +638,15 @@
</span><span class="cx"> PASS converter.testEnforceRangeByte is 0
</span><span class="cx"> converter.testEnforceRangeByte = -Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeByte is 0
</span><del>-PASS converter.testEnforceRangeByte = Number.MAX_VALUE threw exception TypeError: Type error.
-PASS converter.testEnforceRangeByte = -Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeByte = Number.MAX_VALUE threw exception TypeError: Value 1.7976931348623157e+308 is outside the range [-128, 127].
+PASS converter.testEnforceRangeByte = -Number.MAX_VALUE threw exception TypeError: Value -1.7976931348623157e+308 is outside the range [-128, 127].
</ins><span class="cx"> converter.testEnforceRangeByte = 1.99
</span><span class="cx"> PASS converter.testEnforceRangeByte is 1
</span><span class="cx"> converter.testEnforceRangeByte = -1.99
</span><span class="cx"> PASS converter.testEnforceRangeByte is -1
</span><del>-PASS converter.testEnforceRangeByte = Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeByte = -Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeByte = NaN threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeByte = Infinity threw exception TypeError: Value Infinity is outside the range [-128, 127].
+PASS converter.testEnforceRangeByte = -Infinity threw exception TypeError: Value -Infinity is outside the range [-128, 127].
+PASS converter.testEnforceRangeByte = NaN threw exception TypeError: Value NaN is outside the range [-128, 127].
</ins><span class="cx"> converter.testEnforceRangeByte = false
</span><span class="cx"> PASS converter.testEnforceRangeByte is 0
</span><span class="cx"> converter.testEnforceRangeByte = true
</span><span class="lines">@@ -655,10 +655,10 @@
</span><span class="cx"> PASS converter.testEnforceRangeByte is 0
</span><span class="cx"> converter.testEnforceRangeByte = '1'
</span><span class="cx"> PASS converter.testEnforceRangeByte is 1
</span><del>-PASS converter.testEnforceRangeByte = 'abc' threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeByte = 'abc' threw exception TypeError: Value NaN is outside the range [-128, 127].
</ins><span class="cx"> converter.testEnforceRangeByte = null
</span><span class="cx"> PASS converter.testEnforceRangeByte is 0
</span><del>-PASS converter.testEnforceRangeByte = undefined threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeByte = undefined threw exception TypeError: Value NaN is outside the range [-128, 127].
</ins><span class="cx"> PASS converter.testEnforceRangeByte = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
</span><span class="cx"> 
</span><span class="cx"> PASS 'testOctet' in converter is true
</span><span class="lines">@@ -725,7 +725,7 @@
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 0
</span><span class="cx"> converter.testEnforceRangeOctet = -0
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 0
</span><del>-PASS converter.testEnforceRangeOctet = -1 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeOctet = -1 threw exception TypeError: Value -1 is outside the range [0, 255].
</ins><span class="cx"> converter.testEnforceRangeOctet = 1
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 1
</span><span class="cx"> converter.testEnforceRangeOctet = 0x7F
</span><span class="lines">@@ -736,20 +736,20 @@
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 0xFF
</span><span class="cx"> PASS converter.testEnforceRangeOctet = 0x100 threw exception TypeError: Type error.
</span><span class="cx"> PASS converter.testEnforceRangeOctet = 0x101 threw exception TypeError: Type error.
</span><del>-PASS converter.testEnforceRangeOctet = -0x80 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeOctet = -0x81 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeOctet = Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeOctet = -0x80 threw exception TypeError: Value -128 is outside the range [0, 255].
+PASS converter.testEnforceRangeOctet = -0x81 threw exception TypeError: Value -129 is outside the range [0, 255].
+PASS converter.testEnforceRangeOctet = Number.MAX_VALUE threw exception TypeError: Value 1.7976931348623157e+308 is outside the range [0, 255].
</ins><span class="cx"> converter.testEnforceRangeOctet = Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 0
</span><del>-PASS converter.testEnforceRangeOctet = -Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeOctet = -Number.MAX_VALUE threw exception TypeError: Value -1.7976931348623157e+308 is outside the range [0, 255].
</ins><span class="cx"> converter.testEnforceRangeOctet = -Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 0
</span><span class="cx"> converter.testEnforceRangeOctet = 1.99
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 1
</span><del>-PASS converter.testEnforceRangeOctet = -1.99 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeOctet = Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeOctet = -Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeOctet = NaN threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeOctet = -1.99 threw exception TypeError: Value -1 is outside the range [0, 255].
+PASS converter.testEnforceRangeOctet = Infinity threw exception TypeError: Value Infinity is outside the range [0, 255].
+PASS converter.testEnforceRangeOctet = -Infinity threw exception TypeError: Value -Infinity is outside the range [0, 255].
+PASS converter.testEnforceRangeOctet = NaN threw exception TypeError: Value NaN is outside the range [0, 255].
</ins><span class="cx"> converter.testEnforceRangeOctet = false
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 0
</span><span class="cx"> converter.testEnforceRangeOctet = true
</span><span class="lines">@@ -758,10 +758,10 @@
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 0
</span><span class="cx"> converter.testEnforceRangeOctet = '1'
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 1
</span><del>-PASS converter.testEnforceRangeOctet = 'abc' threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeOctet = 'abc' threw exception TypeError: Value NaN is outside the range [0, 255].
</ins><span class="cx"> converter.testEnforceRangeOctet = null
</span><span class="cx"> PASS converter.testEnforceRangeOctet is 0
</span><del>-PASS converter.testEnforceRangeOctet = undefined threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeOctet = undefined threw exception TypeError: Value NaN is outside the range [0, 255].
</ins><span class="cx"> PASS converter.testEnforceRangeOctet = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
</span><span class="cx"> 
</span><span class="cx"> PASS 'testShort' in converter is true
</span><span class="lines">@@ -857,20 +857,20 @@
</span><span class="cx"> converter.testEnforceRangeShort = -0x8000
</span><span class="cx"> PASS converter.testEnforceRangeShort is -0x8000
</span><span class="cx"> PASS converter.testEnforceRangeShort = -0x8001 threw exception TypeError: Type error.
</span><del>-PASS converter.testEnforceRangeShort = 0xDCBA9876543210 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeShort = Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeShort = 0xDCBA9876543210 threw exception TypeError: Value 62129658859368980 is outside the range [-32768, 32767].
+PASS converter.testEnforceRangeShort = Number.MAX_VALUE threw exception TypeError: Value 1.7976931348623157e+308 is outside the range [-32768, 32767].
</ins><span class="cx"> converter.testEnforceRangeShort = Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeShort is 0
</span><del>-PASS converter.testEnforceRangeShort = -Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeShort = -Number.MAX_VALUE threw exception TypeError: Value -1.7976931348623157e+308 is outside the range [-32768, 32767].
</ins><span class="cx"> converter.testEnforceRangeShort = -Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeShort is 0
</span><span class="cx"> converter.testEnforceRangeShort = 1.99
</span><span class="cx"> PASS converter.testEnforceRangeShort is 1
</span><span class="cx"> converter.testEnforceRangeShort = -1.99
</span><span class="cx"> PASS converter.testEnforceRangeShort is -1
</span><del>-PASS converter.testEnforceRangeShort = Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeShort = -Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeShort = NaN threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeShort = Infinity threw exception TypeError: Value Infinity is outside the range [-32768, 32767].
+PASS converter.testEnforceRangeShort = -Infinity threw exception TypeError: Value -Infinity is outside the range [-32768, 32767].
+PASS converter.testEnforceRangeShort = NaN threw exception TypeError: Value NaN is outside the range [-32768, 32767].
</ins><span class="cx"> converter.testEnforceRangeShort = false
</span><span class="cx"> PASS converter.testEnforceRangeShort is 0
</span><span class="cx"> converter.testEnforceRangeShort = true
</span><span class="lines">@@ -879,10 +879,10 @@
</span><span class="cx"> PASS converter.testEnforceRangeShort is 0
</span><span class="cx"> converter.testEnforceRangeShort = '1'
</span><span class="cx"> PASS converter.testEnforceRangeShort is 1
</span><del>-PASS converter.testEnforceRangeShort = 'abc' threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeShort = 'abc' threw exception TypeError: Value NaN is outside the range [-32768, 32767].
</ins><span class="cx"> converter.testEnforceRangeShort = null
</span><span class="cx"> PASS converter.testEnforceRangeShort is 0
</span><del>-PASS converter.testEnforceRangeShort = undefined threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeShort = undefined threw exception TypeError: Value NaN is outside the range [-32768, 32767].
</ins><span class="cx"> PASS converter.testEnforceRangeShort = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
</span><span class="cx"> 
</span><span class="cx"> PASS 'testUnsignedShort' in converter is true
</span><span class="lines">@@ -959,7 +959,7 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedShort = -0
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0
</span><del>-PASS converter.testEnforceRangeUnsignedShort = -1 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedShort = -1 threw exception TypeError: Value -1 is outside the range [0, 65535].
</ins><span class="cx"> converter.testEnforceRangeUnsignedShort = 1
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 1
</span><span class="cx"> converter.testEnforceRangeUnsignedShort = 0x7F
</span><span class="lines">@@ -968,8 +968,8 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0x80
</span><span class="cx"> converter.testEnforceRangeUnsignedShort = 0xFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0xFF
</span><del>-PASS converter.testEnforceRangeUnsignedShort = -0x80 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedShort = -0x81 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedShort = -0x80 threw exception TypeError: Value -128 is outside the range [0, 65535].
+PASS converter.testEnforceRangeUnsignedShort = -0x81 threw exception TypeError: Value -129 is outside the range [0, 65535].
</ins><span class="cx"> converter.testEnforceRangeUnsignedShort = 0x7FFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0x7FFF
</span><span class="cx"> converter.testEnforceRangeUnsignedShort = 0x8000
</span><span class="lines">@@ -977,22 +977,22 @@
</span><span class="cx"> converter.testEnforceRangeUnsignedShort = 0xFFFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0xFFFF
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort = 0x10000 threw exception TypeError: Type error.
</span><del>-PASS converter.testEnforceRangeUnsignedShort = -0x8000 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedShort = -0x8001 threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedShort = -0x8000 threw exception TypeError: Value -32768 is outside the range [0, 65535].
+PASS converter.testEnforceRangeUnsignedShort = -0x8001 threw exception TypeError: Value -32769 is outside the range [0, 65535].
</ins><span class="cx"> converter.testEnforceRangeUnsignedShort = 0x3210
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0x3210
</span><del>-PASS converter.testEnforceRangeUnsignedShort = Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedShort = Number.MAX_VALUE threw exception TypeError: Value 1.7976931348623157e+308 is outside the range [0, 65535].
</ins><span class="cx"> converter.testEnforceRangeUnsignedShort = Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0
</span><del>-PASS converter.testEnforceRangeUnsignedShort = -Number.MAX_VALUE threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedShort = -Number.MAX_VALUE threw exception TypeError: Value -1.7976931348623157e+308 is outside the range [0, 65535].
</ins><span class="cx"> converter.testEnforceRangeUnsignedShort = -Number.MIN_VALUE
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedShort = 1.99
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 1
</span><del>-PASS converter.testEnforceRangeUnsignedShort = -1.99 threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedShort = Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedShort = -Infinity threw exception TypeError: Type error.
-PASS converter.testEnforceRangeUnsignedShort = NaN threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedShort = -1.99 threw exception TypeError: Value -1 is outside the range [0, 65535].
+PASS converter.testEnforceRangeUnsignedShort = Infinity threw exception TypeError: Value Infinity is outside the range [0, 65535].
+PASS converter.testEnforceRangeUnsignedShort = -Infinity threw exception TypeError: Value -Infinity is outside the range [0, 65535].
+PASS converter.testEnforceRangeUnsignedShort = NaN threw exception TypeError: Value NaN is outside the range [0, 65535].
</ins><span class="cx"> converter.testEnforceRangeUnsignedShort = false
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedShort = true
</span><span class="lines">@@ -1001,10 +1001,10 @@
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0
</span><span class="cx"> converter.testEnforceRangeUnsignedShort = '1'
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 1
</span><del>-PASS converter.testEnforceRangeUnsignedShort = 'abc' threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedShort = 'abc' threw exception TypeError: Value NaN is outside the range [0, 65535].
</ins><span class="cx"> converter.testEnforceRangeUnsignedShort = null
</span><span class="cx"> PASS converter.testEnforceRangeUnsignedShort is 0
</span><del>-PASS converter.testEnforceRangeUnsignedShort = undefined threw exception TypeError: Type error.
</del><ins>+PASS converter.testEnforceRangeUnsignedShort = undefined threw exception TypeError: Value NaN is outside the range [0, 65535].
</ins><span class="cx"> PASS converter.testEnforceRangeUnsignedShort = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
</span><span class="cx"> 
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbintversionbadparametersexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt (192923 => 192924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt        2015-12-02 00:13:02 UTC (rev 192923)
+++ trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt        2015-12-02 00:20:37 UTC (rev 192924)
</span><span class="lines">@@ -11,34 +11,34 @@
</span><span class="cx"> deleteSuccess():
</span><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, 'stringversion')
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS indexedDB.open(dbname, 'stringversion') threw TypeError: Type error
</del><ins>+PASS indexedDB.open(dbname, 'stringversion') threw TypeError: Value NaN is outside the range [0, 9007199254740991]
</ins><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, 0)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS indexedDB.open(dbname, 0) threw TypeError: Type error
</span><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, -5)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS indexedDB.open(dbname, -5) threw TypeError: Type error
</del><ins>+PASS indexedDB.open(dbname, -5) threw TypeError: Value -5 is outside the range [0, 9007199254740991]
</ins><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, Infinity)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS indexedDB.open(dbname, Infinity) threw TypeError: Type error
</del><ins>+PASS indexedDB.open(dbname, Infinity) threw TypeError: Value Infinity is outside the range [0, 9007199254740991]
</ins><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, -Infinity)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS indexedDB.open(dbname, -Infinity) threw TypeError: Type error
</del><ins>+PASS indexedDB.open(dbname, -Infinity) threw TypeError: Value -Infinity is outside the range [0, 9007199254740991]
</ins><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, NaN)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS indexedDB.open(dbname, NaN) threw TypeError: Type error
</del><ins>+PASS indexedDB.open(dbname, NaN) threw TypeError: Value NaN is outside the range [0, 9007199254740991]
</ins><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, -1)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS indexedDB.open(dbname, -1) threw TypeError: Type error
</del><ins>+PASS indexedDB.open(dbname, -1) threw TypeError: Value -1 is outside the range [0, 9007199254740991]
</ins><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, 0x20000000000000)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS indexedDB.open(dbname, 0x20000000000000) threw TypeError: Type error
</del><ins>+PASS indexedDB.open(dbname, 0x20000000000000) threw TypeError: Value 9007199254740992 is outside the range [0, 9007199254740991]
</ins><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, null)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS indexedDB.open(dbname, null) threw TypeError: Type error
</span><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, undefined)
</span><span class="cx"> PASS Exception was thrown.
</span><del>-PASS indexedDB.open(dbname, undefined) threw TypeError: Type error
</del><ins>+PASS indexedDB.open(dbname, undefined) threw TypeError: Value NaN is outside the range [0, 9007199254740991]
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbversionchangeeventbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/version-change-event-basic-expected.txt (192923 => 192924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/version-change-event-basic-expected.txt        2015-12-02 00:13:02 UTC (rev 192923)
+++ trunk/LayoutTests/storage/indexeddb/version-change-event-basic-expected.txt        2015-12-02 00:20:37 UTC (rev 192924)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> 0 version: TypeError: Type error
</span><del>-Negative version: TypeError: Type error
-String version: TypeError: Type error
</del><ins>+Negative version: TypeError: Value -1 is outside the range [0, 9007199254740991]
+String version: TypeError: Value NaN is outside the range [0, 9007199254740991]
</ins><span class="cx"> First request: 0 1
</span><span class="cx"> Second request: 0 1
</span><span class="cx"> Third request: 0 2
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192923 => 192924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-02 00:13:02 UTC (rev 192923)
+++ trunk/Source/WebCore/ChangeLog        2015-12-02 00:20:37 UTC (rev 192924)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-12-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Give a more detailed message for TypeErrors that result from EnforceRange.
+        https://bugs.webkit.org/show_bug.cgi?id=151725
+
+        Reviewed by Tim Horton.
+
+        No new tests (Covered by changes to existing tests).
+
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::rangeErrorString):
+        (WebCore::enforceRange):
+
</ins><span class="cx"> 2015-12-01  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Abrupt transition between Fullscreen -&gt; PiP
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (192923 => 192924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2015-12-02 00:13:02 UTC (rev 192923)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2015-12-02 00:20:37 UTC (rev 192924)
</span><span class="lines">@@ -320,15 +320,20 @@
</span><span class="cx"> static const uint32_t kMaxUInt32 = 0xffffffffU;
</span><span class="cx"> static const int64_t kJSMaxInteger = 0x20000000000000LL - 1; // 2^53 - 1, largest integer exactly representable in ECMAScript.
</span><span class="cx"> 
</span><ins>+static String rangeErrorString(double value, double min, double max)
+{
+    return makeString(&quot;Value &quot;, String::numberToStringECMAScript(value), &quot; is outside the range [&quot;, String::numberToStringECMAScript(min), &quot;, &quot;, String::numberToStringECMAScript(max), &quot;]&quot;);
+}
+
</ins><span class="cx"> static double enforceRange(ExecState* exec, double x, double minimum, double maximum)
</span><span class="cx"> {
</span><span class="cx">     if (std::isnan(x) || std::isinf(x)) {
</span><del>-        throwTypeError(exec);
</del><ins>+        exec-&gt;vm().throwException(exec, createTypeError(exec, rangeErrorString(x, minimum, maximum)));
</ins><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx">     x = trunc(x);
</span><span class="cx">     if (x &lt; minimum || x &gt; maximum) {
</span><del>-        throwTypeError(exec);
</del><ins>+        exec-&gt;vm().throwException(exec, createTypeError(exec, rangeErrorString(x, minimum, maximum)));
</ins><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx">     return x;
</span></span></pre>
</div>
</div>

</body>
</html>