getOwnPropertyDescriptor side effects

Michał Wadas michalwadas at
Tue Jan 10 19:31:46 UTC 2017

Implementations are allowed to extend objects. Otherwise presence of
global/console/// would violate spec...

On 10/01/17 20:21, Boris Zbarsky wrote:
> On 1/10/17 2:10 PM, Raul-Sebastian Mihăilă wrote:
>> Do you mean that an implementation is allowed to return an exotic object
>> from the Error constructor?
> No, I'm saying some implementations do that, because they want to
> implement a non-standard "stack" property and the only way to get
> reasonable behavior (as those implementations define "reasonable") for
> it is to have the object be an exotic object.
> There are other implementation strategies for "stack" that don't
> involve an exotic Error object, of course (e.g. SpiderMonkey
> implements it as an accessor property on Error.prototype).  They have
> their own tradeoffs, though.
>> 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.
> Sure, just like arguably the presence of the "stack" property to start
> with is a bug, because per spec it's totally unexpected.
> -Boris
> _______________________________________________
> es-discuss mailing list
> es-discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list