<!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
"The Error prototype object is an ordinary object. It is not an Error instance
and does not have an [[ErrorData]] internal slot."
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 "[object Object]" instead of "[object Error]". 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 <mark.lam@apple.com>
+
+ 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 "[object Object]" instead of "[object Error]". 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 <dabates@apple.com>
</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 "Error: HierarchyRequestError: DOM Exception 3"
</span><span class="cx"> PASS Object.prototype.toString.call(e) is "[object DOMException]"
</span><span class="cx"> PASS Object.prototype.toString.call(e.__proto__) is "[object DOMExceptionPrototype]"
</span><del>-PASS Object.prototype.toString.call(e.__proto__.__proto__) is "[object Error]"
</del><ins>+PASS Object.prototype.toString.call(e.__proto__.__proto__) is "[object Object]"
</ins><span class="cx"> PASS e.constructor.toString() is "function DOMException() {\n [native code]\n}"
</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("e.toString()", "Error: HierarchyRequestError: DOM Exception 3");
</span><span class="cx"> shouldBeEqualToString("Object.prototype.toString.call(e)", "[object DOMException]");
</span><span class="cx"> shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object DOMExceptionPrototype]");
</span><del>-shouldBeEqualToString("Object.prototype.toString.call(e.__proto__.__proto__)", "[object Error]");
</del><ins>+shouldBeEqualToString("Object.prototype.toString.call(e.__proto__.__proto__)", "[object Object]");
</ins><span class="cx"> shouldBeEqualToString("e.constructor.toString()", "function DOMException() {\n [native code]\n}");
</span><span class="cx"> shouldBeTrue("e instanceof DOMException");
</span><span class="cx"> shouldBeTrue("e instanceof Error");
</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 "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx">
</span><span class="cx">
</span><del>-PASS ({}).toString.call(Error.prototype) is "[object Error]"
-PASS ({}).toString.call(RangeError.prototype) is "[object Error]"
</del><ins>+PASS ({}).toString.call(Error.prototype) is "[object Object]"
+PASS ({}).toString.call(RangeError.prototype) is "[object Object]"
</ins><span class="cx"> PASS err.toString() is "message"
</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 <a href="https://bugs.webkit.org/show_bug.cgi?id=55346">55346</a>, <a href="https://bugs.webkit.org/show_bug.cgi?id=70889">70889</a>, and <a href="https://bugs.webkit.org/show_bug.cgi?id=75452">75452</a>.'
</span><span class="cx"> );
</span><span class="cx">
</span><del>-shouldBe("({}).toString.call(Error.prototype)", '"[object Error]"');
-shouldBe("({}).toString.call(RangeError.prototype)", '"[object Error]"');
</del><ins>+shouldBe("({}).toString.call(Error.prototype)", '"[object Object]"');
+shouldBe("({}).toString.call(RangeError.prototype)", '"[object Object]"');
</ins><span class="cx">
</span><span class="cx"> var err = new Error("message");
</span><span class="cx"> err.name = "";
</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 !== "[object Error]") {
-        testFailed('#1: Error.prototype.toString=Object.prototype.toString; __tostr = Error.prototype.toString(); __tostr === "[object Error]". Actual: '+__tostr );
</del><ins>+if (__tostr !== "[object Object]") {
+        testFailed('#1: Error.prototype.toString=Object.prototype.toString; __tostr = Error.prototype.toString(); __tostr === "[object Object]". 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 <mark.lam@apple.com>
+
+ 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
+
+ "The Error prototype object is an ordinary object. It is not an Error instance
+ and does not have an [[ErrorData]] internal slot."
+
+ 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 <bpoulain@apple.com>
</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& vm, ErrorPrototype* errorPrototype)
</span><span class="cx"> {
</span><del>- Base::finishCreation(vm, errorPrototype->classInfo()->className);
</del><ins>+ Base::finishCreation(vm, ASCIILiteral("Error"));
</ins><span class="cx"> // ECMA 15.11.3.1 Error.prototype
</span><span class="cx"> putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
</span><span class="cx"> putDirectWithoutTransition(vm, vm.propertyNames->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 = { "Error", &ErrorInstance::s_info, &errorPrototypeTable, CREATE_METHOD_TABLE(ErrorPrototype) };
</del><ins>+const ClassInfo ErrorPrototype::s_info = { "Object", &Base::s_info, &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& 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& vm, JSGlobalObject* globalObject)
</del><ins>+void ErrorPrototype::finishCreation(VM& vm)
</ins><span class="cx"> {
</span><del>- Base::finishCreation(globalObject->globalExec(), vm, "");
</del><ins>+ Base::finishCreation(vm);
</ins><span class="cx"> ASSERT(inherits(info()));
</span><span class="cx"> putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Error"))), DontEnum);
</span><ins>+ putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), DontEnum);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ErrorPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &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 "ErrorInstance.h"
</del><ins>+#include "JSObject.h"
</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& vm, JSGlobalObject* globalObject, Structure* structure)
</del><ins>+ static ErrorPrototype* create(VM& vm, JSGlobalObject*, Structure* structure)
</ins><span class="cx"> {
</span><span class="cx"> ErrorPrototype* prototype = new (NotNull, allocateCell<ErrorPrototype>(vm.heap)) ErrorPrototype(vm, structure);
</span><del>- prototype->finishCreation(vm, globalObject);
</del><ins>+ prototype->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&, Structure*);
</span><del>- void finishCreation(VM&, JSGlobalObject*);
</del><ins>+ void finishCreation(VM&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
</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->length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
</span><span class="cx"> putDirect(vm, vm.propertyNames->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& vm, JSGlobalObject* globalObject, const WTF::String& nameAndMessage, NativeErrorConstructor* constructor)
</del><ins>+void NativeErrorPrototype::finishCreation(VM& vm, const WTF::String& 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->name, jsString(&vm, nameAndMessage), DontEnum);
</span><span class="cx"> putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), DontEnum);
</span><span class="cx"> putDirect(vm, vm.propertyNames->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& vm, JSGlobalObject* globalObject, Structure* structure, const String& name, NativeErrorConstructor* constructor)
</del><ins>+ static NativeErrorPrototype* create(VM& vm, Structure* structure, const String& name, NativeErrorConstructor* constructor)
</ins><span class="cx"> {
</span><span class="cx"> NativeErrorPrototype* prototype = new (NotNull, allocateCell<NativeErrorPrototype>(vm.heap)) NativeErrorPrototype(vm, structure);
</span><del>- prototype->finishCreation(vm, globalObject, name, constructor);
</del><ins>+ prototype->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&, JSGlobalObject*, const String& nameAndMessage, NativeErrorConstructor*);
</del><ins>+ void finishCreation(VM&, const String& 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>