Ignore:
Timestamp:
Nov 18, 2007, 1:09:27 AM (18 years ago)
Author:
[email protected]
Message:

Fix: <rdar://problem/5607032> (REGRESSION: testapi exits with assertion failure in debug build) and <rdar://problem/5440659> (JSGlobalContextCreate throws away globalObjectClass's prototype)

Split Interpreter's initialization into two distinct steps: the creation of the global prototypes
and constructors, and storing them on the global object. This allows JSClassRef's passed to
JSGlobalContextCreate to be instantiated with the correct prototype.

Reviewed by Darin Adler.

File:
1 edited

Legend:

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

    r27341 r27885  
    7272        bool hadException() const { return !!m_exception; }
    7373       
    74         const ScopeChain& scopeChain() const { return scope; }
     74        const ScopeChain& scopeChain() const { return m_scopeChain; }
    7575       
    7676        JSObject* variableObject() const { return m_variable; }
     
    8787        const List* arguments() const { return m_arguments; }
    8888       
    89         void pushScope(JSObject* s) { scope.push(s); }
    90         void popScope() { scope.pop(); }
     89        void pushScope(JSObject* s) { m_scopeChain.push(s); }
     90        void popScope() { m_scopeChain.pop(); }
    9191        LabelStack* seenLabels() { return &ls; }
    9292       
     
    9898        void popSwitch() { m_switchDepth--; }
    9999        bool inSwitch() const { return (m_switchDepth > 0); }
     100
     101        void setGlobalObject(JSGlobalObject*);
    100102       
    101103        void mark();
     
    130132        LocalStorageEntry* m_localStorageBuffer;
    131133
    132         ScopeChain scope;
     134        ScopeChain m_scopeChain;
    133135        JSObject* m_variable;
    134136        JSObject* m_thisVal;
Note: See TracChangeset for help on using the changeset viewer.