Ignore:
Timestamp:
May 15, 2009, 11:13:28 AM (16 years ago)
Author:
Adam Roben
Message:

2009-05-15 Francisco Tolmasky <[email protected]>

BUG 25467: JavaScript debugger should use function.displayName as the function's name in the call stack
<https://bugs.webkit.org/show_bug.cgi?id=25467>

Reviewed by Adam Roben.

JavaScriptCore:

  • JavaScriptCore.exp: Added calculatedFunctionName
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Added calculatedFunctionName
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added calculatedFunctionName
  • debugger/DebuggerCallFrame.cpp: Added calculatedFunctionName to match existing one in ProfileNode. (JSC::DebuggerCallFrame::calculatedFunctionName):
  • debugger/DebuggerCallFrame.h: Added calculatedFunctionName to match existing one in ProfileNode.

WebCore:

  • inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::functionName): Use calculatedFunctionName which takes into account displayName
inspector/front-end/CallStackSidebarPane.js: Remove "
anonymous function" since it is handled internally just like in profiles

(WebInspector.CallStackSidebarPane.prototype.update):

File:
1 edited

Legend:

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

    r43153 r43774  
    4747    return &function->name(&m_callFrame->globalData());
    4848}
     49   
     50UString DebuggerCallFrame::calculatedFunctionName() const
     51{
     52    if (!m_callFrame->codeBlock())
     53        return 0;
     54   
     55    JSFunction* function = static_cast<JSFunction*>(m_callFrame->callee());
     56    if (!function)
     57        return 0;
     58    return function->calculatedDisplayName(&m_callFrame->globalData());
     59}
    4960
    5061DebuggerCallFrame::Type DebuggerCallFrame::type() const
Note: See TracChangeset for help on using the changeset viewer.