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

Raul-Sebastian Mihăilă raul.mihaila at
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list