Jan 29 TC39 Meeting Notes
Andreas Rossberg
rossberg at google.com
Thu Feb 7 09:42:49 PST 2013
On 7 February 2013 18:36, David Bruant <bruant.d at gmail.com> wrote:
> Le 07/02/2013 18:22, Andreas Rossberg a écrit :
>
>> On 7 February 2013 18:09, David Bruant <bruant.d at gmail.com> wrote:
>>>
>>> Speaking of proxies, what should happen in the following case (setter and
>>> proxy from same realm):
>>> var protoSetter = Object.getOwnPropertyDescriptor(Object.prototype,
>>> '__proto__').set
>>> var p = new Proxy({}, handler);
>>> protoSetter.call(p, {});
>>> ?
>>
>> The property descriptor for Object.prototype.__proto__ will contain a
>> poisoned setter that always throws.
>
> So what does the following mean:
>
> "EA: Throws if called with object and setter coming from different realms"
> ?
>
> I hardly understand the benefit of an inconditionally-throwing setter over a
> __proto__ as data property, but I'm fine with either.
Well, it _is_ a setter, and even one that modifies its receiver, not
its holder. What would be the benefit of pretending it's not?
/Andreas
More information about the es-discuss
mailing list