[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 #5 from Christophe Dumez <dchris@gmail.com> ---
(In reply to Boris Zbarsky from comment #4)
> > 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.

Oh right, never mind. After re-reading the EcmaScript again, my initial
expectation was incorrect. Firefox does seem to behave correctly then.

> 
> 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 the QA Contact for the bug.

Received on Friday, 5 February 2016 20:07:12 UTC