Ignore:
Timestamp:
May 2, 2008, 11:10:33 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Darin.

Move call stack depth counter to global object.

  • kjs/ExecState.h: (KJS::ExecState::functionCallDepth): Added a recursion depth counter to per-thread data.
  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::init): Initialize PerThreadData.functionCallDepth.
  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::perThreadData): Made the result non-const.
  • kjs/object.cpp: (KJS::throwStackSizeExceededError): Moved throwError to a separate function, since it is now the only thing in JSObject::call that needs a PIC branch. (KJS::JSObject::call): Use a per-thread variable instead of local static for recursion depth tracking.
File:
1 edited

Legend:

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

    r32807 r32819  
    6161       
    6262        Heap* heap;
     63
     64        unsigned functionCallDepth;
    6365    };
    6466
     
    125127        Heap* heap() const { return m_perThreadData->heap; }
    126128
     129        unsigned& functionCallDepth() { return m_perThreadData->functionCallDepth; }
     130
    127131        LocalStorage& localStorage() { return *m_localStorage; }
    128132        void setLocalStorage(LocalStorage* s) { m_localStorage = s; }
     
    205209        ExecState* m_callingExec;
    206210
    207         const PerThreadData* m_perThreadData;
     211        PerThreadData* m_perThreadData;
    208212
    209213        ScopeNode* m_scopeNode;
Note: See TracChangeset for help on using the changeset viewer.