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
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev