Tom Van Cutsem (2013-12-08T11:34:08.000Z)
2013/12/8 Brendan Eich <brendan at mozilla.com>

> We did not have consensus on per-object Get/SetIntegrity. I don't think we
> want the redundancy entailed. Implementors I've spoken with do not. This
> seems a dead snake, so no need to shoot at it.
>

Thanks for digging up those links. Indeed, no need to revisit this. The
only requirement is that the abstract algorithms TestIntegrity and
SetIntegrity in the current ES6 draft use a reliable internal method for
querying the object's own properties (i.e. something like
[[GetOwnPropertyNames]] rather than [[OwnPropertyKeys]]).

@Mark: you are right about the additional restriction. W.r.t. invariant
checks on proxies, I believe this implies that once a proxy's target is
non-extensible, the handler must return from its getOwnPropertyNames trap
exactly the set of properties returned from
Object.getOwnPropertyNames(target). That is: proxies cannot virtualize the
list of properties for non-extensible objects. While this may seem awkward
at first, this is precisely the restriction that we need so that
Object.freeze and isFrozen remain reliable in the presence of proxies.

Regards,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131208/2678463f/attachment-0001.html>
domenic at domenicdenicola.com (2013-12-10T02:23:24.983Z)
2013/12/8 Brendan Eich <brendan at mozilla.com>

> We did not have consensus on per-object Get/SetIntegrity. I don't think we
> want the redundancy entailed. Implementors I've spoken with do not. This
> seems a dead snake, so no need to shoot at it.

Thanks for digging up those links. Indeed, no need to revisit this. The
only requirement is that the abstract algorithms TestIntegrity and
SetIntegrity in the current ES6 draft use a reliable internal method for
querying the object's own properties (i.e. something like
[[GetOwnPropertyNames]] rather than [[OwnPropertyKeys]]).

@Mark: you are right about the additional restriction. W.r.t. invariant
checks on proxies, I believe this implies that once a proxy's target is
non-extensible, the handler must return from its getOwnPropertyNames trap
exactly the set of properties returned from
Object.getOwnPropertyNames(target). That is: proxies cannot virtualize the
list of properties for non-extensible objects. While this may seem awkward
at first, this is precisely the restriction that we need so that
Object.freeze and isFrozen remain reliable in the presence of proxies.