Ignore:
Timestamp:
Jun 17, 2008, 3:33:07 PM (17 years ago)
Author:
[email protected]
Message:

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 <[email protected]>

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 <[email protected]>

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.
File:
1 edited

Legend:

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

    r33979 r34634  
    4343    class DebuggerCallFrame {
    4444    public:
     45        typedef enum {
     46            ProgramType,
     47            FunctionType
     48        } Type;
     49
    4550        DebuggerCallFrame(Machine* machine, JSGlobalObject* dynamicGlobalObject, const CodeBlock* codeBlock, ScopeChainNode* scopeChain, JSValue* exception, Register** registerBase, int registerOffset)
    4651            : m_machine(machine)
     
    5762        const ScopeChainNode* scopeChain() const { return m_scopeChain; }
    5863        const UString* functionName() const;
     64        DebuggerCallFrame::Type type() const;
    5965        JSObject* thisObject() const;
    6066        JSValue* evaluate(const UString&, JSValue*& exception) const;
Note: See TracChangeset for help on using the changeset viewer.