W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2016

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

From: <bugzilla@jessica.w3.org>
Date: Fri, 05 Feb 2016 20:07:10 +0000
To: public-script-coord@w3.org
Message-ID: <bug-29421-3890-uXtTfyrBW1@http.www.w3.org/Bugs/Public/>
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 on the CC list for the bug.
Received on Friday, 5 February 2016 20:07:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:24 UTC