Web Inspector: support JavaScript variable mutation in protocol and V8 bindings
https://bugs.webkit.org/show_bug.cgi?id=107829

Source/WebCore:

A new command is added to protocol description and the call is passed through
debugger agent through injected script and debugger script down to V8 mirror
API. JSC bindings got a thorw exception stub.

Only declarative JavaScript scopes are supported (local, closure, catch). Other
scopes (global, with) are not supported by V8 and not supported by protocol, because
manual approach (direct property assigment) is available for them in form of evaluate
commands and is more desirable because of a complex nature of operation (it can throw
exception in several cases such as exception in setter function).

Patch by Peter Rybin <prybin@chromium.org> on 2013-02-07
Reviewed by Pavel Feldman.

Test: inspector-protocol/debugger-setVariableValue.html

* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::setFunctionVariableValue):
(WebCore):
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::setVariableValue):
(WebCore):
* bindings/v8/DebuggerScript.js:
(.):
* bindings/v8/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::setVariableValue):
(WebCore):
* bindings/v8/JavaScriptCallFrame.h:
(JavaScriptCallFrame):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setFunctionVariableValue):
(WebCore):
* bindings/v8/ScriptDebugServer.h:
(ScriptDebugServer):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::setFunctionVariableValueCallback):
(WebCore):
* bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
(WebCore::V8JavaScriptCallFrame::setVariableValueCallback):
(WebCore):
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::setVariableValue):
(WebCore):
* inspector/InjectedScript.h:
(InjectedScript):
* inspector/InjectedScriptHost.idl:
* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::getFunctionDetails):
(WebCore::InspectorDebuggerAgent::setVariableValue):
(WebCore):
* inspector/InspectorDebuggerAgent.h:
(InspectorDebuggerAgent):
* inspector/JavaScriptCallFrame.idl:

LayoutTests:

Patch by Peter Rybin <prybin@chromium.org> on 2013-02-07
Reviewed by Pavel Feldman.

* inspector-protocol/debugger-setVariableValue-expected.txt: Added.
* inspector-protocol/debugger-setVariableValue.html: Added.
* inspector/console/command-line-api-expected.txt:
* platform/chromium/inspector-protocol/debugger-setVariableValue-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed