https://bugs.webkit.org/show_bug.cgi?id=109488
Patch by Peter Rybin <prybin@chromium.org> on 2013-02-14
Reviewed by Pavel Feldman.
Annotations are fixed as required by closure compiler.
Parameters in Inspector.json are reordered as required.
* inspector/InjectedScriptExterns.js:
(InjectedScriptHost.prototype.setFunctionVariableValue):
(JavaScriptCallFrame.prototype.setVariableValue):
* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setVariableValue):
* inspector/InspectorDebuggerAgent.h:
(InspectorDebuggerAgent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142888
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-02-14 Peter Rybin <prybin@chromium.org>
+
+ Web Inspector: fix closure compilation warnings caused by setVariableValue change
+ https://bugs.webkit.org/show_bug.cgi?id=109488
+
+ Reviewed by Pavel Feldman.
+
+ Annotations are fixed as required by closure compiler.
+ Parameters in Inspector.json are reordered as required.
+
+ * inspector/InjectedScriptExterns.js:
+ (InjectedScriptHost.prototype.setFunctionVariableValue):
+ (JavaScriptCallFrame.prototype.setVariableValue):
+ * inspector/InjectedScriptSource.js:
+ (.):
+ * inspector/Inspector.json:
+ * inspector/InspectorDebuggerAgent.cpp:
+ (WebCore::InspectorDebuggerAgent::setVariableValue):
+ * inspector/InspectorDebuggerAgent.h:
+ (InspectorDebuggerAgent):
+
2013-02-14 Tommy Widenflycht <tommyw@google.com>
MediaStream API: RTCDataChannel triggers a use-after-free
*/
InjectedScriptHost.prototype.evaluate = function(expression) { }
+/**
+ * @param {function(...)} fun
+ * @param {number} scopeNumber
+ * @param {string} variableName
+ * @param {*} newValue
+ */
+InjectedScriptHost.prototype.setFunctionVariableValue = function(fun, scopeNumber, variableName, newValue) {}
+
/**
* @constructor
JavaScriptCallFrame.prototype.restart = function() { }
+/**
+ * @param {number} scopeNumber
+ * @param {string} variableName
+ * @param {*} newValue
+ */
+JavaScriptCallFrame.prototype.setVariableValue = function(scopeNumber, variableName, newValue) {}
+
/**
* @constructor
*/
* @param {Object} topCallFrame
* @param {string|boolean} callFrameId or false
* @param {string|boolean} functionObjectId or false
- * @param {integer} scopeNumber
+ * @param {number} scopeNumber
* @param {string} variableName
* @param {string} newValueJsonString RuntimeAgent.CallArgument structure serialized as string
* @return {string|undefined} undefined if success or an error message
{
var setter;
if (callFrameId) {
- var callFrame = this._callFrameForId(topCallFrame, callFrameId);
+ var callFrame = this._callFrameForId(topCallFrame, String(callFrameId));
if (!callFrame)
return "Could not find call frame with given id";
setter = callFrame.setVariableValue.bind(callFrame);
} else {
- var parsedFunctionId = this._parseObjectId(functionObjectId);
+ var parsedFunctionId = this._parseObjectId(String(functionObjectId));
var func = this._objectForId(parsedFunctionId);
if (typeof func !== "function")
return "Cannot resolve function by id.";
{
"name": "setVariableValue",
"parameters": [
- { "name": "callFrameId", "$ref": "CallFrameId", "optional": true, "description": "Id of callframe that holds variable." },
- { "name": "functionObjectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Object id of closure (function) that holds variable." },
{ "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." },
{ "name": "variableName", "type": "string", "description": "Variable name." },
- { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." }
+ { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." },
+ { "name": "callFrameId", "$ref": "CallFrameId", "optional": true, "description": "Id of callframe that holds variable." },
+ { "name": "functionObjectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Object id of closure (function) that holds variable." }
],
"hidden": true,
"description": "Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually."
{
}
-void InspectorDebuggerAgent::setVariableValue(ErrorString* errorString, const String* callFrameId, const String* functionObjectId, int scopeNumber, const String& variableName, const RefPtr<InspectorObject>& newValue)
+void InspectorDebuggerAgent::setVariableValue(ErrorString* errorString, int scopeNumber, const String& variableName, const RefPtr<InspectorObject>& newValue, const String* callFrameId, const String* functionObjectId)
{
InjectedScript injectedScript;
if (callFrameId) {
void compileScript(ErrorString*, const String& expression, const String& sourceURL, TypeBuilder::OptOutput<TypeBuilder::Debugger::ScriptId>*, TypeBuilder::OptOutput<String>* syntaxErrorMessage);
void runScript(ErrorString*, const TypeBuilder::Debugger::ScriptId&, const int* executionContextId, const String* objectGroup, const bool* doNotPauseOnExceptionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown);
virtual void setOverlayMessage(ErrorString*, const String*);
- virtual void setVariableValue(ErrorString*, const String* in_callFrame, const String* in_functionObjectId, int in_scopeNumber, const String& in_variableName, const RefPtr<InspectorObject>& in_newValue);
+ virtual void setVariableValue(ErrorString*, int in_scopeNumber, const String& in_variableName, const RefPtr<InspectorObject>& in_newValue, const String* in_callFrame, const String* in_functionObjectId);
void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<InspectorObject> data);
void cancelPauseOnNextStatement();