Proxies: wrong "receiver" used in default "set" trap
rossberg at google.com
Wed Dec 19 00:12:30 PST 2012
On 18 December 2012 22:56, Tom Van Cutsem <tomvc.be at gmail.com> 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
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...
More information about the es-discuss