Object.getOwnPropertyDescriptor can return just about anything

Mark Miller erights at gmail.com
Wed Apr 30 09:55:26 PDT 2014

This is a stop-the-train scale disaster. ES6 cannot ship in this state. We
need to fix this asap.

My apologies for not tracking this issue better earlier. I thought we had
all agreed on the constraints, so I did not pay sufficient attention to
what I thought was merely the ironing out of minor kinks.

I am trying to arrange a hangout with Tom and Allen to discuss this further.

On Wed, Apr 30, 2014 at 9:50 AM, Jason Orendorff
<jason.orendorff at gmail.com>wrote:

> On Tue, Apr 29, 2014 at 8:08 PM, Mark S. Miller <erights at google.com>
> wrote:
> >> There aren’t any internal invariant sensitivities that I could find.
>  Once
> >> such a non-standard descriptor is never directly used by any of the
> ordinary
> >> object MOP operations
> >
> > I'm surprised and alarmed by this, and it seems wrong. It is also not
> what I
> > think I remember. What about, for example, the invariant that an object
> > cannot both claim that a property is non-configurable but then later
> change
> > its alleged configuration?
> As specified, proxies can do this:
>   js> Object.isFrozen(proxy)
>   true
>   js> Object.getOwnPropertyDescriptor(proxy).configurable
>   true
> Of course the property is not really configurable. The extent of the
> issue is that Object.getOwnPropertyDescriptor is not a reliable
> reflection API.
> -j
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

Text by me above is hereby placed in the public domain

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140430/25be1cdd/attachment.html>

More information about the es-discuss mailing list