[Harmony Proxies] Proposal: Property fixing

David Bruant david.bruant at labri.fr
Thu May 12 12:34:02 PDT 2011

Le 12/05/2011 14:40, Tom Van Cutsem a écrit :
> controversial invariant:
> - proxies can't emulate non-configurable properties. If they would,
> proxies could still update attributes of non-configurable properties.
Currently, proxies can emulate configurable properties (they are forced
to, but that's not my point). Still, a proxy can ignore
Object.defineProperty calls in the case of a re-configuration and also
ignore deletions, giving the impression that the property is
non-configurable even though Object.getOwnPropertyDescriptor would say
that configurable is set to "true".
Proxies being able to lie about configurability is the exact mirror of
proxies being able to lie about non-configurability. However, one is
allowed, the other isn't.

I need to think more about the rest of your message.
Good work on the invariant enumeration. It may be incomplete as you
point out, but that's a good start anyway.

Among the enforced invariants, maybe that "property names being strings"
could be added if that is enforced. If it is, it requries to cast all
property names arguments to strings before trap calls. However,
enforcing this invariant may require to do the same on the array
returned by get{Own}PropertyNames/enumerate/keys. (maybe that it should
rather be in the controversial part :-) )


More information about the es-discuss mailing list