<!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>[197106] releases/WebKitGTK/webkit-2.12</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/197106">197106</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-02-25 06:15:46 -0800 (Thu, 25 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/196986">r196986</a> - Debug assertion failure while loading http://kangax.github.io/compat-table/es6/.
https://bugs.webkit.org/show_bug.cgi?id=154542

Reviewed by Saam Barati.

Source/JavaScriptCore:

According to the spec, the constructors of the following types &quot;are not intended
to be called as a function and will throw an exception&quot;.  These types are:
    TypedArrays - https://tc39.github.io/ecma262/#sec-typedarray-constructors
    Map - https://tc39.github.io/ecma262/#sec-map-constructor
    Set - https://tc39.github.io/ecma262/#sec-set-constructor
    WeakMap - https://tc39.github.io/ecma262/#sec-weakmap-constructor
    WeakSet - https://tc39.github.io/ecma262/#sec-weakset-constructor
    ArrayBuffer - https://tc39.github.io/ecma262/#sec-arraybuffer-constructor
    DataView - https://tc39.github.io/ecma262/#sec-dataview-constructor
    Promise - https://tc39.github.io/ecma262/#sec-promise-constructor
    Proxy - https://tc39.github.io/ecma262/#sec-proxy-constructor

This patch does the foillowing:
1. Ensures that these constructors can be called but will throw a TypeError
   when called.
2. Makes all these objects use throwConstructorCannotBeCalledAsFunctionTypeError()
   in their implementation to be consistent.
3. Change the error message to &quot;calling XXX constructor without new is invalid&quot;.
   This is clearer because the error is likely due to the user forgetting to use
   the new operator on these constructors.

* runtime/Error.h:
* runtime/Error.cpp:
(JSC::throwConstructorCannotBeCalledAsFunctionTypeError):
- Added a convenience function to throw the TypeError.

* runtime/JSArrayBufferConstructor.cpp:
(JSC::constructArrayBuffer):
(JSC::callArrayBuffer):
(JSC::JSArrayBufferConstructor::getCallData):
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::callGenericTypedArrayView):
(JSC::JSGenericTypedArrayViewConstructor&lt;ViewClass&gt;::getCallData):
* runtime/JSPromiseConstructor.cpp:
(JSC::callPromise):
* runtime/MapConstructor.cpp:
(JSC::callMap):
* runtime/ProxyConstructor.cpp:
(JSC::callProxy):
(JSC::ProxyConstructor::getCallData):
* runtime/SetConstructor.cpp:
(JSC::callSet):
* runtime/WeakMapConstructor.cpp:
(JSC::callWeakMap):
* runtime/WeakSetConstructor.cpp:
(JSC::callWeakSet):

* tests/es6.yaml:
- The typed_arrays_%TypedArray%[Symbol.species].js test now passes.

* tests/stress/call-non-calleable-constructors-as-function.js: Added.
(test):

* tests/stress/map-constructor.js:
(testCallTypeError):
* tests/stress/promise-cannot-be-called.js:
(shouldThrow):
* tests/stress/proxy-basic.js:
* tests/stress/set-constructor.js:
* tests/stress/throw-from-ftl-call-ic-slow-path-cells.js:
(i.catch):
* tests/stress/throw-from-ftl-call-ic-slow-path-undefined.js:
(i.catch):
* tests/stress/throw-from-ftl-call-ic-slow-path.js:
(i.catch):
* tests/stress/weak-map-constructor.js:
(testCallTypeError):
* tests/stress/weak-set-constructor.js:
- Updated error message string.

LayoutTests:

