JavaScriptCore:
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 May 2008 05:02:47 +0000 (05:02 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 May 2008 05:02:47 +0000 (05:02 +0000)
commitb017e7636e1f4f8f4933c4b84031a0ab482c48a5
tree654427c505073823f02209083789b4ccdcb18494
parent73d42598188e93e7ce5110bfe16f646797adedf2
JavaScriptCore:

2008-05-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver and Sam.

        - fixed <rdar://problem/5815631> REGRESSION (r31239): Multiscope optimisation of function calls results in incorrect this value (breaks tvtv.de)

        Track global this value in the scope chain so we can retrieve it
        efficiently but it follows lexical scope properly.

        * kjs/ExecState.h:
        (KJS::ExecState::globalThisValue):
        * kjs/JSGlobalObject.h:
        (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
        * kjs/function_object.cpp:
        (KJS::FunctionObjectImp::construct):
        * kjs/scope_chain.h:
        (KJS::ScopeChainNode::ScopeChainNode):
        (KJS::ScopeChainNode::globalThisObject):
        (KJS::ScopeChainNode::push):
        (KJS::ScopeChain::ScopeChain):

LayoutTests:

2008-05-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver and Sam.

        - tests for <rdar://problem/5815631> REGRESSION (r31239): Multiscope optimisation of function calls results in incorrect this value (breaks tvtv.de)

        * fast/frames/cross-site-this-expected.txt: Added.
        * fast/frames/cross-site-this.html: Added.
        * fast/frames/resources/cross-site-this-helper.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/ExecState.h
JavaScriptCore/kjs/JSGlobalObject.h
JavaScriptCore/kjs/function_object.cpp
JavaScriptCore/kjs/scope_chain.h
LayoutTests/ChangeLog