[Harmony Proxies] get/set trap receiver argument unnecessary

David Bruant david.bruant at labri.fr
Wed Apr 27 11:17:33 PDT 2011


Le 27/04/2011 19:38, Sean Eagan a écrit :
> Hi,
>
> The "get" and "set" traps currently have both "receiver" and "proxy"
> arguments.  This is because it has been suggested that they are not
> the same in the case of property access on a receiver causing a
> [[Get]] / [[Put]] call to propogate up the prototype chain to a proxy.
The case when they are not the same is when the proxy is in the
prototype chain (regardless of what kind of object is "underneath").
See the third example at:
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Proxy#Common_mistakes_and_misunderstanding
The proxy object is on the prototype chain and in the "get" trap, "rcvr"
is the "base object" while the third optional proxy argument is the
proxy prototype object.

David


More information about the es-discuss mailing list