Proxies: wrong "receiver" used in default "set" trap

Andreas Rossberg rossberg at
Wed Dec 19 00:12:30 PST 2012

On 18 December 2012 22:56, Tom Van Cutsem < at> wrote:

> Option B:
> Address point 2) directly by changing the test that determines property
> addition versus property update inside Reflect.set (i.e. the [[SetP]]
> internal method of objects) so that the algorithm no longer tests whether
> target === receiver, but rather whether target === receiver || receiver is
> a proxy for target.
> This solves the issue at hand, although it feels like a more ad hoc
> solution.

Indeed, especially since the length of the proxy chain may be >1.

So it has to be A. (Or the definition of Reflect.set has to change. I don't
have much love for the case distinction in there anyway. But it's probably
a necessary consequence of the somewhat incoherent property assignment
model we are stuck with.)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list