Sent again from the right address. Gmail hates me today.
On Fri, Jul 10, 2009 at 6:10 PM, Adam Barth<aba...@eecs.berkeley.edu> wrote: > On Fri, Jul 10, 2009 at 6:04 PM, Maciej Stachowiak<m...@apple.com> wrote: >> On Jul 10, 2009, at 5:55 PM, Adam Barth wrote: >>> Eric and I spent some more time this afternoon looking at this. We >>> don't think the ExecState::thisValue() approach is going to work. We >>> implemented hacky version to experiment with, but the problem is with >>> cases like this: >>> >>> document.body >>> >>> In evaluating this case, the "this" value isn't what we want because >>> our computed "thisValue" is for the running function, not for the >>> getter. >> >> Is it definitely right for document.body to make a wrapper using prototypes >> from the document's host window, rather than from the accessing function's >> window? What do other browsers do? > > 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 > > The question is how to compute the correct wrapper context in all > cases. There are a bunch of approaches that cover 80% of the cases. > The trick is finding an approach that works for 100% of the causes. > > Adam > _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev