noSuchMethod: "funargs" + "invoke-only-phantoms"

Tom Van Cutsem tomvc.be at gmail.com
Wed Dec 21 11:53:32 PST 2011


2011/12/21 Dmitry Soshnikov <dmitry.soshnikov at gmail.com>

>  On 20.12.2011 17:00, Tom Van Cutsem wrote:
>
> You can (and probably should) advertise a virtual method as
> configurable:true.
>
>
> I can only `configurable: true', but as we said, to fix broken `delete'
> operator, we need to treat these virtual properties as non-configurable. We
> logically `return false' in `delete' trap and have to adjust
> `getOwnPropertyDescriptor' as well.
>

This seems to be a persistent source of confusion about invariants in ES5:
The fact that a property is configurable:true _implies_ that it can be
successfully deleted is _not_ an ECMAScript invariant.
The ES5 spec only requires that configurable:false implies that the
property cannot successfully be deleted.

The difference is subtle, but important. It would not surprise me if there
exist host objects that advertise their properties as configurable:true,
don't complain when you try to delete them, yet when you query the
properties again, they're still there. This is entirely within the bounds
of the ES5 spec. MarkM once explained the difference well: <
https://mail.mozilla.org/pipermail/es-discuss/2011-May/014150.html>

Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111221/dd5a970c/attachment.html>


More information about the es-discuss mailing list