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

Oriol _ oriol-bugzilla at hotmail.com
Sun Mar 5 12:52:23 UTC 2017


Maybe I didn't understand correctly, but I think this invariant is not enforced.

```js
var obj = Object.preventExtensions({foo: "bar"});

// Object is non-extensible
Object.isExtensible(obj); // false

// foo is an observable own property
!!Object.getOwnPropertyDescriptor(obj, "foo"); // true

delete obj.foo;

// [[HasProperty]] returns false
"foo" in obj; // false
```

-Oriol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170305/9650761a/attachment.html>


More information about the es-discuss mailing list