Re: @@symbol hooks and cross domain frames

On Jul 16, 2015, at 5:20 PM, Adam Klein wrote:

> On Thu, Jul 16, 2015 at 5:17 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 7/16/15 8:13 PM, Boris Zbarsky wrote:
> I'm just suggesting we use this exact mechanism for @@isConcatSpreadable
> 
> Or just explicitly check for @@isConcatSpreadable in [[GetOwnProperty]] there and return a value descriptor with the value undefined, really.
> 
> But [[Get]] says:
> 
>   Invoke [[GetOwnProperty]]. If there is a getter, invoke it. Otherwise, throw.
> 
> And [[Get]] is the way the spec gets ahold of @@isConcatSpreadable, not a direct [[GetOwnProperty]] call. Perhaps that part of the new spec is just in need of realignment?

[[Get]] is polymorphic basic upon the low level object representation.  The definition of [[Get]] in the ES spec. at http://www.ecma-international.org/ecma-262/6.0/#sec-ordinary-object-internal-methods-and-internal-slots-get-p-receiver is for "ordinary objects", i.e. normal objects created by ES code.  A cross-origin window object is not an  "ordinary object" so its [[Get]] behavior can be whatever it needs to be, as long is it maintains the required [[Get]] invariants http://www.ecma-international.org/ecma-262/6.0/#sec-invariants-of-the-essential-internal-methods 

Received on Friday, 17 July 2015 00:56:36 UTC