<!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>[203393] 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/203393">203393</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-07-18 19:45:35 -0700 (Mon, 18 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make builtin TypeErrors consistent
https://bugs.webkit.org/show_bug.cgi?id=159899

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2016-07-18
Reviewed by Keith Miller.

Source/JavaScriptCore:

Converge on the single TypeError for non-coercible this objects in builtins.
Also update some other style to be more consistent with-in builtins.

* builtins/ArrayIteratorPrototype.js:
(next):
* builtins/ArrayPrototype.js:
(values):
(keys):
(entries):
(reduce):
(reduceRight):
(every):
(forEach):
(filter):
(map):
(some):
(fill):
(find):
(findIndex):
(includes):
(sort):
(concatSlowPath):
(copyWithin):
* builtins/StringPrototype.js:
(match):
(repeat):
(padStart):
(padEnd):
(intrinsic.StringPrototypeReplaceIntrinsic.replace):
(localeCompare):
(search):
(split):
* tests/es6/String.prototype_methods_String.prototype.padEnd.js:
* tests/es6/String.prototype_methods_String.prototype.padStart.js:
* tests/stress/array-iterators-next-error-messages.js:
(catch):
* tests/stress/array-iterators-next-with-call.js:
* tests/stress/regexp-match.js:
(shouldThrow):
* tests/stress/regexp-search.js:
(shouldThrow):

LayoutTests:

