Web Inspector: function remote objetct should provide access to function position...
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Nov 2011 09:27:25 +0000 (09:27 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Nov 2011 09:27:25 +0000 (09:27 +0000)
commit0741e4eabb6e4304bc9fb679d3a4febbab82b3a2
treee998fede9d591dac62cf2b3ef571538e5b38d643
parentcc127e9a33e86ea677ce65cfb6c24b795914e119
Web Inspector: function remote objetct should provide access to function position in the script
https://bugs.webkit.org/show_bug.cgi?id=71808

Source/JavaScriptCore:

Exposed accessor for function source code.

Reviewed by Pavel Feldman.

* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/JSFunction.cpp:
(JSC::JSFunction::sourceCode):
* runtime/JSFunction.h:

Source/WebCore:

Added Debugger.getFunctionLocation command for resolving function location including
start line, column and script id.

Reviewed by Pavel Feldman.

Test: inspector/debugger/function-location.html

* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::functionLocation):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::functionLocationCallback):
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::getFunctionLocation):
* inspector/InjectedScript.h:
* inspector/InjectedScriptHost.idl:
* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::getFunctionLocation):
* inspector/InspectorDebuggerAgent.h:

LayoutTests:

Added test for Debugger.getFunctionLocation command.

Reviewed by Pavel Feldman.

* inspector/debugger/function-location-expected.txt: Added.
* inspector/debugger/function-location.html: Added.
* platform/chromium/inspector/debugger/function-location-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/debugger/function-location-expected.txt [new file with mode: 0644]
LayoutTests/inspector/debugger/function-location.html [new file with mode: 0644]
LayoutTests/platform/chromium/inspector/debugger/function-location-expected.txt [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/JavaScriptCore/runtime/JSFunction.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
Source/WebCore/inspector/InjectedScript.cpp
Source/WebCore/inspector/InjectedScript.h
Source/WebCore/inspector/InjectedScriptHost.idl
Source/WebCore/inspector/InjectedScriptSource.js
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorDebuggerAgent.cpp
Source/WebCore/inspector/InspectorDebuggerAgent.h