Re: @@symbol hooks and cross domain frames

On Jul 9, 2015, at 6:47 AM, Erik Arvidsson wrote:

> In ES5 the following works:
> 
>  [].concat(windowFromOtherDomain)
> 
> But in ES6 it fails because reading @@isConcatSpreadable throws an
> access denied error.
> 
> Similar issues arise with @@toStringTag and @@hasInstance
> 
> To stay web compatible we are thinking that if these [[Get]]s fail
> their access check we treat the value as undefined.

Sounds, reasonable.  The ES spec. didn't deal with this case because domain access checks is not a concept that is part of ES.

> 
> There might also be similar issues with Get(x, "constructor") and
> @@species but I believe all of them might be better of throwing.

Generally, ES6 has fall-back behaviors for undefined results from such accesses which will result in the use of a default constructor provided from the current Realm (and presumably domain).  Whether or not that is desirable seems very situational.

Allen

Received on Friday, 10 July 2015 09:24:28 UTC