Function identity of non-configurable accessors

David Bruant bruant.d at
Wed Dec 19 08:15:38 PST 2012

Le 19/12/2012 16:34, Brandon Benvie a écrit :
> That's easily solved by making the accessor have a null prototype and 
> frozen though.
True, but it makes that you can't re-apply these getters and setters 
with .call.
Since the getter doesn't inherit from Function.prototype any longer, you 
have to go through, context)


     var call =;
     call(webIDLGetter, context);

Since recontextualizing getter/setter is probably one of their main use 
case, I wish this wasn't the chosen solution.
I'd like to point out that recently on Twitter, Eddy Bruel, (who among 
other things implemented direct proxies on SpiderMonkey) shared his 
trouble understanding the trick [1] If he 
has trouble, I'm sure thousands (millions?) of less educated JS devs 
will do too.

I prefer the configurable:true solution so far.



More information about the es-discuss mailing list