Ignore:
Timestamp:
May 21, 2008, 10:02:47 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-05-21 Maciej Stachowiak <[email protected]>

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 <[email protected]>

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/ExecState.h

    r33979 r34007  
    8181        }
    8282       
    83         JSObject* globalThisValue() const { return m_globalThisValue; }
     83        JSObject* globalThisValue() const { return m_scopeChain->globalThisObject(); }
    8484       
    8585        Machine* machine() const { return m_machine; }
Note: See TracChangeset for help on using the changeset viewer.