Ignore:
Timestamp:
Dec 17, 2015, 4:20:18 PM (10 years ago)
Author:
Joseph Pecoraro
Message:

Web Inspector: Improve names in Debugger Call Stack section when paused
https://bugs.webkit.org/show_bug.cgi?id=152398

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::functionName):
Provide a better name from the underlying CallFrame.

  • inspector/InjectedScriptSource.js:

(InjectedScript.CallFrameProxy):
Just call functionName, it will provide a better
than nothing function name.

  • runtime/JSFunction.cpp:

(JSC::getCalculatedDisplayName):
Use emptyString().

  • interpreter/CallFrame.h:
  • interpreter/CallFrame.cpp:

(JSC::CallFrame::friendlyFunctionName):
This is the third similiar implementation of this,
but all other cases use other "StackFrame" objects.
Use the expected names for program code.

Source/WebInspectorUI:

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Use a new fromPayload helper to construct the CallFrame and share code.

  • UserInterface/Models/CallFrame.js:

(WebInspector.CallFrame.functionNameFromPayload):
(WebInspector.CallFrame.programCodeFromPayload):
(WebInspector.CallFrame.fromDebuggerPayload):
(WebInspector.CallFrame.fromPayload):
Add a new way to construct a call frame. There are two kinds of
CallFrame payloads in the protocol:

  • Debugger.CallFrame, this new path
  • Console.CallFrame, the pre-existing path
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp

    r193766 r194247  
    129129    if (!isValid())
    130130        return String();
    131     JSFunction* function = jsDynamicCast<JSFunction*>(m_callFrame->callee());
    132     if (!function)
    133         return String();
    134 
    135     return getCalculatedDisplayName(m_callFrame, function);
     131    return m_callFrame->friendlyFunctionName();
    136132}
    137133
Note: See TracChangeset for help on using the changeset viewer.