Issue 1215 in v8: "name" and "message" have bad attributes on *Error.prototype

0 views
Skip to first unread message

codesite...@google.com

unread,
Feb 27, 2011, 10:56:30 PM2/27/11
to v8-...@googlegroups.com
Status: New
Owner: ----

New issue 1215 by erights: "name" and "message" have bad attributes on
*Error.prototype
http://code.google.com/p/v8/issues/detail?id=1215

On Error.prototype itself, "message" is enumerable when it shouldn't be.

For all so-called NativeError.prototype objects, they inherit
their "message" property from Error.prototype rather than having their own.
I have no idea why the spec mandates otherwise; as it seems perfectly
sensible to me to inherit this. But the spec is the spec.

For Error and all NativeError.prototype objects, "name" is {writable:
false, enumerable: true, and configurable: false} when all of these should
be the opposite. Unlike
https://bugzilla.mozilla.org/show_bug.cgi?id=637207
this initial mis-configuration also prevents an initialization script from
fixing this, as demonstrated:

d8> Object.defineProperty(Error.prototype, 'name', {writable: true,
enumerable: false, configurable: true})
(d8):1: TypeError: Cannot redefine property: defineProperty
Object.defineProperty(Error.prototype, 'name', {writable: true, enumerable:
fa


codesite...@google.com

unread,
Feb 27, 2011, 11:32:39 PM2/27/11
to v8-...@googlegroups.com

Comment #1 on issue 1215 by erights: "name" and "message" have bad

https://bugs.webkit.org/show_bug.cgi?id=55347

codesite...@google.com

unread,
Feb 28, 2011, 12:35:51 AM2/28/11
to v8-...@googlegroups.com
Updates:
Status: Accepted
Owner: ri...@chromium.org

Comment #2 on issue 1215 by ri...@chromium.org: "name" and "message" have

bad attributes on *Error.prototype
http://code.google.com/p/v8/issues/detail?id=1215

I will take a look and make sure we follow webkit (although judging from
your webkit bug they are not standard compliant either)

codesite...@google.com

unread,
Feb 28, 2011, 12:39:53 AM2/28/11
to v8-...@googlegroups.com
Updates:
Labels: Type-Bug ES5

Comment #3 on issue 1215 by ri...@chromium.org: "name" and "message" have

bad attributes on *Error.prototype
http://code.google.com/p/v8/issues/detail?id=1215

Adding ES5 label

codesite...@google.com

unread,
Sep 3, 2011, 3:18:52 PM9/3/11
to v8-...@googlegroups.com

Comment #4 on issue 1215 by eri...@google.com: "name" and "message" have
bad attributes on *Error.prototype
http://code.google.com/p/v8/issues/detail?id=1215

From my testing, it looks like this bug can be closed as Fixed. Btw, the
WebKit and Mozilla bugs cited above are also now closed as fixed.


Related to issue 1595 , which is a distinct issue.


codesite...@google.com

unread,
Sep 5, 2011, 3:58:13 AM9/5/11
to v8-...@googlegroups.com
Updates:
Status: Fixed

Comment #5 on issue 1215 by ri...@chromium.org: "name" and "message" have

bad attributes on *Error.prototype
http://code.google.com/p/v8/issues/detail?id=1215

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages