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: http://svn.webkit.org/repository/webkit/trunk@100113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed