getOwnPropertyDescriptor side effects

Raul-Sebastian Mihăilă raul.mihaila at gmail.com
Tue Jan 10 19:10:00 UTC 2017


Do you mean that an implementation is allowed to return an exotic object
from the Error constructor?

https://tc39.github.io/ecma262/#sec-error-message

The Error constructor calls OrdinaryCreateFromConstructor in step 2.

https://tc39.github.io/ecma262/#sec-ordinarycreatefromconstructor

According to its definition, OrdinaryCreateFromConstructor creates an
ordinary object.

Not returning an ordinary object from the Error constructor is
non-conformant and, assuming that conformance is a requirement for V8, it's
a bug.

Just because an implementation adds a non-standard property to an ordinary
object, even if its value is an exotic object, it doesn't turn the ordinary
object into an exotic object.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170110/d7fa8e4c/attachment.html>


More information about the es-discuss mailing list