Comment #5 on issue 1595 by [email protected]: Error#message should be enumerable
http://code.google.com/p/v8/issues/detail?id=1595

How can you read

15.11.1.1 Error (message)

If the argument message is not undefined, the message own property
of the newly constructed object is set to ToString(message).

15.11.2.1 new Error (message)

If the argument message is not undefined, the message own property
of the newly constructed object is set to ToString(message).


and decide that message is non-enumerable in an object created using new Error()?

Yes, the properties of the _prototype_ object are non-enumerable...


15.11.3.1 Error.prototype
The initial value of Error.prototype is the Error prototype object (15.11.4).

This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.

15.11.7.6 NativeError.prototype

The initial value of NativeError.prototype is a NativeError prototype
object (15.11.7.7). Each NativeError constructor has a separate prototype object.

This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to