Web Inspector [JSC]: Implement ScriptCallStack::stackTrace
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2012 21:36:52 +0000 (21:36 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2012 21:36:52 +0000 (21:36 +0000)
commitd106bf27cf94572c943d38b3ea851a3f58c037f7
tree433a0e5e12bb0144028314e112b3a1cf8133cde5
parentc663d5672ee2675e3a0020c3e44dded694e66dbd
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
18 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/console-resource-errors-expected.txt
LayoutTests/http/tests/inspector/console-xhr-logging-async-expected.txt
LayoutTests/http/tests/inspector/console-xhr-logging-expected.txt
LayoutTests/http/tests/inspector/network/script-as-text-loading-expected.txt
LayoutTests/inspector/timeline/timeline-animation-frame-expected.txt
LayoutTests/inspector/timeline/timeline-layout-expected.txt
LayoutTests/inspector/timeline/timeline-mark-timeline-expected.txt
LayoutTests/inspector/timeline/timeline-network-resource-expected.txt
LayoutTests/inspector/timeline/timeline-paint-expected.txt
LayoutTests/inspector/timeline/timeline-parse-html-expected.txt
LayoutTests/inspector/timeline/timeline-time-stamp-expected.txt
LayoutTests/inspector/timeline/timeline-timer-expected.txt
LayoutTests/platform/chromium/http/tests/inspector/console-xhr-logging-async-expected.txt [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/interpreter/Interpreter.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptCallStackFactory.cpp