[webkit-dev] ExecState::thisObject()

Geoffrey Garen ggaren at apple.com
Mon Jul 13 16:01:11 PDT 2009


>> Which spec did you have in mind? I'd like to read it.
>
> Essentially, the ECMAScript spec requires this.  In spec-land, these
> objects are all created at the beginning of time.  The fact that we
> create them lazily is what leads to this bug.  Depending on who
> touches them first, they end up with different prototype chains, which
> doesn't make sense to ECMAScript.

I agree that it's strange for an object's behavior to change based on  
which global object accesses it first, but I don't think the ECMA spec  
is a good guide here, since, according to ECMA 262, the very notion of  
more than one global object is invalid.

> That's correct.  Other browser's get this case right.  Here are a
> couple test cases you might find interesting:
>
> http://webblaze.org/abarth/tests/protoconfused/test1.html
> http://webblaze.org/abarth/tests/protoconfused/test2.html

I tried these tests, with mixed results:

IE8: Exception thrown during load.
Firefox 3.0: mixture of passes and fails on test1.html. Exception  
thrown during load of test2.html.
Chrome 2.0: Mixture of passes and fails.

Geoff


More information about the webkit-dev mailing list