Title: [142888] trunk/Source/WebCore
Revision
142888
Author
commit-qu...@webkit.org
Date
2013-02-14 09:52:04 -0800 (Thu, 14 Feb 2013)

Log Message

Web Inspector: fix closure compilation warnings caused by setVariableValue change
https://bugs.webkit.org/show_bug.cgi?id=109488

Patch by Peter Rybin <pry...@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):
(_javascript_CallFrame.prototype.setVariableValue):
* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setVariableValue):
* inspector/InspectorDebuggerAgent.h:
(InspectorDebuggerAgent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (142887 => 142888)


--- trunk/Source/WebCore/ChangeLog	2013-02-14 17:47:36 UTC (rev 142887)
+++ trunk/Source/WebCore/ChangeLog	2013-02-14 17:52:04 UTC (rev 142888)
@@ -1,3 +1,24 @@
+2013-02-14  Peter Rybin  <pry...@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):
+        (_javascript_CallFrame.prototype.setVariableValue):
+        * inspector/InjectedScriptSource.js:
+        (.):
+        * inspector/Inspector.json:
+        * inspector/InspectorDebuggerAgent.cpp:
+        (WebCore::InspectorDebuggerAgent::setVariableValue):
+        * inspector/InspectorDebuggerAgent.h:
+        (InspectorDebuggerAgent):
+
 2013-02-14  Tommy Widenflycht  <tom...@google.com>
 
         MediaStream API: RTCDataChannel triggers a use-after-free

Modified: trunk/Source/WebCore/inspector/InjectedScriptExterns.js (142887 => 142888)


--- trunk/Source/WebCore/inspector/InjectedScriptExterns.js	2013-02-14 17:47:36 UTC (rev 142887)
+++ trunk/Source/WebCore/inspector/InjectedScriptExterns.js	2013-02-14 17:52:04 UTC (rev 142888)
@@ -82,7 +82,15 @@
  */
 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
  */
@@ -106,6 +114,13 @@
 _javascript_CallFrame.prototype.restart = function() { }
 
 /**
+ * @param {number} scopeNumber
+ * @param {string} variableName
+ * @param {*} newValue
+ */
+_javascript_CallFrame.prototype.setVariableValue = function(scopeNumber, variableName, newValue) {}
+
+/**
  * @constructor
  */
 function _javascript_Function()

Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (142887 => 142888)


--- trunk/Source/WebCore/inspector/InjectedScriptSource.js	2013-02-14 17:47:36 UTC (rev 142887)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js	2013-02-14 17:52:04 UTC (rev 142888)
@@ -596,7 +596,7 @@
      * @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 
@@ -605,12 +605,12 @@
     {   
         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.";

Modified: trunk/Source/WebCore/inspector/Inspector.json (142887 => 142888)


--- trunk/Source/WebCore/inspector/Inspector.json	2013-02-14 17:47:36 UTC (rev 142887)
+++ trunk/Source/WebCore/inspector/Inspector.json	2013-02-14 17:52:04 UTC (rev 142888)
@@ -2949,11 +2949,11 @@
             {
                 "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."

Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp (142887 => 142888)


--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp	2013-02-14 17:47:36 UTC (rev 142887)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp	2013-02-14 17:52:04 UTC (rev 142888)
@@ -580,7 +580,7 @@
 {
 }
 
-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) {

Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h (142887 => 142888)


--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h	2013-02-14 17:47:36 UTC (rev 142887)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h	2013-02-14 17:52:04 UTC (rev 142888)
@@ -113,7 +113,7 @@
     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();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to