[Bug 29421] Should getters on a global without an explicit 'this' really throw TypeError?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29421

--- Comment #4 from Boris Zbarsky <bzbarsky@mit.edu> ---
> Yes, I work on WebKit and am currently fixing this issue.

Ah, awesome.  :)

If we spec auto-picking a global, we should fall back to the global of the
Realm of the getter function (basically, do what a non-strict scripted function
would do).  So in your example, for the same-origin case, that would be mean
locationGetter.call() and locationGetter.call(otherWin) do the same thing.

For the cross-origin case, given the current spec proposals for cross-origin
objects, the getter would be created in the Realm of the thing touching the
cross-origin object, so locationGetter.call() would be equivalent to
locationGetter.call(window).  This slight weirdness only affects things one can
get cross-origin on a window, which is just "location"... so I think I'm ok
with it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 5 February 2016 19:54:09 UTC