Web Inspector: Improve names in Debugger Call Stack section when paused
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Dec 2015 00:20:18 +0000 (00:20 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Dec 2015 00:20:18 +0000 (00:20 +0000)
commit3c65873bf80e3b855dfa228ebb71144357b2e8ee
treeb487df28a389f397a08c5358ca763b6e521d6311
parente885b6c4c8878d4de73b1ff1f62173362427f5d2
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
Source/JavaScriptCore/inspector/InjectedScriptSource.js
Source/JavaScriptCore/interpreter/CallFrame.cpp
Source/JavaScriptCore/interpreter/CallFrame.h
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js
Source/WebInspectorUI/UserInterface/Models/CallFrame.js