<!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>[198469] 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/198469">198469</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2016-03-19 11:13:42 -0700 (Sat, 19 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>ES6 spec requires that ErrorPrototype not be an Error object.
https://bugs.webkit.org/show_bug.cgi?id=155680

Reviewed by Michael Saboff.

Source/JavaScriptCore:

The ES6 spec states that Error.prototype should not be an instance of Error:
https://tc39.github.io/ecma262/#sec-properties-of-the-error-prototype-object

&quot;The Error prototype object is an ordinary object. It is not an Error instance
and does not have an [[ErrorData]] internal slot.&quot;

This patch changes ErrorPrototype to conform to the above specification.

* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::finishCreation):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
(JSC::ErrorPrototype::finishCreation):
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/ErrorPrototype.h:
(JSC::ErrorPrototype::create):

* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::finishCreation):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
(JSC::NativeErrorPrototype::finishCreation):
* runtime/NativeErrorPrototype.h:
(JSC::NativeErrorPrototype::create):
- updated to no longer need a JSGlobalObject argument.

* tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js:
- updated to match the kangax version of this test.

LayoutTests:

Updated the appropriate tests to expect the toString() value of Error.prototype
to now be &quot;[object Object]&quot; instead of &quot;[object Error]&quot;.  Also rebased the test
results accordingly.

