Function identity of non-configurable accessors
Tom Van Cutsem
tomvc.be at gmail.com
Thu Dec 20 00:02:35 PST 2012
2012/12/19 David Bruant <bruant.d at gmail.com>
> Le 19/12/2012 17:34, Brandon Benvie a écrit :
> So the remaining situations in which it's difficult are in the parent
>> frame when you want to do this one of the handful of properties that have
>> this treatment.
>> An option that might have uses in other places as well is a kind of
>> primitive version of call, bind, and apply that have the null prototype,
>> frozen treatment. They could be singletons over the entire runtime, across
>> realms, and be attached to any function in any realm (including these
>> accessors) without leaking anything.
> I think that was what Brendan called "null realm". It has the problem
> that if someone adds new things to Function.prototype or Object.prototype,
> your "null realm" getters/setters wouldn't benefit from it.
Is that really a problem though? As mentioned, these properties aren't
accessors today. So no code could depend on those accessors having extra
properties. I think I'm leaning towards non-configurable accessors with
deep-frozen (null-realm) getter/setter functions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss