Use accurate call frame title's based on the call frame type.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jun 2008 22:33:07 +0000 (22:33 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jun 2008 22:33:07 +0000 (22:33 +0000)
commit74a578bbbc624584ce102eb7e108292380b1f1c1
tree8f8f46aa37ddfc42ef298fe0cbb873db20566caf
parente8d38e6f86f177d999725bf7d0905993a9137f82
Use accurate call frame title's based on the call frame type.
Added a type to DebuggerCallFrame so the under interface can
distinguish anonymous functions and program call frames.

JavaScriptCore:

2008-06-16  Timothy Hatcher  <timothy@apple.com>

        Added a type to DebuggerCallFrame so the under interface can
        distinguish anonymous functions and program call frames.

        https://bugs.webkit.org/show_bug.cgi?id=19585

        Reviewed by Geoff Garen.

        * JavaScriptCore.exp: Export the DebuggerCallFrame::type symbol.
        * kjs/DebuggerCallFrame.cpp:
        (KJS::DebuggerCallFrame::type): Added.
        * kjs/DebuggerCallFrame.h:

WebCore:

2008-06-16  Timothy Hatcher  <timothy@apple.com>

        Use accurate call frame title's based on the call frame type.

        https://bugs.webkit.org/show_bug.cgi?id=19585

        Reviewed by Geoff Garen.

        * English.lproj/localizedStrings.js: Updated strings.
        * bindings/js/JSJavaScriptCallFrameCustom.cpp:
        (WebCore::JSJavaScriptCallFrame::evaluate): Removed the isValid()
        check since the evaluate() functiondoes the check already.
        (WebCore::JSJavaScriptCallFrame::thisObject): Removed the isValid()
        check, since thisObject() does the check and returns null if invalid.
        (WebCore::JSJavaScriptCallFrame::type): Return a string
        based on the enum value of the type.
        (WebCore::JSJavaScriptCallFrame::scopeChain): Removed the isValid()
        check, since scopeChain() does the check and returns null if invalid.
        So just null check scopeChain().
        * page/JavaScriptCallFrame.cpp:
        (WebCore::JavaScriptCallFrame::type): Return the DebuggerCallFrame::Type.
        Return DebuggerCallFrame::UnknownType if the call frame is invalid.
        * page/JavaScriptCallFrame.h:
        * page/JavaScriptCallFrame.idl: Add the type property.
        * page/inspector/CallStackSidebarPane.js:
        (WebInspector.CallStackSidebarPane.prototype.update): Check the type
        of the call frame to create the correct title.
        * page/inspector/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use the
        "(program)" title for the file menu to match the call frames.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/kjs/DebuggerCallFrame.cpp
JavaScriptCore/kjs/DebuggerCallFrame.h
WebCore/ChangeLog
WebCore/English.lproj/localizedStrings.js
WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp
WebCore/page/JavaScriptCallFrame.cpp
WebCore/page/JavaScriptCallFrame.h
WebCore/page/JavaScriptCallFrame.idl
WebCore/page/inspector/CallStackSidebarPane.js
WebCore/page/inspector/ScriptsPanel.js