Skip to content
  • timothy@apple.com's avatar
    Adds a JavaScriptCallFrame object and JavaScript binding with an IDL. · dec8c517
    timothy@apple.com authored
    This object will expose the stack to the Inspector's debugger.
    
    Reviewed by Adam Roben.
    
    * DerivedSources.make: Add JavaScriptCallFrame.
    * bindings/js/JSJavaScriptCallFrameCustom.cpp: Added.
    (WebCore::JSJavaScriptCallFrame::evaluate): Calls impl evaluate and returns the result.
    (WebCore::JSJavaScriptCallFrame::scopeChain): Makes an array of the ScopeChain.
    * page/JavaScriptCallFrame.cpp: Added.
    (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
    (WebCore::JavaScriptCallFrame::caller): Returns m_caller.
    (WebCore::JavaScriptCallFrame::functionName): Returns the function
    name from the ExecState if this is not global code or anonymous.
    (WebCore::JavaScriptCallFrame::evaluate): Evaluates a script string
    in the scope of the call frame.
    * page/JavaScriptCallFrame.h: Added.
    (WebCore::JavaScriptCallFrame::create): Call the ctor can return in a PassRefPtr.
    (WebCore::JavaScriptCallFrame::invalidate): Sets m_mexec to 0. This prevents a
    stale ExecState from being accessed after the lifetime of the ExecState.
    (WebCore::JavaScriptCallFrame::isValid): Checks if m_exec is 0.
    (WebCore::JavaScriptCallFrame::execState): Returns m_exec.
    (WebCore::JavaScriptCallFrame::sourceIdentifier): Returns m_sourceID.
    (WebCore::JavaScriptCallFrame::line): Returns m_line.
    (WebCore::JavaScriptCallFrame::setLine): Sets m_line.
    (WebCore::JavaScriptCallFrame::scopeChain): Returns by reference m_exec->scopeChain().
    * page/JavaScriptCallFrame.idl: Added.
    * WebCore.xcodeproj/project.pbxproj: Add new files.
    * WebCore.vcproj/WebCore.vcproj: Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dec8c517