new [[HasProperty]] invariant for non-extensible objects

Raul-Sebastian Mihăilă raul.mihaila at gmail.com
Sun Mar 5 07:14:21 UTC 2017


Wouldn't it make sense to have the following [[HasProperty]] invariant for
all the objects?

If the object is non-extensible and P is an observable own property
using [[GetOwnProperty]], [[HasProperty]] must return true.

The same rule applies for [[OwnPropertyKeys]], where the resulted List must
contain the own properties that are observable using [[GetOwnProperty]] if
the object is non-extensible.

This rule is already applied for Proxy objects. Without this rule it's
possible for non-standard non-extensible exotic objects to return false
while returning a property descriptor from [[GetOwnProperty]] with the same
argument.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170305/0e09cdc0/attachment.html>


More information about the es-discuss mailing list