* js/array-find-expected.txt:
* js/array-findIndex-expected.txt:
* js/array-includes-expected.txt:
* js/dom/array-prototype-properties-expected.txt:
* js/dom/script-tests/string-prototype-properties.js:
* js/dom/string-prototype-properties-expected.txt:
* js/script-tests/array-find.js:
* js/script-tests/array-findIndex.js:
* js/script-tests/string-localeCompare.js:
* js/string-localeCompare-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsarrayfindexpectedtxt">trunk/LayoutTests/js/array-find-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsarrayfindIndexexpectedtxt">trunk/LayoutTests/js/array-findIndex-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsarrayincludesexpectedtxt">trunk/LayoutTests/js/array-includes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomarrayprototypepropertiesexpectedtxt">trunk/LayoutTests/js/dom/array-prototype-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomscripttestsstringprototypepropertiesjs">trunk/LayoutTests/js/dom/script-tests/string-prototype-properties.js</a></li>
<li><a href="#trunkLayoutTestsjsdomstringprototypepropertiesexpectedtxt">trunk/LayoutTests/js/dom/string-prototype-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsarrayfindjs">trunk/LayoutTests/js/script-tests/array-find.js</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsarrayfindIndexjs">trunk/LayoutTests/js/script-tests/array-findIndex.js</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsstringlocaleComparejs">trunk/LayoutTests/js/script-tests/string-localeCompare.js</a></li>
<li><a href="#trunkLayoutTestsjsstringlocaleCompareexpectedtxt">trunk/LayoutTests/js/string-localeCompare-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects155_String1554155410_StringprototypematchS155410_A1_T3expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects155_String1554155411_StringprototypereplaceS155411_A1_T3expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects155_String1554155412_StringprototypesearchS155412_A1_T3expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects155_String1554155414_StringprototypesplitS155414_A1_T3expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsArrayIteratorPrototypejs">trunk/Source/JavaScriptCore/builtins/ArrayIteratorPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsArrayPrototypejs">trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsStringPrototypejs">trunk/Source/JavaScriptCore/builtins/StringPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestses6Stringprototype_methods_StringprototypepadEndjs">trunk/Source/JavaScriptCore/tests/es6/String.prototype_methods_String.prototype.padEnd.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestses6Stringprototype_methods_StringprototypepadStartjs">trunk/Source/JavaScriptCore/tests/es6/String.prototype_methods_String.prototype.padStart.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsstressarrayiteratorsnexterrormessagesjs">trunk/Source/JavaScriptCore/tests/stress/array-iterators-next-error-messages.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsstressarrayiteratorsnextwithcalljs">trunk/Source/JavaScriptCore/tests/stress/array-iterators-next-with-call.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsstressregexpmatchjs">trunk/Source/JavaScriptCore/tests/stress/regexp-match.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsstressregexpsearchjs">trunk/Source/JavaScriptCore/tests/stress/regexp-search.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/ChangeLog        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-07-18  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Make builtin TypeErrors consistent
+        https://bugs.webkit.org/show_bug.cgi?id=159899
+
+        Reviewed by Keith Miller.
+
+        * js/array-find-expected.txt:
+        * js/array-findIndex-expected.txt:
+        * js/array-includes-expected.txt:
+        * js/dom/array-prototype-properties-expected.txt:
+        * js/dom/script-tests/string-prototype-properties.js:
+        * js/dom/string-prototype-properties-expected.txt:
+        * js/script-tests/array-find.js:
+        * js/script-tests/array-findIndex.js:
+        * js/script-tests/string-localeCompare.js:
+        * js/string-localeCompare-expected.txt:
+        * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt:
+        * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt:
+        * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt:
+        * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt:
+
</ins><span class="cx"> 2016-07-18  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         EventTarget.dispatchEvent() parameter should not be nullable
</span></span></pre></div>
<a id="trunkLayoutTestsjsarrayfindexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/array-find-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/array-find-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/array-find-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -42,8 +42,8 @@
</span><span class="cx"> PASS [0,1,2,3,4,5,6,7,8,9].find(findItemAddedDuringSearch) is undefined
</span><span class="cx"> PASS [0,1,2,3,4,5,6,7,8,9].find(findItemRemovedDuringSearch) is undefined
</span><span class="cx"> Exceptions
</span><del>-PASS Array.prototype.find.call(undefined, function() {}) threw exception TypeError: Array.prototype.find requires that |this| not be undefined.
-PASS Array.prototype.find.call(null, function() {}) threw exception TypeError: Array.prototype.find requires that |this| not be null.
</del><ins>+PASS Array.prototype.find.call(undefined, function() {}) threw exception TypeError: Array.prototype.find requires that |this| not be null or undefined.
+PASS Array.prototype.find.call(null, function() {}) threw exception TypeError: Array.prototype.find requires that |this| not be null or undefined.
</ins><span class="cx"> PASS [].find(1) threw exception TypeError: Array.prototype.find callback must be a function.
</span><span class="cx"> PASS [].find('hello') threw exception TypeError: Array.prototype.find callback must be a function.
</span><span class="cx"> PASS [].find([]) threw exception TypeError: Array.prototype.find callback must be a function.
</span></span></pre></div>
<a id="trunkLayoutTestsjsarrayfindIndexexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/array-findIndex-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/array-findIndex-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/array-findIndex-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -43,8 +43,8 @@
</span><span class="cx"> PASS [0,1,2,3,4,5,6,7,8,9].findIndex(findItemAddedDuringSearch) is -1
</span><span class="cx"> PASS [0,1,2,3,4,5,6,7,8,9].findIndex(findItemRemovedDuringSearch) is -1
</span><span class="cx"> Exceptions
</span><del>-PASS Array.prototype.findIndex.call(undefined, function() {}) threw exception TypeError: Array.prototype.findIndex requires that |this| not be undefined.
-PASS Array.prototype.findIndex.call(null, function() {}) threw exception TypeError: Array.prototype.findIndex requires that |this| not be null.
</del><ins>+PASS Array.prototype.findIndex.call(undefined, function() {}) threw exception TypeError: Array.prototype.findIndex requires that |this| not be null or undefined.
+PASS Array.prototype.findIndex.call(null, function() {}) threw exception TypeError: Array.prototype.findIndex requires that |this| not be null or undefined.
</ins><span class="cx"> PASS [].findIndex(1) threw exception TypeError: Array.prototype.findIndex callback must be a function.
</span><span class="cx"> PASS [].findIndex('hello') threw exception TypeError: Array.prototype.findIndex callback must be a function.
</span><span class="cx"> PASS [].findIndex([]) threw exception TypeError: Array.prototype.findIndex callback must be a function.
</span></span></pre></div>
<a id="trunkLayoutTestsjsarrayincludesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/array-includes-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/array-includes-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/array-includes-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx"> PASS a.includes('sausage') is true
</span><span class="cx"> PASS a.includes('hashbrown') is false
</span><span class="cx"> PASS a.includes('toast') is false
</span><del>-PASS Array.prototype.includes.call(undefined, 1) threw exception TypeError: Array.prototype.includes requires that |this| not be undefined.
-PASS Array.prototype.includes.call(null, 1) threw exception TypeError: Array.prototype.includes requires that |this| not be null.
</del><ins>+PASS Array.prototype.includes.call(undefined, 1) threw exception TypeError: Array.prototype.includes requires that |this| not be null or undefined.
+PASS Array.prototype.includes.call(null, 1) threw exception TypeError: Array.prototype.includes requires that |this| not be null or undefined.
</ins><span class="cx"> Array-like object with invalid lengths
</span><span class="cx"> PASS var obj = { 0: 1, 1: 1, 2: 1, length: 0 }; Array.prototype.includes.call(obj, 1) is false
</span><span class="cx"> PASS var obj = { 0: 1, 1: 1, 2: 1, length: -0 }; Array.prototype.includes.call(obj, 1) is false
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomarrayprototypepropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/array-prototype-properties-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/array-prototype-properties-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/dom/array-prototype-properties-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Array.prototype.toString.call(undefined) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.toString.call(undefined)').
</span><span class="cx"> PASS Array.prototype.toLocaleString.call(undefined) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.toLocaleString.call(undefined)').
</span><del>-PASS Array.prototype.concat.call(undefined, []) threw exception TypeError: Array.prototype.concat requires that |this| not be undefined.
</del><ins>+PASS Array.prototype.concat.call(undefined, []) threw exception TypeError: Array.prototype.concat requires that |this| not be null or undefined.
</ins><span class="cx"> PASS Array.prototype.join.call(undefined, []) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.join.call(undefined, [])').
</span><span class="cx"> PASS Array.prototype.pop.call(undefined) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.pop.call(undefined)').
</span><span class="cx"> PASS Array.prototype.push.call(undefined, {}) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.push.call(undefined, {})').
</span><span class="lines">@@ -12,18 +12,18 @@
</span><span class="cx"> PASS Array.prototype.reverse.call(undefined) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.reverse.call(undefined)').
</span><span class="cx"> PASS Array.prototype.shift.call(undefined) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.shift.call(undefined)').
</span><span class="cx"> PASS Array.prototype.slice.call(undefined, 0, 1) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.slice.call(undefined, 0, 1)').
</span><del>-PASS Array.prototype.sort.call(undefined) threw exception TypeError: Array.prototype.sort requires that |this| not be undefined.
</del><ins>+PASS Array.prototype.sort.call(undefined) threw exception TypeError: Array.prototype.sort requires that |this| not be null or undefined.
</ins><span class="cx"> PASS Array.prototype.splice.call(undefined, 0, 1) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.splice.call(undefined, 0, 1)').
</span><span class="cx"> PASS Array.prototype.unshift.call(undefined, {}) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.unshift.call(undefined, {})').
</span><del>-PASS Array.prototype.every.call(undefined, toString) threw exception TypeError: Array.prototype.every requires that |this| not be undefined.
-PASS Array.prototype.forEach.call(undefined, toString) threw exception TypeError: Array.prototype.forEach requires that |this| not be undefined.
-PASS Array.prototype.some.call(undefined, toString) threw exception TypeError: Array.prototype.some requires that |this| not be undefined.
</del><ins>+PASS Array.prototype.every.call(undefined, toString) threw exception TypeError: Array.prototype.every requires that |this| not be null or undefined.
+PASS Array.prototype.forEach.call(undefined, toString) threw exception TypeError: Array.prototype.forEach requires that |this| not be null or undefined.
+PASS Array.prototype.some.call(undefined, toString) threw exception TypeError: Array.prototype.some requires that |this| not be null or undefined.
</ins><span class="cx"> PASS Array.prototype.indexOf.call(undefined, 0) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.indexOf.call(undefined, 0)').
</span><span class="cx"> PASS Array.prototype.lastIndexOf.call(undefined, 0) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.lastIndexOf.call(undefined, 0)').
</span><del>-PASS Array.prototype.filter.call(undefined, toString) threw exception TypeError: Array.prototype.filter requires that |this| not be undefined.
-PASS Array.prototype.reduce.call(undefined, toString) threw exception TypeError: Array.prototype.reduce requires that |this| not be undefined.
-PASS Array.prototype.reduceRight.call(undefined, toString) threw exception TypeError: Array.prototype.reduceRight requires that |this| not be undefined.
-PASS Array.prototype.map.call(undefined, toString) threw exception TypeError: Array.prototype.map requires that |this| not be undefined.
</del><ins>+PASS Array.prototype.filter.call(undefined, toString) threw exception TypeError: Array.prototype.filter requires that |this| not be null or undefined.
+PASS Array.prototype.reduce.call(undefined, toString) threw exception TypeError: Array.prototype.reduce requires that |this| not be null or undefined.
+PASS Array.prototype.reduceRight.call(undefined, toString) threw exception TypeError: Array.prototype.reduceRight requires that |this| not be null or undefined.
+PASS Array.prototype.map.call(undefined, toString) threw exception TypeError: Array.prototype.map requires that |this| not be null or undefined.
</ins><span class="cx"> PASS [{toLocaleString:function(){throw 1}},{toLocaleString:function(){throw 2}}].toLocaleString() threw exception 1.
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomscripttestsstringprototypepropertiesjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/script-tests/string-prototype-properties.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/script-tests/string-prototype-properties.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/dom/script-tests/string-prototype-properties.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> shouldThrow(&quot;String.prototype.substring.call(undefined, 1, 3)&quot;);
</span><span class="cx"> shouldThrow(&quot;String.prototype.toLowerCase.call(undefined)&quot;);
</span><span class="cx"> shouldThrow(&quot;String.prototype.toUpperCase.call(undefined)&quot;);
</span><del>-shouldThrow(&quot;String.prototype.localeCompare.call(undefined, '1224')&quot;, &quot;'TypeError: String.prototype.localeCompare requires that |this| not be undefined'&quot;);
</del><ins>+shouldThrow(&quot;String.prototype.localeCompare.call(undefined, '1224')&quot;, &quot;'TypeError: String.prototype.localeCompare requires that |this| not be null or undefined'&quot;);
</ins><span class="cx"> shouldThrow(&quot;String.prototype.toLocaleLowerCase.call(undefined)&quot;);
</span><span class="cx"> shouldThrow(&quot;String.prototype.toLocaleUpperCase.call(undefined)&quot;);
</span><span class="cx"> shouldThrow(&quot;String.prototype.trim.call(undefined)&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomstringprototypepropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/string-prototype-properties-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/string-prototype-properties-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/dom/string-prototype-properties-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -10,17 +10,17 @@
</span><span class="cx"> PASS String.prototype.concat.call(undefined, 'five') threw exception TypeError: Type error.
</span><span class="cx"> PASS String.prototype.indexOf.call(undefined, '2') threw exception TypeError: Type error.
</span><span class="cx"> PASS String.prototype.lastIndexOf.call(undefined, '2') threw exception TypeError: Type error.
</span><del>-PASS String.prototype.match.call(undefined, /2+/) threw exception TypeError: String.prototype.match requires that |this| not be undefined.
-PASS String.prototype.replace.call(undefined, /2+/, '-') threw exception TypeError: String.prototype.replace requires that |this| not be undefined.
-PASS String.prototype.search.call(undefined, '4') threw exception TypeError: String.prototype.search requires that |this| not be undefined.
</del><ins>+PASS String.prototype.match.call(undefined, /2+/) threw exception TypeError: String.prototype.match requires that |this| not be null or undefined.
+PASS String.prototype.replace.call(undefined, /2+/, '-') threw exception TypeError: String.prototype.replace requires that |this| not be null or undefined.
+PASS String.prototype.search.call(undefined, '4') threw exception TypeError: String.prototype.search requires that |this| not be null or undefined.
</ins><span class="cx"> PASS String.prototype.slice.call(undefined, 1, 3) threw exception TypeError: Type error.
</span><del>-PASS String.prototype.split.call(undefined, '2') threw exception TypeError: String.prototype.split requires that |this| not be undefined.
</del><ins>+PASS String.prototype.split.call(undefined, '2') threw exception TypeError: String.prototype.split requires that |this| not be null or undefined.
</ins><span class="cx"> PASS String.prototype.slice.call(undefined, 1, 3) threw exception TypeError: Type error.
</span><span class="cx"> PASS String.prototype.substr.call(undefined, 1, 3) threw exception TypeError: Type error.
</span><span class="cx"> PASS String.prototype.substring.call(undefined, 1, 3) threw exception TypeError: Type error.
</span><span class="cx"> PASS String.prototype.toLowerCase.call(undefined) threw exception TypeError: Type error.
</span><span class="cx"> PASS String.prototype.toUpperCase.call(undefined) threw exception TypeError: Type error.
</span><del>-PASS String.prototype.localeCompare.call(undefined, '1224') threw exception TypeError: String.prototype.localeCompare requires that |this| not be undefined.
</del><ins>+PASS String.prototype.localeCompare.call(undefined, '1224') threw exception TypeError: String.prototype.localeCompare requires that |this| not be null or undefined.
</ins><span class="cx"> PASS String.prototype.toLocaleLowerCase.call(undefined) threw exception TypeError: Type error.
</span><span class="cx"> PASS String.prototype.toLocaleUpperCase.call(undefined) threw exception TypeError: Type error.
</span><span class="cx"> PASS String.prototype.trim.call(undefined) threw exception TypeError: Type error.
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsarrayfindjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/array-find.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/array-find.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/script-tests/array-find.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -101,8 +101,8 @@
</span><span class="cx"> shouldBe(&quot;[0,1,2,3,4,5,6,7,8,9].find(findItemRemovedDuringSearch)&quot;, &quot;undefined&quot;);
</span><span class="cx"> 
</span><span class="cx"> debug(&quot;Exceptions&quot;);
</span><del>-shouldThrow(&quot;Array.prototype.find.call(undefined, function() {})&quot;, &quot;'TypeError: Array.prototype.find requires that |this| not be undefined'&quot;);
-shouldThrow(&quot;Array.prototype.find.call(null, function() {})&quot;, &quot;'TypeError: Array.prototype.find requires that |this| not be null'&quot;);
</del><ins>+shouldThrow(&quot;Array.prototype.find.call(undefined, function() {})&quot;, &quot;'TypeError: Array.prototype.find requires that |this| not be null or undefined'&quot;);
+shouldThrow(&quot;Array.prototype.find.call(null, function() {})&quot;, &quot;'TypeError: Array.prototype.find requires that |this| not be null or undefined'&quot;);
</ins><span class="cx"> shouldThrow(&quot;[].find(1)&quot;, &quot;'TypeError: Array.prototype.find callback must be a function'&quot;);
</span><span class="cx"> shouldThrow(&quot;[].find('hello')&quot;, &quot;'TypeError: Array.prototype.find callback must be a function'&quot;);
</span><span class="cx"> shouldThrow(&quot;[].find([])&quot;, &quot;'TypeError: Array.prototype.find callback must be a function'&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsarrayfindIndexjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/array-findIndex.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/array-findIndex.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/script-tests/array-findIndex.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -103,8 +103,8 @@
</span><span class="cx"> shouldBe(&quot;[0,1,2,3,4,5,6,7,8,9].findIndex(findItemRemovedDuringSearch)&quot;, &quot;-1&quot;);
</span><span class="cx"> 
</span><span class="cx"> debug(&quot;Exceptions&quot;);
</span><del>-shouldThrow(&quot;Array.prototype.findIndex.call(undefined, function() {})&quot;, &quot;'TypeError: Array.prototype.findIndex requires that |this| not be undefined'&quot;);
-shouldThrow(&quot;Array.prototype.findIndex.call(null, function() {})&quot;, &quot;'TypeError: Array.prototype.findIndex requires that |this| not be null'&quot;);
</del><ins>+shouldThrow(&quot;Array.prototype.findIndex.call(undefined, function() {})&quot;, &quot;'TypeError: Array.prototype.findIndex requires that |this| not be null or undefined'&quot;);
+shouldThrow(&quot;Array.prototype.findIndex.call(null, function() {})&quot;, &quot;'TypeError: Array.prototype.findIndex requires that |this| not be null or undefined'&quot;);
</ins><span class="cx"> shouldThrow(&quot;[].findIndex(1)&quot;, &quot;'TypeError: Array.prototype.findIndex callback must be a function'&quot;);
</span><span class="cx"> shouldThrow(&quot;[].findIndex('hello')&quot;, &quot;'TypeError: Array.prototype.findIndex callback must be a function'&quot;);
</span><span class="cx"> shouldThrow(&quot;[].findIndex([])&quot;, &quot;'TypeError: Array.prototype.findIndex callback must be a function'&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsstringlocaleComparejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/string-localeCompare.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/string-localeCompare.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/script-tests/string-localeCompare.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -7,9 +7,9 @@
</span><span class="cx"> shouldBeTrue(&quot;Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').writable&quot;);
</span><span class="cx"> 
</span><span class="cx"> // Test RequireObjectCoercible.
</span><del>-shouldThrow(&quot;String.prototype.localeCompare.call()&quot;, &quot;'TypeError: String.prototype.localeCompare requires that |this| not be undefined'&quot;);
-shouldThrow(&quot;String.prototype.localeCompare.call(undefined)&quot;, &quot;'TypeError: String.prototype.localeCompare requires that |this| not be undefined'&quot;);
-shouldThrow(&quot;String.prototype.localeCompare.call(null)&quot;, &quot;'TypeError: String.prototype.localeCompare requires that |this| not be null'&quot;);
</del><ins>+shouldThrow(&quot;String.prototype.localeCompare.call()&quot;, &quot;'TypeError: String.prototype.localeCompare requires that |this| not be null or undefined'&quot;);
+shouldThrow(&quot;String.prototype.localeCompare.call(undefined)&quot;, &quot;'TypeError: String.prototype.localeCompare requires that |this| not be null or undefined'&quot;);
+shouldThrow(&quot;String.prototype.localeCompare.call(null)&quot;, &quot;'TypeError: String.prototype.localeCompare requires that |this| not be null or undefined'&quot;);
</ins><span class="cx"> shouldNotThrow(&quot;String.prototype.localeCompare.call({}, '')&quot;);
</span><span class="cx"> shouldNotThrow(&quot;String.prototype.localeCompare.call([], '')&quot;);
</span><span class="cx"> shouldNotThrow(&quot;String.prototype.localeCompare.call(NaN, '')&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsstringlocaleCompareexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/string-localeCompare-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/string-localeCompare-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/js/string-localeCompare-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -7,9 +7,9 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').configurable is true
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').writable is true
</span><del>-PASS String.prototype.localeCompare.call() threw exception TypeError: String.prototype.localeCompare requires that |this| not be undefined.
-PASS String.prototype.localeCompare.call(undefined) threw exception TypeError: String.prototype.localeCompare requires that |this| not be undefined.
-PASS String.prototype.localeCompare.call(null) threw exception TypeError: String.prototype.localeCompare requires that |this| not be null.
</del><ins>+PASS String.prototype.localeCompare.call() threw exception TypeError: String.prototype.localeCompare requires that |this| not be null or undefined.
+PASS String.prototype.localeCompare.call(undefined) threw exception TypeError: String.prototype.localeCompare requires that |this| not be null or undefined.
+PASS String.prototype.localeCompare.call(null) threw exception TypeError: String.prototype.localeCompare requires that |this| not be null or undefined.
</ins><span class="cx"> PASS String.prototype.localeCompare.call({}, '') did not throw exception.
</span><span class="cx"> PASS String.prototype.localeCompare.call([], '') did not throw exception.
</span><span class="cx"> PASS String.prototype.localeCompare.call(NaN, '') did not throw exception.
</span></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects155_String1554155410_StringprototypematchS155410_A1_T3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> S15.5.4.10_A1_T3
</span><span class="cx"> 
</span><del>-FAIL TypeError: String.prototype.match requires that |this| not be undefined
</del><ins>+FAIL TypeError: String.prototype.match requires that |this| not be null or undefined
</ins><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects155_String1554155411_StringprototypereplaceS155411_A1_T3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> S15.5.4.11_A1_T3
</span><span class="cx"> 
</span><del>-FAIL TypeError: String.prototype.replace requires that |this| not be undefined
</del><ins>+FAIL TypeError: String.prototype.replace requires that |this| not be null or undefined
</ins><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects155_String1554155412_StringprototypesearchS155412_A1_T3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> S15.5.4.12_A1_T3
</span><span class="cx"> 
</span><del>-FAIL TypeError: String.prototype.search requires that |this| not be undefined
</del><ins>+FAIL TypeError: String.prototype.search requires that |this| not be null or undefined
</ins><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects155_String1554155414_StringprototypesplitS155414_A1_T3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> S15.5.4.14_A1_T3
</span><span class="cx"> 
</span><del>-FAIL TypeError: String.prototype.split requires that |this| not be undefined
</del><ins>+FAIL TypeError: String.prototype.split requires that |this| not be null or undefined
</ins><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -1,3 +1,52 @@
</span><ins>+2016-07-18  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Make builtin TypeErrors consistent
+        https://bugs.webkit.org/show_bug.cgi?id=159899
+
+        Reviewed by Keith Miller.
+
+        Converge on the single TypeError for non-coercible this objects in builtins.
+        Also update some other style to be more consistent with-in builtins.
+
+        * builtins/ArrayIteratorPrototype.js:
+        (next):
+        * builtins/ArrayPrototype.js:
+        (values):
+        (keys):
+        (entries):
+        (reduce):
+        (reduceRight):
+        (every):
+        (forEach):
+        (filter):
+        (map):
+        (some):
+        (fill):
+        (find):
+        (findIndex):
+        (includes):
+        (sort):
+        (concatSlowPath):
+        (copyWithin):
+        * builtins/StringPrototype.js:
+        (match):
+        (repeat):
+        (padStart):
+        (padEnd):
+        (intrinsic.StringPrototypeReplaceIntrinsic.replace):
+        (localeCompare):
+        (search):
+        (split):
+        * tests/es6/String.prototype_methods_String.prototype.padEnd.js:
+        * tests/es6/String.prototype_methods_String.prototype.padStart.js:
+        * tests/stress/array-iterators-next-error-messages.js:
+        (catch):
+        * tests/stress/array-iterators-next-with-call.js:
+        * tests/stress/regexp-match.js:
+        (shouldThrow):
+        * tests/stress/regexp-search.js:
+        (shouldThrow):
+
</ins><span class="cx"> 2016-07-17  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Implement table-based switches in B3/Air
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsArrayIteratorPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ArrayIteratorPrototype.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ArrayIteratorPrototype.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/builtins/ArrayIteratorPrototype.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -28,11 +28,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;%ArrayIteratorPrototype%.next requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;%ArrayIteratorPrototype%.next requires that |this| not be undefined&quot;);
-    }
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;%ArrayIteratorPrototype%.next requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let next = this.@arrayIteratorNext;
</span><span class="cx">     if (next === @undefined)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsArrayPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -38,11 +38,10 @@
</span><span class="cx"> function values()
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;Array.prototype.values requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;Array.prototype.values requires that |this| not be undefined&quot;);
-    }
</del><ins>+
+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.values requires that |this| not be null or undefined&quot;);
+
</ins><span class="cx">     return new @createArrayIterator(@Object(this), &quot;value&quot;, @arrayIteratorValueNext);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -49,12 +48,10 @@
</span><span class="cx"> function keys()
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;Array.prototype.keys requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;Array.prototype.keys requires that |this| not be undefined&quot;);
-    }
</del><span class="cx"> 
</span><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.keys requires that |this| not be null or undefined&quot;);
+
</ins><span class="cx">     return new @createArrayIterator(@Object(this), &quot;key&quot;, @arrayIteratorKeyNext);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -61,12 +58,10 @@
</span><span class="cx"> function entries()
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;Array.prototype.entries requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;Array.prototype.entries requires that |this| not be undefined&quot;);
-    }
</del><span class="cx"> 
</span><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.entries requires that |this| not be null or undefined&quot;);
+
</ins><span class="cx">     return new @createArrayIterator(@Object(this), &quot;key+value&quot;, @arrayIteratorKeyValueNext);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -74,12 +69,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.reduce requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.reduce requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.reduce requires that |this| not be undefined&quot;);
-
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -112,12 +104,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.reduceRight requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.reduceRight requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.reduceRight requires that |this| not be undefined&quot;);
-
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -150,12 +139,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.every requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.every requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.every requires that |this| not be undefined&quot;);
-    
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -178,12 +164,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.forEach requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.forEach requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.forEach requires that |this| not be undefined&quot;);
-    
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -202,12 +185,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.filter requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.filter requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.filter requires that |this| not be undefined&quot;);
-    
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -254,12 +234,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.map requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.map requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.map requires that |this| not be undefined&quot;);
-    
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -303,12 +280,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.some requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.some requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.some requires that |this| not be undefined&quot;);
-    
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -329,42 +303,41 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.fill requires that |this| not be null&quot;);
-    
-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.fill requires that |this| not be undefined&quot;);
-    var O = @Object(this);
-    var len = @toLength(O.length);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.fill requires that |this| not be null or undefined&quot;);
+
+    var array = @Object(this);
+    var length = @toLength(array.length);
+
</ins><span class="cx">     var relativeStart = 0;
</span><span class="cx">     if (arguments.length &gt; 1 &amp;&amp; arguments[1] !== @undefined)
</span><span class="cx">         relativeStart = arguments[1] | 0;
</span><span class="cx">     var k = 0;
</span><span class="cx">     if (relativeStart &lt; 0) {
</span><del>-        k = len + relativeStart;
</del><ins>+        k = length + relativeStart;
</ins><span class="cx">         if (k &lt; 0)
</span><span class="cx">             k = 0;
</span><span class="cx">     } else {
</span><span class="cx">         k = relativeStart;
</span><del>-        if (k &gt; len)
-            k = len;
</del><ins>+        if (k &gt; length)
+            k = length;
</ins><span class="cx">     }
</span><del>-    var relativeEnd = len;
</del><ins>+    var relativeEnd = length;
</ins><span class="cx">     if (arguments.length &gt; 2 &amp;&amp; arguments[2] !== @undefined)
</span><span class="cx">         relativeEnd = arguments[2] | 0;
</span><span class="cx">     var final = 0;
</span><span class="cx">     if (relativeEnd &lt; 0) {
</span><del>-        final = len + relativeEnd;
</del><ins>+        final = length + relativeEnd;
</ins><span class="cx">         if (final &lt; 0)
</span><span class="cx">             final = 0;
</span><span class="cx">     } else {
</span><span class="cx">         final = relativeEnd;
</span><del>-        if (final &gt; len)
-            final = len;
</del><ins>+        if (final &gt; length)
+            final = length;
</ins><span class="cx">     }
</span><span class="cx">     for (; k &lt; final; k++)
</span><del>-        O[k] = value;
-    return O;
</del><ins>+        array[k] = value;
+    return array;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function find(callback /*, thisArg */)
</span><span class="lines">@@ -371,12 +344,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.find requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.find requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.find requires that |this| not be undefined&quot;);
-    
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -396,12 +366,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.findIndex requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.findIndex requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.findIndex requires that |this| not be undefined&quot;);
-    
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -420,12 +387,9 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.includes requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.includes requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.includes requires that |this| not be undefined&quot;);
-
</del><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="lines">@@ -673,12 +637,9 @@
</span><span class="cx">         bucketSort(array, 0, strings, 0);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;Array.prototype.sort requires that |this| not be null&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.sort requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><del>-    if (this === @undefined)
-        throw new @TypeError(&quot;Array.prototype.sort requires that |this| not be undefined&quot;);
-
</del><span class="cx">     if (typeof this == &quot;string&quot;)
</span><span class="cx">         throw new @TypeError(&quot;Attempted to assign to readonly property.&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -695,12 +656,10 @@
</span><span class="cx"> function concatSlowPath()
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;Array.prototype.concat requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;Array.prototype.concat requires that |this| not be undefined&quot;);
-    }
</del><span class="cx"> 
</span><ins>+    if (this == null)
+        throw new @TypeError(&quot;Array.prototype.concat requires that |this| not be null or undefined&quot;);
+
</ins><span class="cx">     var currentElement = @Object(this);
</span><span class="cx"> 
</span><span class="cx">     var constructor;
</span><span class="lines">@@ -786,11 +745,11 @@
</span><span class="cx">         return (maybeNegativeZero &lt; positive) ? maybeNegativeZero : positive;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (this === null || this === @undefined)
</del><ins>+    if (this == null)
</ins><span class="cx">         throw new @TypeError(&quot;Array.copyWithin requires that |this| not be null or undefined&quot;);
</span><del>-    var thisObject = @Object(this);
</del><span class="cx"> 
</span><del>-    var length = @toLength(thisObject.length);
</del><ins>+    var array = @Object(this);
+    var length = @toLength(array.length);
</ins><span class="cx"> 
</span><span class="cx">     var relativeTarget = @toInteger(target);
</span><span class="cx">     var to = (relativeTarget &lt; 0) ? maxWithPositives(length + relativeTarget, 0) : minWithMaybeNegativeZeroAndPositive(relativeTarget, length);
</span><span class="lines">@@ -820,11 +779,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (var i = 0; i &lt; count; ++i, from += direction, to += direction) {
</span><del>-        if (from in thisObject)
-            thisObject[to] = thisObject[from];
</del><ins>+        if (from in array)
+            array[to] = array[from];
</ins><span class="cx">         else
</span><del>-            delete thisObject[to];
</del><ins>+            delete array[to];
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return thisObject;
</del><ins>+    return array;
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsStringPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/StringPrototype.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/StringPrototype.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/builtins/StringPrototype.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -29,11 +29,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;String.prototype.match requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;String.prototype.match requires that |this| not be undefined&quot;);
-    }
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;String.prototype.match requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (regexp != null) {
</span><span class="cx">         var matcher = regexp.@matchSymbol;
</span><span class="lines">@@ -104,12 +101,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this == null) {
-        var message = &quot;String.prototype.repeat requires that |this| not be undefined&quot;;
-        if (this === null)
-            message = &quot;String.prototype.repeat requires that |this| not be null&quot;;
-        throw new @TypeError(message);
-    }
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;String.prototype.repeat requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var string = @toString(this);
</span><span class="cx">     count = @toInteger(count);
</span><span class="lines">@@ -130,11 +123,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;String.prototype.padStart requires that |this| not be null&quot;);
-    
-    if (this === @undefined)
-        throw new @TypeError(&quot;String.prototype.padStart requires that |this| not be undefined&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;String.prototype.padStart requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var string = @toString(this);
</span><span class="cx">     maxLength = @toLength(maxLength);
</span><span class="lines">@@ -170,11 +160,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;String.prototype.padEnd requires that |this| not be null&quot;);
-    
-    if (this === @undefined)
-        throw new @TypeError(&quot;String.prototype.padEnd requires that |this| not be undefined&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;String.prototype.padEnd requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var string = @toString(this);
</span><span class="cx">     maxLength = @toLength(maxLength);
</span><span class="lines">@@ -231,11 +218,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;String.prototype.replace requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;String.prototype.replace requires that |this| not be undefined&quot;);
-    }
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;String.prototype.replace requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (search != null) {
</span><span class="cx">         let replacer = search.@replaceSymbol;
</span><span class="lines">@@ -259,11 +243,8 @@
</span><span class="cx">     // http://ecma-international.org/publications/standards/Ecma-402.htm
</span><span class="cx"> 
</span><span class="cx">     // 1. Let O be RequireObjectCoercible(this value).
</span><del>-    if (this === null)
-        throw new @TypeError(&quot;String.prototype.localeCompare requires that |this| not be null&quot;);
-    
-    if (this === @undefined)
-        throw new @TypeError(&quot;String.prototype.localeCompare requires that |this| not be undefined&quot;);
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;String.prototype.localeCompare requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // 2. Let S be ToString(O).
</span><span class="cx">     // 3. ReturnIfAbrupt(S).
</span><span class="lines">@@ -289,11 +270,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;String.prototype.search requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;String.prototype.search requires that |this| not be undefined&quot;);
-    }
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;String.prototype.search requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (regexp != null) {
</span><span class="cx">         var searcher = regexp.@searchSymbol;
</span><span class="lines">@@ -310,11 +288,8 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx">     
</span><del>-    if (this == null) {
-        if (this === null)
-            throw new @TypeError(&quot;String.prototype.split requires that |this| not be null&quot;);
-        throw new @TypeError(&quot;String.prototype.split requires that |this| not be undefined&quot;);
-    }
</del><ins>+    if (this == null)
+        throw new @TypeError(&quot;String.prototype.split requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     if (separator != null) {
</span><span class="cx">         var splitter = separator.@splitSymbol;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6Stringprototype_methods_StringprototypepadEndjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/es6/String.prototype_methods_String.prototype.padEnd.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6/String.prototype_methods_String.prototype.padEnd.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/tests/es6/String.prototype_methods_String.prototype.padEnd.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -41,8 +41,8 @@
</span><span class="cx"> 
</span><span class="cx"> (function TestRequireObjectCoercible() {
</span><span class="cx">     var padEnd = String.prototype.padEnd;
</span><del>-    shouldThrow(() =&gt; padEnd.call(null, 4, &quot;test&quot;), &quot;TypeError: String.prototype.padEnd requires that |this| not be null&quot;);
-    shouldThrow(() =&gt; padEnd.call(undefined, 4, &quot;test&quot;), &quot;TypeError: String.prototype.padEnd requires that |this| not be undefined&quot;);
</del><ins>+    shouldThrow(() =&gt; padEnd.call(null, 4, &quot;test&quot;), &quot;TypeError: String.prototype.padEnd requires that |this| not be null or undefined&quot;);
+    shouldThrow(() =&gt; padEnd.call(undefined, 4, &quot;test&quot;), &quot;TypeError: String.prototype.padEnd requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     shouldBe(&quot;123   &quot;, padEnd.call({
</span><span class="cx">         __proto__: null,
</span><span class="cx">         valueOf() { return 123; }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6Stringprototype_methods_StringprototypepadStartjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/es6/String.prototype_methods_String.prototype.padStart.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6/String.prototype_methods_String.prototype.padStart.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/tests/es6/String.prototype_methods_String.prototype.padStart.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -41,8 +41,8 @@
</span><span class="cx"> 
</span><span class="cx"> (function TestRequireObjectCoercible() {
</span><span class="cx">     var padStart = String.prototype.padStart;
</span><del>-    shouldThrow(() =&gt; padStart.call(null, 4, &quot;test&quot;), &quot;TypeError: String.prototype.padStart requires that |this| not be null&quot;);
-    shouldThrow(() =&gt; padStart.call(undefined, 4, &quot;test&quot;), &quot;TypeError: String.prototype.padStart requires that |this| not be undefined&quot;);
</del><ins>+    shouldThrow(() =&gt; padStart.call(null, 4, &quot;test&quot;), &quot;TypeError: String.prototype.padStart requires that |this| not be null or undefined&quot;);
+    shouldThrow(() =&gt; padStart.call(undefined, 4, &quot;test&quot;), &quot;TypeError: String.prototype.padStart requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     shouldBe(&quot;   123&quot;, padStart.call({
</span><span class="cx">         __proto__: null,
</span><span class="cx">         valueOf() { return 123; }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsstressarrayiteratorsnexterrormessagesjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/stress/array-iterators-next-error-messages.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/stress/array-iterators-next-error-messages.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/tests/stress/array-iterators-next-error-messages.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -8,11 +8,11 @@
</span><span class="cx"> try {
</span><span class="cx">     next.call(null);
</span><span class="cx"> } catch(e) {
</span><del>-    assert(e, &quot;TypeError: %ArrayIteratorPrototype%.next requires that |this| not be null&quot;);
</del><ins>+    assert(e, &quot;TypeError: %ArrayIteratorPrototype%.next requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> try {
</span><span class="cx">     next.call(undefined);
</span><span class="cx"> } catch(e) {
</span><del>-    assert(e, &quot;TypeError: %ArrayIteratorPrototype%.next requires that |this| not be undefined&quot;);
</del><ins>+    assert(e, &quot;TypeError: %ArrayIteratorPrototype%.next requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsstressarrayiteratorsnextwithcalljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/stress/array-iterators-next-with-call.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/stress/array-iterators-next-with-call.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/tests/stress/array-iterators-next-with-call.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -85,9 +85,9 @@
</span><span class="cx">         throw &quot;Error: no error thrown&quot;;
</span><span class="cx">     var expectedMessage = 'TypeError: %ArrayIteratorPrototype%.next requires that |this| be an Array Iterator instance';
</span><span class="cx">     if (primitive === null)
</span><del>-        expectedMessage = 'TypeError: %ArrayIteratorPrototype%.next requires that |this| not be null';
</del><ins>+        expectedMessage = 'TypeError: %ArrayIteratorPrototype%.next requires that |this| not be null or undefined';
</ins><span class="cx">     if (primitive === undefined)
</span><del>-        expectedMessage = 'TypeError: %ArrayIteratorPrototype%.next requires that |this| not be undefined';
</del><ins>+        expectedMessage = 'TypeError: %ArrayIteratorPrototype%.next requires that |this| not be null or undefined';
</ins><span class="cx">     if (String(didThrow) !== expectedMessage)
</span><span class="cx">         throw &quot;Error: bad error thrown: &quot; + didThrow;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsstressregexpmatchjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/stress/regexp-match.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/stress/regexp-match.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/tests/stress/regexp-match.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -25,11 +25,11 @@
</span><span class="cx"> 
</span><span class="cx"> shouldThrow(function () {
</span><span class="cx">     String.prototype.match.call(null, /Cocoa/);
</span><del>-}, &quot;TypeError: String.prototype.match requires that |this| not be null&quot;);
</del><ins>+}, &quot;TypeError: String.prototype.match requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldThrow(function () {
</span><span class="cx">     String.prototype.match.call(undefined, /Cocoa/);
</span><del>-}, &quot;TypeError: String.prototype.match requires that |this| not be undefined&quot;);
</del><ins>+}, &quot;TypeError: String.prototype.match requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldThrow(function () {
</span><span class="cx">     string.match(errorKey);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsstressregexpsearchjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/stress/regexp-search.js (203392 => 203393)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/stress/regexp-search.js        2016-07-19 02:02:37 UTC (rev 203392)
+++ trunk/Source/JavaScriptCore/tests/stress/regexp-search.js        2016-07-19 02:45:35 UTC (rev 203393)
</span><span class="lines">@@ -25,11 +25,11 @@
</span><span class="cx"> 
</span><span class="cx"> shouldThrow(function () {
</span><span class="cx">     String.prototype.search.call(null, /Cocoa/);
</span><del>-}, &quot;TypeError: String.prototype.search requires that |this| not be null&quot;);
</del><ins>+}, &quot;TypeError: String.prototype.search requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldThrow(function () {
</span><span class="cx">     String.prototype.search.call(undefined, /Cocoa/);
</span><del>-}, &quot;TypeError: String.prototype.search requires that |this| not be undefined&quot;);
</del><ins>+}, &quot;TypeError: String.prototype.search requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx"> shouldThrow(function () {
</span><span class="cx">     string.search(errorKey);
</span></span></pre>
</div>
</div>

</body>
</html>