* fast/dom/DOMException/prototype-object-expected.txt:
* fast/dom/DOMException/prototype-object.html:
* js/dom/native-error-prototype-expected.txt:
* js/dom/script-tests/native-error-prototype.js:
* sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.4/S15.11.4_A2.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMExceptionprototypeobjectexpectedtxt">trunk/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMExceptionprototypeobjecthtml">trunk/LayoutTests/fast/dom/DOMException/prototype-object.html</a></li>
<li><a href="#trunkLayoutTestsjsdomnativeerrorprototypeexpectedtxt">trunk/LayoutTests/js/dom/native-error-prototype-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomscripttestsnativeerrorprototypejs">trunk/LayoutTests/js/dom/script-tests/native-error-prototype.js</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1511_Error15114S15114_A2html">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.4/S15.11.4_A2.html</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeErrorConstructorcpp">trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeErrorPrototypecpp">trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeErrorPrototypeh">trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeNativeErrorConstructorcpp">trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeNativeErrorPrototypecpp">trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeNativeErrorPrototypeh">trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h</a></li>
<li><a href="#trunkSourceJavaScriptCoretestses6miscellaneous_builtin_prototypes_are_not_instancesjs">trunk/Source/JavaScriptCore/tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/LayoutTests/ChangeLog        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-03-19  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        ES6 spec requires that ErrorPrototype not be an Error object.
+        https://bugs.webkit.org/show_bug.cgi?id=155680
+
+        Reviewed by Michael Saboff.
+
+        Updated the appropriate tests to expect the toString() value of Error.prototype
+        to now be &quot;[object Object]&quot; instead of &quot;[object Error]&quot;.  Also rebased the test
+        results accordingly.
+
+        * fast/dom/DOMException/prototype-object-expected.txt:
+        * fast/dom/DOMException/prototype-object.html:
+        * js/dom/native-error-prototype-expected.txt:
+        * js/dom/script-tests/native-error-prototype.js:
+        * sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.4/S15.11.4_A2.html:
+
</ins><span class="cx"> 2016-03-18  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update AutoFill button in input fields
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMExceptionprototypeobjectexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> PASS e.toString() is &quot;Error: HierarchyRequestError: DOM Exception 3&quot;
</span><span class="cx"> PASS Object.prototype.toString.call(e) is &quot;[object DOMException]&quot;
</span><span class="cx"> PASS Object.prototype.toString.call(e.__proto__) is &quot;[object DOMExceptionPrototype]&quot;
</span><del>-PASS Object.prototype.toString.call(e.__proto__.__proto__) is &quot;[object Error]&quot;
</del><ins>+PASS Object.prototype.toString.call(e.__proto__.__proto__) is &quot;[object Object]&quot;
</ins><span class="cx"> PASS e.constructor.toString() is &quot;function DOMException() {\n    [native code]\n}&quot;
</span><span class="cx"> PASS e instanceof DOMException is true
</span><span class="cx"> PASS e instanceof Error is true
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMExceptionprototypeobjecthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMException/prototype-object.html (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMException/prototype-object.html        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/LayoutTests/fast/dom/DOMException/prototype-object.html        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> shouldBeEqualToString(&quot;e.toString()&quot;, &quot;Error: HierarchyRequestError: DOM Exception 3&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;Object.prototype.toString.call(e)&quot;, &quot;[object DOMException]&quot;);
</span><span class="cx"> shouldBeEqualToString(&quot;Object.prototype.toString.call(e.__proto__)&quot;, &quot;[object DOMExceptionPrototype]&quot;);
</span><del>-shouldBeEqualToString(&quot;Object.prototype.toString.call(e.__proto__.__proto__)&quot;, &quot;[object Error]&quot;);
</del><ins>+shouldBeEqualToString(&quot;Object.prototype.toString.call(e.__proto__.__proto__)&quot;, &quot;[object Object]&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;e.constructor.toString()&quot;, &quot;function DOMException() {\n    [native code]\n}&quot;);
</span><span class="cx"> shouldBeTrue(&quot;e instanceof DOMException&quot;);
</span><span class="cx"> shouldBeTrue(&quot;e instanceof Error&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomnativeerrorprototypeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/native-error-prototype-expected.txt (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/native-error-prototype-expected.txt        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/LayoutTests/js/dom/native-error-prototype-expected.txt        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -3,8 +3,8 @@
</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 ({}).toString.call(Error.prototype) is &quot;[object Error]&quot;
-PASS ({}).toString.call(RangeError.prototype) is &quot;[object Error]&quot;
</del><ins>+PASS ({}).toString.call(Error.prototype) is &quot;[object Object]&quot;
+PASS ({}).toString.call(RangeError.prototype) is &quot;[object Object]&quot;
</ins><span class="cx"> PASS err.toString() is &quot;message&quot;
</span><span class="cx"> PASS err.hasOwnProperty('message') is false
</span><span class="cx"> PASS err.hasOwnProperty('message') is false
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomscripttestsnativeerrorprototypejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/script-tests/native-error-prototype.js (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/script-tests/native-error-prototype.js        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/LayoutTests/js/dom/script-tests/native-error-prototype.js        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -2,8 +2,8 @@
</span><span class="cx"> 'This is a test case for bugs &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=55346&quot;&gt;55346&lt;/a&gt;, &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=70889&quot;&gt;70889&lt;/a&gt;, and &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=75452&quot;&gt;75452&lt;/a&gt;.'
</span><span class="cx"> );
</span><span class="cx"> 
</span><del>-shouldBe(&quot;({}).toString.call(Error.prototype)&quot;, '&quot;[object Error]&quot;');
-shouldBe(&quot;({}).toString.call(RangeError.prototype)&quot;, '&quot;[object Error]&quot;');
</del><ins>+shouldBe(&quot;({}).toString.call(Error.prototype)&quot;, '&quot;[object Object]&quot;');
+shouldBe(&quot;({}).toString.call(RangeError.prototype)&quot;, '&quot;[object Object]&quot;');
</ins><span class="cx"> 
</span><span class="cx"> var err = new Error(&quot;message&quot;);
</span><span class="cx"> err.name = &quot;&quot;;
</span></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1511_Error15114S15114_A2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.4/S15.11.4_A2.html (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.4/S15.11.4_A2.html        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.4/S15.11.4_A2.html        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -77,8 +77,8 @@
</span><span class="cx"> 
</span><span class="cx"> //////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> //CHECK#1
</span><del>-if (__tostr !== &quot;[object Error]&quot;) {
-        testFailed('#1: Error.prototype.toString=Object.prototype.toString; __tostr = Error.prototype.toString(); __tostr === &quot;[object Error]&quot;. Actual: '+__tostr );
</del><ins>+if (__tostr !== &quot;[object Object]&quot;) {
+        testFailed('#1: Error.prototype.toString=Object.prototype.toString; __tostr = Error.prototype.toString(); __tostr === &quot;[object Object]&quot;. Actual: '+__tostr );
</ins><span class="cx"> }
</span><span class="cx"> //
</span><span class="cx"> //////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-03-19  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        ES6 spec requires that ErrorPrototype not be an Error object.
+        https://bugs.webkit.org/show_bug.cgi?id=155680
+
+        Reviewed by Michael Saboff.
+
+        The ES6 spec states that Error.prototype should not be an instance of Error:
+        https://tc39.github.io/ecma262/#sec-properties-of-the-error-prototype-object
+
+        &quot;The Error prototype object is an ordinary object. It is not an Error instance
+        and does not have an [[ErrorData]] internal slot.&quot;
+
+        This patch changes ErrorPrototype to conform to the above specification.
+
+        * runtime/ErrorConstructor.cpp:
+        (JSC::ErrorConstructor::finishCreation):
+        * runtime/ErrorPrototype.cpp:
+        (JSC::ErrorPrototype::ErrorPrototype):
+        (JSC::ErrorPrototype::finishCreation):
+        (JSC::ErrorPrototype::getOwnPropertySlot):
+        * runtime/ErrorPrototype.h:
+        (JSC::ErrorPrototype::create):
+
+        * runtime/NativeErrorConstructor.cpp:
+        (JSC::NativeErrorConstructor::finishCreation):
+        * runtime/NativeErrorPrototype.cpp:
+        (JSC::NativeErrorPrototype::NativeErrorPrototype):
+        (JSC::NativeErrorPrototype::finishCreation):
+        * runtime/NativeErrorPrototype.h:
+        (JSC::NativeErrorPrototype::create):
+        - updated to no longer need a JSGlobalObject argument.
+
+        * tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js:
+        - updated to match the kangax version of this test.
+
</ins><span class="cx"> 2016-03-18  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [JSC] Limit DFG's Validate symbols to its compilation unit
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeErrorConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ErrorConstructor::finishCreation(VM&amp; vm, ErrorPrototype* errorPrototype)
</span><span class="cx"> {
</span><del>-    Base::finishCreation(vm, errorPrototype-&gt;classInfo()-&gt;className);
</del><ins>+    Base::finishCreation(vm, ASCIILiteral(&quot;Error&quot;));
</ins><span class="cx">     // ECMA 15.11.3.1 Error.prototype
</span><span class="cx">     putDirectWithoutTransition(vm, vm.propertyNames-&gt;prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
</span><span class="cx">     putDirectWithoutTransition(vm, vm.propertyNames-&gt;length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeErrorPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
</span><del>- *  Copyright (C) 2003, 2008 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2003, 2008, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Lesser General Public
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-const ClassInfo ErrorPrototype::s_info = { &quot;Error&quot;, &amp;ErrorInstance::s_info, &amp;errorPrototypeTable, CREATE_METHOD_TABLE(ErrorPrototype) };
</del><ins>+const ClassInfo ErrorPrototype::s_info = { &quot;Object&quot;, &amp;Base::s_info, &amp;errorPrototypeTable, CREATE_METHOD_TABLE(ErrorPrototype) };
</ins><span class="cx"> 
</span><span class="cx"> /* Source for ErrorPrototype.lut.h
</span><span class="cx"> @begin errorPrototypeTable
</span><span class="lines">@@ -50,15 +50,16 @@
</span><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> ErrorPrototype::ErrorPrototype(VM&amp; vm, Structure* structure)
</span><del>-    : ErrorInstance(vm, structure)
</del><ins>+    : JSNonFinalObject(vm, structure)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ErrorPrototype::finishCreation(VM&amp; vm, JSGlobalObject* globalObject)
</del><ins>+void ErrorPrototype::finishCreation(VM&amp; vm)
</ins><span class="cx"> {
</span><del>-    Base::finishCreation(globalObject-&gt;globalExec(), vm, &quot;&quot;);
</del><ins>+    Base::finishCreation(vm);
</ins><span class="cx">     ASSERT(inherits(info()));
</span><span class="cx">     putDirect(vm, vm.propertyNames-&gt;name, jsNontrivialString(&amp;vm, String(ASCIILiteral(&quot;Error&quot;))), DontEnum);
</span><ins>+    putDirect(vm, vm.propertyNames-&gt;message, jsEmptyString(&amp;vm), DontEnum);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ErrorPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &amp;slot)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeErrorPrototypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
</span><del>- *  Copyright (C) 2008 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2008, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Lesser General Public
</span><span class="lines">@@ -21,21 +21,21 @@
</span><span class="cx"> #ifndef ErrorPrototype_h
</span><span class="cx"> #define ErrorPrototype_h
</span><span class="cx"> 
</span><del>-#include &quot;ErrorInstance.h&quot;
</del><ins>+#include &quot;JSObject.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="cx"> class ObjectPrototype;
</span><span class="cx"> 
</span><del>-class ErrorPrototype : public ErrorInstance {
</del><ins>+class ErrorPrototype : public JSNonFinalObject {
</ins><span class="cx"> public:
</span><del>-    typedef ErrorInstance Base;
</del><ins>+    typedef JSNonFinalObject Base;
</ins><span class="cx">     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
</span><span class="cx"> 
</span><del>-    static ErrorPrototype* create(VM&amp; vm, JSGlobalObject* globalObject, Structure* structure)
</del><ins>+    static ErrorPrototype* create(VM&amp; vm, JSGlobalObject*, Structure* structure)
</ins><span class="cx">     {
</span><span class="cx">         ErrorPrototype* prototype = new (NotNull, allocateCell&lt;ErrorPrototype&gt;(vm.heap)) ErrorPrototype(vm, structure);
</span><del>-        prototype-&gt;finishCreation(vm, globalObject);
</del><ins>+        prototype-&gt;finishCreation(vm);
</ins><span class="cx">         return prototype;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     ErrorPrototype(VM&amp;, Structure*);
</span><del>-    void finishCreation(VM&amp;, JSGlobalObject*);
</del><ins>+    void finishCreation(VM&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&amp;);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeNativeErrorConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     Base::finishCreation(vm, name);
</span><span class="cx">     ASSERT(inherits(info()));
</span><span class="cx">     
</span><del>-    NativeErrorPrototype* prototype = NativeErrorPrototype::create(vm, globalObject, prototypeStructure, name, this);
</del><ins>+    NativeErrorPrototype* prototype = NativeErrorPrototype::create(vm, prototypeStructure, name, this);
</ins><span class="cx">     
</span><span class="cx">     putDirect(vm, vm.propertyNames-&gt;length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
</span><span class="cx">     putDirect(vm, vm.propertyNames-&gt;prototype, prototype, DontDelete | ReadOnly | DontEnum);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeNativeErrorPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
</span><del>- *  Copyright (C) 2003, 2008 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2003, 2008, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Lesser General Public
</span><span class="lines">@@ -33,9 +33,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NativeErrorPrototype::finishCreation(VM&amp; vm, JSGlobalObject* globalObject, const WTF::String&amp; nameAndMessage, NativeErrorConstructor* constructor)
</del><ins>+void NativeErrorPrototype::finishCreation(VM&amp; vm, const WTF::String&amp; nameAndMessage, NativeErrorConstructor* constructor)
</ins><span class="cx"> {
</span><del>-    Base::finishCreation(vm, globalObject);
</del><ins>+    Base::finishCreation(vm);
</ins><span class="cx">     putDirect(vm, vm.propertyNames-&gt;name, jsString(&amp;vm, nameAndMessage), DontEnum);
</span><span class="cx">     putDirect(vm, vm.propertyNames-&gt;message, jsEmptyString(&amp;vm), DontEnum);
</span><span class="cx">     putDirect(vm, vm.propertyNames-&gt;constructor, constructor, DontEnum);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeNativeErrorPrototypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
</span><del>- *  Copyright (C) 2008 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2008, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Lesser General Public
</span><span class="lines">@@ -34,15 +34,15 @@
</span><span class="cx"> public:
</span><span class="cx">     typedef ErrorPrototype Base;
</span><span class="cx"> 
</span><del>-    static NativeErrorPrototype* create(VM&amp; vm, JSGlobalObject* globalObject, Structure* structure, const String&amp; name, NativeErrorConstructor* constructor)
</del><ins>+    static NativeErrorPrototype* create(VM&amp; vm, Structure* structure, const String&amp; name, NativeErrorConstructor* constructor)
</ins><span class="cx">     {
</span><span class="cx">         NativeErrorPrototype* prototype = new (NotNull, allocateCell&lt;NativeErrorPrototype&gt;(vm.heap)) NativeErrorPrototype(vm, structure);
</span><del>-        prototype-&gt;finishCreation(vm, globalObject, name, constructor);
</del><ins>+        prototype-&gt;finishCreation(vm, name, constructor);
</ins><span class="cx">         return prototype;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    void finishCreation(VM&amp;, JSGlobalObject*, const String&amp; nameAndMessage, NativeErrorConstructor*);
</del><ins>+    void finishCreation(VM&amp;, const String&amp; nameAndMessage, NativeErrorConstructor*);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6miscellaneous_builtin_prototypes_are_not_instancesjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js (198468 => 198469)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js        2016-03-19 07:17:41 UTC (rev 198468)
+++ trunk/Source/JavaScriptCore/tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js        2016-03-19 18:13:42 UTC (rev 198469)
</span><span class="lines">@@ -6,6 +6,13 @@
</span><span class="cx"> try {
</span><span class="cx">   Date.prototype.valueOf(); return false;
</span><span class="cx"> } catch(e) {}
</span><ins>+
+if (![Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError].every(function (E) {
+    return Object.prototype.toString.call(E.prototype) === '[object Object]';
+})) {
+  return false;
+}
+
</ins><span class="cx"> return true;
</span><span class="cx">       
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>