Changeset 35445 in webkit for trunk/JavaScriptCore/VM/Machine.cpp


Ignore:
Timestamp:
Jul 30, 2008, 1:00:19 AM (17 years ago)
Author:
[email protected]
Message:

<rdar://problem/6111648> JavaScript exceptions fail if the scope chain includes the global object

Reviewed by Alexey Proskuryakov.

In an attempt to remove the branch I just added to KJS::depth I
used the existence of a Variable Object at a point in the scope
chain as an indicator of function or global scope activation.
However this assumption results in incorrect behaviour if the
global object is injected into the scope chain with 'with'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/Machine.cpp

    r35411 r35445  
    8686    ScopeChainIterator iter = sc.begin();
    8787    ScopeChainIterator end = sc.end();
    88     while (!(*iter)->isVariableObject()) {
     88    while (!(*iter)->isActivationObject()) {
    8989        ++iter;
     90        if (iter == end)
     91            break;
    9092        ++scopeDepth;
    9193    }
Note: See TracChangeset for help on using the changeset viewer.