get/setIntegrity trap (Was: A case for removing the seal/freeze/isSealed/isFrozen traps)
kpreid at google.com
Wed Feb 20 12:18:43 PST 2013
On Wed, Feb 20, 2013 at 12:15 PM, David Bruant <bruant.d at gmail.com> wrote:
> And in an ES6 world, you'll probably use an actual WeakMap anyway?
Using an actual WeakMap does not change matters: the intent is that after
Object.freeze(o), you can't add new trademarks to o. Since the trademark
info is not stored on the object but in the WeakMap (whether emulated or
actual), we have to add an explicit test.
If 'private properties' (in whatever form they come to ES6) were available
to us, then it would be natural to use them instead for this purpose (at
least, so it seems to me at the moment) and so we would not need a test
since non-extensibility would presumably reject the addition of a new
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss