W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2014

Re: Figuring out the behavior of WindowProxy in the face of non-configurable properties

From: Mark Miller <erights@gmail.com>
Date: Thu, 4 Dec 2014 17:19:30 -0800
Message-ID: <CAK5yZYiEKzf26xqNKzPd13pis-Bi2zRAnMV24gSFvcS-HqjUxQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Travis Leithead <travis.leithead@microsoft.com>, "Mark S. Miller" <erights@google.com>, Domenic Denicola <domenic@domenicdenicola.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
On Thu, Dec 4, 2014 at 4:49 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 12/4/14, 4:45 PM, Mark Miller wrote:
>>
>> On Thu, Dec 4, 2014 at 4:32 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>>
>>> Sure, for a scope chain.  Testcase at
>>>
>>> https://web.mit.edu/bzbarsky/www/testcases/windowproxy/use-old-window-1.html
>>
>>
>> That page demands a client certificate. Is that intentional?
>
>
> Er, sorry.
> http://web.mit.edu/bzbarsky/www/testcases/windowproxy/use-old-window-1.html
> should work for everyone.
>
> -Boris


Here's an unexpected weirdness, probably not deeply related. Change
your first helper page to


<script>
var someName = "OLD WINDOW";
var evil = eval;
function f() {
  return someName;
}
function g() {
  return (1,evil)("3");
}
</script>



On FF and Safari, I get 3 as expected. On Chrome, I get on my console:

    Uncaught EvalError: The "this" value passed to eval must be the
global object from which eval originated

Especially weird, because this code doesn't pass any this to the
renamed eval. I don't know what this means.



-- 
  Cheers,
  --MarkM
Received on Friday, 5 December 2014 01:19:57 UTC

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