Problems with strict-mode caller poisoning
brendan at mozilla.com
Wed Nov 21 01:18:11 PST 2012
Allen Wirfs-Brock wrote:
>>> On 11/16/2012 07:06 AM, Brendan Eich wrote:
>>>> >>> So it seems to me premature to throw on [[GetOwnProperty]] of a strict function's 'caller'. It would be more precise, and avoid the problem you're hitting, to return a property descriptor with a censored .value,
Censored, yay. :-P
>>>> or a poisoned-pill throwing-accessor .value.
>> > That may be plausible, but requires making the 'value' property an
>> > accessor, and hence breaks with the idea that descriptors are just
>> > "records". But maybe that is OK for this hack? We should at least be
>> > careful to define it such that the meaning and behaviour of the
>> > descriptor does_not_ vary in time, which would be weird at best.
>> > I.e., its return value and/or poisoning has to be determined once when
>> > [[GetOwnProperty]] is executed.
> Yes, property descriptor records can't act like accessors. They are just specification internal records that indicate that a set of values is being passed around. But we can censor the value that goes into the record.
Is this going into the bug?
More information about the es-discuss