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

Tom Van Cutsem tomvc.be at gmail.com
Wed Dec 19 02:09:11 PST 2012


2012/12/19 Andreas Rossberg <rossberg at google.com>

> 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.)
>

Indeed. To clarify: the case-distinction is made in ES5 as well, although
it is implicit there because of the use of [[GetOwnProperty]] versus
[[GetProperty]] (see ES5 8.12.5 [[Put]]). The test is needed to distinguish
updating of "own" data properties (8.12.5 step 3.b) from adding a new own
data property (8.12.5 step 6.b). As [[GetProperty]] is removed from ES6, we
need to test the Receiver to figure out what case we're in.

Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121219/68985569/attachment-0001.html>


More information about the es-discuss mailing list