* js/Promise-types-expected.txt:
* js/basic-map-expected.txt:
* js/basic-set-expected.txt:
* js/dom/basic-weakmap-expected.txt:
* js/dom/basic-weakset-expected.txt:
* js/script-tests/Promise-types.js:
* js/typedarray-constructors-expected.txt:
- Updated error message string.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsjsPromisetypesexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/js/Promise-types-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsjsbasicmapexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/js/basic-map-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsjsbasicsetexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/js/basic-set-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsjsdombasicweakmapexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/js/dom/basic-weakmap-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsjsdombasicweaksetexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/js/dom/basic-weakset-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsjsscripttestsPromisetypesjs">releases/WebKitGTK/webkit-2.12/LayoutTests/js/script-tests/Promise-types.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212LayoutTestsjstypedarrayconstructorsexpectedtxt">releases/WebKitGTK/webkit-2.12/LayoutTests/js/typedarray-constructors-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreChangeLog">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeErrorcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/Error.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeErrorh">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/Error.h</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeJSArrayBufferConstructorcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeJSGenericTypedArrayViewConstructorInlinesh">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeJSPromiseConstructorcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeMapConstructorcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/MapConstructor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeProxyConstructorcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/ProxyConstructor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeSetConstructorcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/SetConstructor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeWeakMapConstructorcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeWeakSetConstructorcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestses6yaml">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/es6.yaml</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressmapconstructorjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/map-constructor.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstresspromisecannotbecalledjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/promise-cannot-be-called.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressproxybasicjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/proxy-basic.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstresssetconstructorjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/set-constructor.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressthrowfromftlcallicslowpathcellsjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-cells.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressthrowfromftlcallicslowpathundefinedjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-undefined.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressthrowfromftlcallicslowpathjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressweakmapconstructorjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/weak-map-constructor.js</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressweaksetconstructorjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/weak-set-constructor.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstresscallnoncalleableconstructorsasfunctionjs">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/call-non-calleable-constructors-as-function.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit212LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-02-23  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Debug assertion failure while loading http://kangax.github.io/compat-table/es6/.
+        https://bugs.webkit.org/show_bug.cgi?id=154542
+
+        Reviewed by Saam Barati.
+
+        * js/Promise-types-expected.txt:
+        * js/basic-map-expected.txt:
+        * js/basic-set-expected.txt:
+        * js/dom/basic-weakmap-expected.txt:
+        * js/dom/basic-weakset-expected.txt:
+        * js/script-tests/Promise-types.js:
+        * js/typedarray-constructors-expected.txt:
+        - Updated error message string.
+
</ins><span class="cx"> 2016-02-23  Nikos Andronikos  &lt;nikos.andronikos-webkit@cisra.canon.com.au&gt;
</span><span class="cx"> 
</span><span class="cx">         [SVG] Update SVG source to return string literals as ASCIILiteral and add test cases for case sensitivity
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsjsPromisetypesexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/js/Promise-types-expected.txt (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/js/Promise-types-expected.txt        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/js/Promise-types-expected.txt        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -16,25 +16,25 @@
</span><span class="cx"> PASS aPromise.catch is an instance of Function
</span><span class="cx"> PASS aPromise.catch.length is 1
</span><span class="cx"> aPromise2 = Promise(...)
</span><del>-PASS Promise(function(resolve, reject) { resolve(1); }) threw exception TypeError: Type error.
</del><ins>+PASS Promise(function(resolve, reject) { resolve(1); }) threw exception TypeError: calling Promise constructor without new is invalid.
</ins><span class="cx"> 
</span><span class="cx"> Promise constructor
</span><span class="cx"> 
</span><span class="cx"> PASS Promise.length is 1
</span><span class="cx"> PASS new Promise() threw exception TypeError: Promise constructor takes a function argument.
</span><del>-PASS Promise() threw exception TypeError: Type error.
</del><ins>+PASS Promise() threw exception TypeError: calling Promise constructor without new is invalid.
</ins><span class="cx"> PASS new Promise(1) threw exception TypeError: Promise constructor takes a function argument.
</span><span class="cx"> PASS new Promise('hello') threw exception TypeError: Promise constructor takes a function argument.
</span><span class="cx"> PASS new Promise([]) threw exception TypeError: Promise constructor takes a function argument.
</span><span class="cx"> PASS new Promise({}) threw exception TypeError: Promise constructor takes a function argument.
</span><span class="cx"> PASS new Promise(null) threw exception TypeError: Promise constructor takes a function argument.
</span><span class="cx"> PASS new Promise(undefined) threw exception TypeError: Promise constructor takes a function argument.
</span><del>-PASS Promise(1) threw exception TypeError: Type error.
-PASS Promise('hello') threw exception TypeError: Type error.
-PASS Promise([]) threw exception TypeError: Type error.
-PASS Promise({}) threw exception TypeError: Type error.
-PASS Promise(null) threw exception TypeError: Type error.
-PASS Promise(undefined) threw exception TypeError: Type error.
</del><ins>+PASS Promise(1) threw exception TypeError: calling Promise constructor without new is invalid.
+PASS Promise('hello') threw exception TypeError: calling Promise constructor without new is invalid.
+PASS Promise([]) threw exception TypeError: calling Promise constructor without new is invalid.
+PASS Promise({}) threw exception TypeError: calling Promise constructor without new is invalid.
+PASS Promise(null) threw exception TypeError: calling Promise constructor without new is invalid.
+PASS Promise(undefined) threw exception TypeError: calling Promise constructor without new is invalid.
</ins><span class="cx"> 
</span><span class="cx"> Promise statics
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsjsbasicmapexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/js/basic-map-expected.txt (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/js/basic-map-expected.txt        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/js/basic-map-expected.txt        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -10,14 +10,14 @@
</span><span class="cx"> PASS new Map(undefined) instanceof Map is true
</span><span class="cx"> PASS new Map(undefined, undefined) instanceof Map is true
</span><span class="cx"> PASS new Map(null, undefined) instanceof Map is true
</span><del>-PASS Map() threw exception TypeError: Map cannot be called as a function.
-PASS Map(1) threw exception TypeError: Map cannot be called as a function.
-PASS Map(true) threw exception TypeError: Map cannot be called as a function.
-PASS Map('String') threw exception TypeError: Map cannot be called as a function.
-PASS Map([]) threw exception TypeError: Map cannot be called as a function.
-PASS Map({}) threw exception TypeError: Map cannot be called as a function.
-PASS Map(undefined) threw exception TypeError: Map cannot be called as a function.
-PASS Map(null) threw exception TypeError: Map cannot be called as a function.
</del><ins>+PASS Map() threw exception TypeError: calling Map constructor without new is invalid.
+PASS Map(1) threw exception TypeError: calling Map constructor without new is invalid.
+PASS Map(true) threw exception TypeError: calling Map constructor without new is invalid.
+PASS Map('String') threw exception TypeError: calling Map constructor without new is invalid.
+PASS Map([]) threw exception TypeError: calling Map constructor without new is invalid.
+PASS Map({}) threw exception TypeError: calling Map constructor without new is invalid.
+PASS Map(undefined) threw exception TypeError: calling Map constructor without new is invalid.
+PASS Map(null) threw exception TypeError: calling Map constructor without new is invalid.
</ins><span class="cx"> PASS new Map(1) threw exception TypeError: Type error.
</span><span class="cx"> PASS new Map(true) threw exception TypeError: Type error.
</span><span class="cx"> PASS new Map([]) did not throw exception.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsjsbasicsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/js/basic-set-expected.txt (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/js/basic-set-expected.txt        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/js/basic-set-expected.txt        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -5,22 +5,22 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Set instanceof Set is false
</span><span class="cx"> PASS Set.prototype instanceof Set is false
</span><del>-PASS Set() instanceof Set threw exception TypeError: Set cannot be called as a function.
</del><ins>+PASS Set() instanceof Set threw exception TypeError: calling Set constructor without new is invalid.
</ins><span class="cx"> PASS new Set() instanceof Set is true
</span><del>-PASS Set(null) instanceof Set threw exception TypeError: Set cannot be called as a function.
-PASS Set(undefined) instanceof Set threw exception TypeError: Set cannot be called as a function.
-PASS Set(undefined, undefined) instanceof Set threw exception TypeError: Set cannot be called as a function.
-PASS Set(null, undefined) instanceof Set threw exception TypeError: Set cannot be called as a function.
</del><ins>+PASS Set(null) instanceof Set threw exception TypeError: calling Set constructor without new is invalid.
+PASS Set(undefined) instanceof Set threw exception TypeError: calling Set constructor without new is invalid.
+PASS Set(undefined, undefined) instanceof Set threw exception TypeError: calling Set constructor without new is invalid.
+PASS Set(null, undefined) instanceof Set threw exception TypeError: calling Set constructor without new is invalid.
</ins><span class="cx"> PASS new Set(null) instanceof Set is true
</span><span class="cx"> PASS new Set(undefined) instanceof Set is true
</span><span class="cx"> PASS new Set(undefined, undefined) instanceof Set is true
</span><span class="cx"> PASS new Set(null, undefined) instanceof Set is true
</span><del>-PASS Set(1) threw exception TypeError: Set cannot be called as a function.
-PASS Set(true) threw exception TypeError: Set cannot be called as a function.
-PASS Set([]) threw exception TypeError: Set cannot be called as a function.
-PASS Set({}) threw exception TypeError: Set cannot be called as a function.
-PASS Set(undefined, null) threw exception TypeError: Set cannot be called as a function.
-PASS Set(undefined, {}) threw exception TypeError: Set cannot be called as a function.
</del><ins>+PASS Set(1) threw exception TypeError: calling Set constructor without new is invalid.
+PASS Set(true) threw exception TypeError: calling Set constructor without new is invalid.
+PASS Set([]) threw exception TypeError: calling Set constructor without new is invalid.
+PASS Set({}) threw exception TypeError: calling Set constructor without new is invalid.
+PASS Set(undefined, null) threw exception TypeError: calling Set constructor without new is invalid.
+PASS Set(undefined, {}) threw exception TypeError: calling Set constructor without new is invalid.
</ins><span class="cx"> PASS new Set(1) threw exception TypeError: Type error.
</span><span class="cx"> PASS new Set(true) threw exception TypeError: Type error.
</span><span class="cx"> PASS new Set([]) did not throw exception.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsjsdombasicweakmapexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/js/dom/basic-weakmap-expected.txt (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/js/dom/basic-weakmap-expected.txt        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/js/dom/basic-weakmap-expected.txt        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> PASS WeakMap instanceof WeakMap is false
</span><span class="cx"> PASS WeakMap.prototype instanceof WeakMap is false
</span><span class="cx"> PASS new WeakMap() instanceof WeakMap is true
</span><del>-PASS WeakMap() threw exception TypeError: WeakMap cannot be called as a function.
</del><ins>+PASS WeakMap() threw exception TypeError: calling WeakMap constructor without new is invalid.
</ins><span class="cx"> PASS map.set(0, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap.
</span><span class="cx"> PASS map.set(0.5, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap.
</span><span class="cx"> PASS map.set('foo', 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsjsdombasicweaksetexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/js/dom/basic-weakset-expected.txt (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/js/dom/basic-weakset-expected.txt        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/js/dom/basic-weakset-expected.txt        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> PASS WeakSet instanceof WeakSet is false
</span><span class="cx"> PASS WeakSet.prototype instanceof WeakSet is false
</span><span class="cx"> PASS new WeakSet() instanceof WeakSet is true
</span><del>-PASS WeakSet() threw exception TypeError: WeakSet cannot be called as a function.
</del><ins>+PASS WeakSet() threw exception TypeError: calling WeakSet constructor without new is invalid.
</ins><span class="cx"> PASS set.add(0) threw exception TypeError: Attempted to add a non-object key to a WeakSet.
</span><span class="cx"> PASS set.add(0.5) threw exception TypeError: Attempted to add a non-object key to a WeakSet.
</span><span class="cx"> PASS set.add('foo') threw exception TypeError: Attempted to add a non-object key to a WeakSet.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsjsscripttestsPromisetypesjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/js/script-tests/Promise-types.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/js/script-tests/Promise-types.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/js/script-tests/Promise-types.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -41,12 +41,12 @@
</span><span class="cx"> shouldThrow(&quot;new Promise(null)&quot;, &quot;'TypeError: Promise constructor takes a function argument'&quot;);
</span><span class="cx"> shouldThrow(&quot;new Promise(undefined)&quot;, &quot;'TypeError: Promise constructor takes a function argument'&quot;);
</span><span class="cx"> 
</span><del>-shouldThrow(&quot;Promise(1)&quot;, &quot;'TypeError: Type error'&quot;);
-shouldThrow(&quot;Promise('hello')&quot;, &quot;'TypeError: Type error'&quot;);
-shouldThrow(&quot;Promise([])&quot;, &quot;'TypeError: Type error'&quot;);
-shouldThrow(&quot;Promise({})&quot;, &quot;'TypeError: Type error'&quot;);
-shouldThrow(&quot;Promise(null)&quot;, &quot;'TypeError: Type error'&quot;);
-shouldThrow(&quot;Promise(undefined)&quot;, &quot;'TypeError: Type error'&quot;);
</del><ins>+shouldThrow(&quot;Promise(1)&quot;, &quot;'TypeError: calling Promise constructor without new is invalid'&quot;);
+shouldThrow(&quot;Promise('hello')&quot;, &quot;'TypeError: calling Promise constructor without new is invalid'&quot;);
+shouldThrow(&quot;Promise([])&quot;, &quot;'TypeError: calling Promise constructor without new is invalid'&quot;);
+shouldThrow(&quot;Promise({})&quot;, &quot;'TypeError: calling Promise constructor without new is invalid'&quot;);
+shouldThrow(&quot;Promise(null)&quot;, &quot;'TypeError: calling Promise constructor without new is invalid'&quot;);
+shouldThrow(&quot;Promise(undefined)&quot;, &quot;'TypeError: calling Promise constructor without new is invalid'&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // Promise statics
</span><span class="cx"> debug(&quot;&quot;);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212LayoutTestsjstypedarrayconstructorsexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/js/typedarray-constructors-expected.txt (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/LayoutTests/js/typedarray-constructors-expected.txt        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/js/typedarray-constructors-expected.txt        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -3,25 +3,25 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS Int8Array() threw exception TypeError: Int8Array is not a function. (In 'Int8Array()', 'Int8Array' is an instance of Function).
</del><ins>+PASS Int8Array() threw exception TypeError: calling Int8Array constructor without new is invalid.
</ins><span class="cx"> PASS new Int8Array() did not throw exception.
</span><del>-PASS Int16Array() threw exception TypeError: Int16Array is not a function. (In 'Int16Array()', 'Int16Array' is an instance of Function).
</del><ins>+PASS Int16Array() threw exception TypeError: calling Int16Array constructor without new is invalid.
</ins><span class="cx"> PASS new Int16Array() did not throw exception.
</span><del>-PASS Int32Array() threw exception TypeError: Int32Array is not a function. (In 'Int32Array()', 'Int32Array' is an instance of Function).
</del><ins>+PASS Int32Array() threw exception TypeError: calling Int32Array constructor without new is invalid.
</ins><span class="cx"> PASS new Int32Array() did not throw exception.
</span><del>-PASS Uint8Array() threw exception TypeError: Uint8Array is not a function. (In 'Uint8Array()', 'Uint8Array' is an instance of Function).
</del><ins>+PASS Uint8Array() threw exception TypeError: calling Uint8Array constructor without new is invalid.
</ins><span class="cx"> PASS new Uint8Array() did not throw exception.
</span><del>-PASS Uint16Array() threw exception TypeError: Uint16Array is not a function. (In 'Uint16Array()', 'Uint16Array' is an instance of Function).
</del><ins>+PASS Uint16Array() threw exception TypeError: calling Uint16Array constructor without new is invalid.
</ins><span class="cx"> PASS new Uint16Array() did not throw exception.
</span><del>-PASS Uint32Array() threw exception TypeError: Uint32Array is not a function. (In 'Uint32Array()', 'Uint32Array' is an instance of Function).
</del><ins>+PASS Uint32Array() threw exception TypeError: calling Uint32Array constructor without new is invalid.
</ins><span class="cx"> PASS new Uint32Array() did not throw exception.
</span><del>-PASS Uint8ClampedArray() threw exception TypeError: Uint8ClampedArray is not a function. (In 'Uint8ClampedArray()', 'Uint8ClampedArray' is an instance of Function).
</del><ins>+PASS Uint8ClampedArray() threw exception TypeError: calling Uint8ClampedArray constructor without new is invalid.
</ins><span class="cx"> PASS new Uint8ClampedArray() did not throw exception.
</span><del>-PASS Float32Array() threw exception TypeError: Float32Array is not a function. (In 'Float32Array()', 'Float32Array' is an instance of Function).
</del><ins>+PASS Float32Array() threw exception TypeError: calling Float32Array constructor without new is invalid.
</ins><span class="cx"> PASS new Float32Array() did not throw exception.
</span><del>-PASS Float64Array() threw exception TypeError: Float64Array is not a function. (In 'Float64Array()', 'Float64Array' is an instance of Function).
</del><ins>+PASS Float64Array() threw exception TypeError: calling Float64Array constructor without new is invalid.
</ins><span class="cx"> PASS new Float64Array() did not throw exception.
</span><del>-PASS DataView(new ArrayBuffer()) threw exception TypeError: DataView is not a function. (In 'DataView(new ArrayBuffer())', 'DataView' is an instance of Function).
</del><ins>+PASS DataView(new ArrayBuffer()) threw exception TypeError: calling DataView constructor without new is invalid.
</ins><span class="cx"> PASS new DataView(new ArrayBuffer()) did not throw exception.
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -1,3 +1,80 @@
</span><ins>+2016-02-23  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Debug assertion failure while loading http://kangax.github.io/compat-table/es6/.
+        https://bugs.webkit.org/show_bug.cgi?id=154542
+
+        Reviewed by Saam Barati.
+
+        According to the spec, the constructors of the following types &quot;are not intended
+        to be called as a function and will throw an exception&quot;.  These types are:
+            TypedArrays - https://tc39.github.io/ecma262/#sec-typedarray-constructors
+            Map - https://tc39.github.io/ecma262/#sec-map-constructor
+            Set - https://tc39.github.io/ecma262/#sec-set-constructor
+            WeakMap - https://tc39.github.io/ecma262/#sec-weakmap-constructor
+            WeakSet - https://tc39.github.io/ecma262/#sec-weakset-constructor
+            ArrayBuffer - https://tc39.github.io/ecma262/#sec-arraybuffer-constructor
+            DataView - https://tc39.github.io/ecma262/#sec-dataview-constructor
+            Promise - https://tc39.github.io/ecma262/#sec-promise-constructor
+            Proxy - https://tc39.github.io/ecma262/#sec-proxy-constructor
+
+        This patch does the foillowing:
+        1. Ensures that these constructors can be called but will throw a TypeError
+           when called.
+        2. Makes all these objects use throwConstructorCannotBeCalledAsFunctionTypeError()
+           in their implementation to be consistent.
+        3. Change the error message to &quot;calling XXX constructor without new is invalid&quot;.
+           This is clearer because the error is likely due to the user forgetting to use
+           the new operator on these constructors.
+
+        * runtime/Error.h:
+        * runtime/Error.cpp:
+        (JSC::throwConstructorCannotBeCalledAsFunctionTypeError):
+        - Added a convenience function to throw the TypeError.
+
+        * runtime/JSArrayBufferConstructor.cpp:
+        (JSC::constructArrayBuffer):
+        (JSC::callArrayBuffer):
+        (JSC::JSArrayBufferConstructor::getCallData):
+        * runtime/JSGenericTypedArrayViewConstructorInlines.h:
+        (JSC::callGenericTypedArrayView):
+        (JSC::JSGenericTypedArrayViewConstructor&lt;ViewClass&gt;::getCallData):
+        * runtime/JSPromiseConstructor.cpp:
+        (JSC::callPromise):
+        * runtime/MapConstructor.cpp:
+        (JSC::callMap):
+        * runtime/ProxyConstructor.cpp:
+        (JSC::callProxy):
+        (JSC::ProxyConstructor::getCallData):
+        * runtime/SetConstructor.cpp:
+        (JSC::callSet):
+        * runtime/WeakMapConstructor.cpp:
+        (JSC::callWeakMap):
+        * runtime/WeakSetConstructor.cpp:
+        (JSC::callWeakSet):
+
+        * tests/es6.yaml:
+        - The typed_arrays_%TypedArray%[Symbol.species].js test now passes.
+
+        * tests/stress/call-non-calleable-constructors-as-function.js: Added.
+        (test):
+
+        * tests/stress/map-constructor.js:
+        (testCallTypeError):
+        * tests/stress/promise-cannot-be-called.js:
+        (shouldThrow):
+        * tests/stress/proxy-basic.js:
+        * tests/stress/set-constructor.js:
+        * tests/stress/throw-from-ftl-call-ic-slow-path-cells.js:
+        (i.catch):
+        * tests/stress/throw-from-ftl-call-ic-slow-path-undefined.js:
+        (i.catch):
+        * tests/stress/throw-from-ftl-call-ic-slow-path.js:
+        (i.catch):
+        * tests/stress/weak-map-constructor.js:
+        (testCallTypeError):
+        * tests/stress/weak-set-constructor.js:
+        - Updated error message string.
+
</ins><span class="cx"> 2016-02-22  Saam barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         JSGlobalObject doesn't visit ProxyObjectStructure during GC
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeErrorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/Error.cpp (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/Error.cpp        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/Error.cpp        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -209,6 +209,11 @@
</span><span class="cx">         || error-&gt;hasProperty(exec, Identifier::fromString(exec, sourceURLPropertyName));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSObject* throwConstructorCannotBeCalledAsFunctionTypeError(ExecState* exec, const char* constructorName)
+{
+    return exec-&gt;vm().throwException(exec, createTypeError(exec, makeString(&quot;calling &quot;, constructorName, &quot; constructor without new is invalid&quot;)));
+}
+
</ins><span class="cx"> JSObject* throwTypeError(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     return exec-&gt;vm().throwException(exec, createTypeError(exec));
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeErrorh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/Error.h (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/Error.h        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/Error.h        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx"> // Methods to throw Errors.
</span><span class="cx"> 
</span><span class="cx"> // Convenience wrappers, create an throw an exception with a default message.
</span><ins>+JS_EXPORT_PRIVATE JSObject* throwConstructorCannotBeCalledAsFunctionTypeError(ExecState*, const char* constructorName);
</ins><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*);
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwSyntaxError(ExecState*);
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwSyntaxError(ExecState*, const String&amp; errorMessage);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeJSArrayBufferConstructorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -102,6 +102,11 @@
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static EncodedJSValue JSC_HOST_CALL callArrayBuffer(ExecState* exec)
+{
+    return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, &quot;ArrayBuffer&quot;));
+}
+
</ins><span class="cx"> ConstructType JSArrayBufferConstructor::getConstructData(
</span><span class="cx">     JSCell*, ConstructData&amp; constructData)
</span><span class="cx"> {
</span><span class="lines">@@ -111,7 +116,7 @@
</span><span class="cx"> 
</span><span class="cx"> CallType JSArrayBufferConstructor::getCallData(JSCell*, CallData&amp; callData)
</span><span class="cx"> {
</span><del>-    callData.native.function = constructArrayBuffer;
</del><ins>+    callData.native.function = callArrayBuffer;
</ins><span class="cx">     return CallTypeHost;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeJSGenericTypedArrayViewConstructorInlinesh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -256,10 +256,16 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename ViewClass&gt;
</span><ins>+static EncodedJSValue JSC_HOST_CALL callGenericTypedArrayView(ExecState* exec)
+{
+    return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, ViewClass::info()-&gt;className));
+}
+
+template&lt;typename ViewClass&gt;
</ins><span class="cx"> CallType JSGenericTypedArrayViewConstructor&lt;ViewClass&gt;::getCallData(JSCell*, CallData&amp; callData)
</span><span class="cx"> {
</span><del>-    callData.native.function = constructGenericTypedArrayView&lt;ViewClass&gt;;
-    return CallTypeNone;
</del><ins>+    callData.native.function = callGenericTypedArrayView&lt;ViewClass&gt;;
+    return CallTypeHost;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeJSPromiseConstructorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL callPromise(ExecState* exec)
</span><span class="cx"> {
</span><del>-    return throwVMTypeError(exec);
</del><ins>+    return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, &quot;Promise&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ConstructType JSPromiseConstructor::getConstructData(JSCell*, ConstructData&amp; constructData)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeMapConstructorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/MapConstructor.cpp (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/MapConstructor.cpp        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/MapConstructor.cpp        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL callMap(ExecState* exec)
</span><span class="cx"> {
</span><del>-    return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;Map cannot be called as a function&quot;)));
</del><ins>+    return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, &quot;Map&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL constructMap(ExecState* exec)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeProxyConstructorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/ProxyConstructor.cpp (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/ProxyConstructor.cpp        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/ProxyConstructor.cpp        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -75,13 +75,15 @@
</span><span class="cx">     return ConstructTypeHost;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static EncodedJSValue JSC_HOST_CALL callProxy(ExecState* exec)
+{
+    return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, &quot;Proxy&quot;));
+}
+
</ins><span class="cx"> CallType ProxyConstructor::getCallData(JSCell*, CallData&amp; callData)
</span><span class="cx"> {
</span><del>-    // Proxy should throw a TypeError when called as a function.
-    callData.js.functionExecutable = 0;
-    callData.js.scope = 0;
-    callData.native.function = 0;
-    return CallTypeNone;
</del><ins>+    callData.native.function = callProxy;
+    return CallTypeHost;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeSetConstructorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/SetConstructor.cpp (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/SetConstructor.cpp        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/SetConstructor.cpp        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL callSet(ExecState* exec)
</span><span class="cx"> {
</span><del>-    return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;Set cannot be called as a function&quot;)));
</del><ins>+    return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, &quot;Set&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL constructSet(ExecState* exec)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeWeakMapConstructorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL callWeakMap(ExecState* exec)
</span><span class="cx"> {
</span><del>-    return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;WeakMap cannot be called as a function&quot;)));
</del><ins>+    return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, &quot;WeakMap&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL constructWeakMap(ExecState* exec)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreruntimeWeakSetConstructorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL callWeakSet(ExecState* exec)
</span><span class="cx"> {
</span><del>-    return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;WeakSet cannot be called as a function&quot;)));
</del><ins>+    return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, &quot;WeakSet&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL constructWeakSet(ExecState* exec)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestses6yaml"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/es6.yaml (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/es6.yaml        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/es6.yaml        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -1175,7 +1175,7 @@
</span><span class="cx"> - path: es6/typed_arrays_%TypedArray%.prototype[Symbol.iterator].js
</span><span class="cx">   cmd: runES6 :normal
</span><span class="cx"> - path: es6/typed_arrays_%TypedArray%[Symbol.species].js
</span><del>-  cmd: runES6 :fail
</del><ins>+  cmd: runES6 :normal
</ins><span class="cx"> - path: es6/typed_arrays_ArrayBuffer[Symbol.species].js
</span><span class="cx">   cmd: runES6 :normal
</span><span class="cx"> - path: es6/typed_arrays_correct_prototype_chains.js
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstresscallnoncalleableconstructorsasfunctionjs"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/call-non-calleable-constructors-as-function.js (0 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/call-non-calleable-constructors-as-function.js                                (rev 0)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/call-non-calleable-constructors-as-function.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+var errors = &quot;&quot;;
+var numTests = 0;
+
+function test(type) {
+    var didThrow = false;
+    try {
+        var bad = type(10);
+    } catch(e) {
+        didThrow = true;
+    }
+
+    if (!didThrow) {
+        errors += (&quot;bad result: calling &quot; + type.name + &quot; as a function did not throw\n&quot;);
+    }
+    numTests++;
+
+    if (typeof type !== &quot;function&quot;)
+        errors += (&quot;bad result: typeof &quot; + type.name + &quot; is not function. Was &quot; + (typeof type) + &quot;\n&quot;);
+    numTests++;
+}
+
+// According to the spec, the constructors of the following types &quot;are not intended to be
+// called as a function and will throw an exception&quot;. However, as constructors, their
+// type should be &quot;function&quot;. 
+
+// https://tc39.github.io/ecma262/#sec-typedarray-constructors
+test(Int8Array);
+test(Uint8Array);
+test(Uint8ClampedArray);
+test(Int16Array);
+test(Uint16Array);
+test(Int32Array);
+test(Uint32Array);
+test(Float32Array);
+test(Float64Array);
+
+// https://tc39.github.io/ecma262/#sec-map-constructor
+test(Map);
+// https://tc39.github.io/ecma262/#sec-set-constructor
+test(Set);
+// https://tc39.github.io/ecma262/#sec-weakmap-constructor
+test(WeakMap);
+// https://tc39.github.io/ecma262/#sec-weakset-constructor
+test(WeakSet);
+// https://tc39.github.io/ecma262/#sec-arraybuffer-constructor
+test(ArrayBuffer);
+// https://tc39.github.io/ecma262/#sec-dataview-constructor
+test(DataView);
+// https://tc39.github.io/ecma262/#sec-promise-constructor
+test(Promise);
+// https://tc39.github.io/ecma262/#sec-proxy-constructor
+test(Proxy);
+
+let expectedNumTests = 34;
+if (numTests != expectedNumTests) {
+    errors += &quot;Not all tests were run: ran &quot; + numTests + &quot; out of &quot; + expectedNumTests + &quot; \n&quot;;
+}
+if (errors.length)
+    throw new Error(errors);
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressmapconstructorjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/map-constructor.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/map-constructor.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/map-constructor.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">     }
</span><span class="cx">     if (!error)
</span><span class="cx">         throw &quot;Error: error not thrown&quot;;
</span><del>-    if (String(error) !== &quot;TypeError: Map cannot be called as a function&quot;)
</del><ins>+    if (String(error) !== &quot;TypeError: calling Map constructor without new is invalid&quot;)
</ins><span class="cx">         throw &quot;Error: bad error &quot; + String(error);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstresspromisecannotbecalledjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/promise-cannot-be-called.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/promise-cannot-be-called.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/promise-cannot-be-called.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> var executorCalled = false;
</span><span class="cx"> shouldThrow(() =&gt; {
</span><span class="cx">     Promise(function (resolve, reject) { executorCalled = true; });
</span><del>-}, `TypeError: Type error`);
</del><ins>+}, `TypeError: calling Promise constructor without new is invalid`);
</ins><span class="cx"> shouldBe(executorCalled, false);
</span><span class="cx"> 
</span><span class="cx"> // But should accept inheriting Promise.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressproxybasicjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/proxy-basic.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/proxy-basic.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/proxy-basic.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">             Proxy({}, {});
</span><span class="cx">         } catch(e) {
</span><span class="cx">             threw = true;
</span><del>-            assert(e.toString() === &quot;TypeError: Proxy is not a function. (In 'Proxy({}, {})', 'Proxy' is an instance of Function)&quot;);
</del><ins>+            assert(e.toString() === &quot;TypeError: calling Proxy constructor without new is invalid&quot;);
</ins><span class="cx">         }
</span><span class="cx">         assert(threw === true);
</span><span class="cx">     }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstresssetconstructorjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/set-constructor.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/set-constructor.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/set-constructor.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">     }
</span><span class="cx">     if (!error)
</span><span class="cx">         throw &quot;Error: error not thrown&quot;;
</span><del>-    if (String(error) !== &quot;TypeError: Set cannot be called as a function&quot;)
</del><ins>+    if (String(error) !== &quot;TypeError: calling Set constructor without new is invalid&quot;)
</ins><span class="cx">         throw &quot;Error: bad error &quot; + String(error);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressthrowfromftlcallicslowpathcellsjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-cells.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-cells.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-cells.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     try {
</span><span class="cx">         ftlFunction(array, Int8Array);
</span><span class="cx">     } catch (e) {
</span><del>-        if (e.message.indexOf(&quot;not a function&quot;) &lt; 0)
</del><ins>+        if (e.message.indexOf(&quot;constructor without new is invalid&quot;) &lt; 0)
</ins><span class="cx">             throw &quot;Error: bad exception message: &quot; + e.message;
</span><span class="cx">         var result = notACell.f;
</span><span class="cx">         if (result !== void 0) {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressthrowfromftlcallicslowpathundefinedjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-undefined.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-undefined.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-undefined.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     try {
</span><span class="cx">         ftlFunction(array, Int8Array);
</span><span class="cx">     } catch (e) {
</span><del>-        if (e.message.indexOf(&quot;not a function&quot;) &lt; 0)
</del><ins>+        if (e.message.indexOf(&quot;constructor without new is invalid&quot;) &lt; 0)
</ins><span class="cx">             throw &quot;Error: bad exception message: &quot; + e.message;
</span><span class="cx">         var result = notACell.f;
</span><span class="cx">         if (result !== void 0) {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressthrowfromftlcallicslowpathjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     try {
</span><span class="cx">         ftlFunction(array, Int8Array);
</span><span class="cx">     } catch (e) {
</span><del>-        if (e.message.indexOf(&quot;not a function&quot;) &lt; 0)
</del><ins>+        if (e.message.indexOf(&quot;constructor without new is invalid&quot;) &lt; 0)
</ins><span class="cx">             throw &quot;Error: bad exception message: &quot; + e.message;
</span><span class="cx">         var result = notACell.f;
</span><span class="cx">         if (result !== void 0) {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressweakmapconstructorjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/weak-map-constructor.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/weak-map-constructor.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/weak-map-constructor.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">     }
</span><span class="cx">     if (!error)
</span><span class="cx">         throw &quot;Error: error not thrown&quot;;
</span><del>-    if (String(error) !== &quot;TypeError: WeakMap cannot be called as a function&quot;)
</del><ins>+    if (String(error) !== &quot;TypeError: calling WeakMap constructor without new is invalid&quot;)
</ins><span class="cx">         throw &quot;Error: bad error &quot; + String(error);
</span><span class="cx"> }
</span><span class="cx"> var obj1 = {};
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoretestsstressweaksetconstructorjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/weak-set-constructor.js (197105 => 197106)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/weak-set-constructor.js        2016-02-25 13:56:57 UTC (rev 197105)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/tests/stress/weak-set-constructor.js        2016-02-25 14:15:46 UTC (rev 197106)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">     }
</span><span class="cx">     if (!error)
</span><span class="cx">         throw new Error(&quot;error not thrown&quot;);
</span><del>-    if (String(error) !== &quot;TypeError: WeakSet cannot be called as a function&quot;)
</del><ins>+    if (String(error) !== &quot;TypeError: calling WeakSet constructor without new is invalid&quot;)
</ins><span class="cx">         throw new Error(&quot;bad error &quot; + String(error));
</span><span class="cx"> }
</span><span class="cx"> var obj1 = {};
</span></span></pre>
</div>
</div>

</body>
</html>