Bug 155680 - ES6 spec requires that ErrorPrototype not be an Error object.
Summary: ES6 spec requires that ErrorPrototype not be an Error object.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-03-19 00:03 PDT by Mark Lam
Modified: 2016-03-19 11:14 PDT (History)
9 users (show)

See Also:


Attachments
proposed patch. (15.60 KB, patch)
2016-03-19 00:12 PDT, Mark Lam
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2016-03-19 00:03:58 PDT
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."
Comment 1 Radar WebKit Bug Importer 2016-03-19 00:04:36 PDT
<rdar://problem/25254919>
Comment 2 Mark Lam 2016-03-19 00:12:50 PDT
Created attachment 274510 [details]
proposed patch.
Comment 3 Michael Saboff 2016-03-19 08:46:00 PDT
Comment on attachment 274510 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=274510&action=review

r=me

> Source/JavaScriptCore/ChangeLog:14
> +        This patch changes ErrorPrototype to conform to the above specification.

Include that you changed NativeErrorPrototype.

> LayoutTests/ChangeLog:8
> +        Rebase all the test results.

Add a comment that you changed some tests as well.
Comment 4 Mark Lam 2016-03-19 11:14:43 PDT
Thanks for the review.  I've added the requested comments.  Landed in r198469: <http://trac.webkit.org/r198469>.