Web Inspector [JSC]: Implement ScriptCallStack::stackTrace
https://bugs.webkit.org/show_bug.cgi?id=40118
Patch by Anthony Scian <ascian@rim.com> on 2012-07-04
Reviewed by Yong Li.
Source/JavaScriptCore:
Added member functions to expose function name, urlString, and line #.
Refactored toString to make use of these member functions to reduce
duplicated code for future maintenance.
Manually tested refactoring of toString by tracing thrown exceptions.
* interpreter/Interpreter.h:
(JSC::StackFrame::toString):
(JSC::StackFrame::friendlySourceURL):
(JSC::StackFrame::friendlyFunctionName):
(JSC::StackFrame::friendlyLineNumber):
Source/WebCore:
Implemented stub for createScriptCallStack to call into
Interpreter and extract the current stack frames, iterate
through the frames and create the return result required.
No new tests, manually tested thrown exception and inspector
tracebacks.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
LayoutTests:
Updated test results now that createScriptCallStack is functional.
* http/tests/inspector/console-resource-errors-expected.txt:
* http/tests/inspector/console-xhr-logging-async-expected.txt:
* http/tests/inspector/console-xhr-logging-expected.txt:
* http/tests/inspector/network/script-as-text-loading-expected.txt:
* inspector/timeline/timeline-animation-frame-expected.txt:
* inspector/timeline/timeline-layout-expected.txt:
* inspector/timeline/timeline-mark-timeline-expected.txt:
* inspector/timeline/timeline-network-resource-expected.txt:
* inspector/timeline/timeline-paint-expected.txt:
* inspector/timeline/timeline-parse-html-expected.txt:
* inspector/timeline/timeline-time-stamp-expected.txt:
* inspector/timeline/timeline-timer-expected.txt:
* platform/chromium/http/tests/inspector/console-xhr-logging-async-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121871
268f45cc-cd09-0410-ab3c-
d52691b4dbfc