Changeset 142888 in webkit


Ignore:
Timestamp:
Feb 14, 2013, 9:52:04 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: fix closure compilation warnings caused by setVariableValue change
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):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142887 r142888  
     12013-02-14  Peter Rybin  <prybin@chromium.org>
     2
     3        Web Inspector: fix closure compilation warnings caused by setVariableValue change
     4        https://bugs.webkit.org/show_bug.cgi?id=109488
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Annotations are fixed as required by closure compiler.
     9        Parameters in Inspector.json are reordered as required.
     10
     11        * inspector/InjectedScriptExterns.js:
     12        (InjectedScriptHost.prototype.setFunctionVariableValue):
     13        (JavaScriptCallFrame.prototype.setVariableValue):
     14        * inspector/InjectedScriptSource.js:
     15        (.):
     16        * inspector/Inspector.json:
     17        * inspector/InspectorDebuggerAgent.cpp:
     18        (WebCore::InspectorDebuggerAgent::setVariableValue):
     19        * inspector/InspectorDebuggerAgent.h:
     20        (InspectorDebuggerAgent):
     21
    1222013-02-14  Tommy Widenflycht  <tommyw@google.com>
    223
  • trunk/Source/WebCore/inspector/InjectedScriptExterns.js

    r130518 r142888  
    8383InjectedScriptHost.prototype.evaluate = function(expression) { }
    8484
     85/**
     86 * @param {function(...)} fun
     87 * @param {number} scopeNumber
     88 * @param {string} variableName
     89 * @param {*} newValue
     90 */
     91InjectedScriptHost.prototype.setFunctionVariableValue = function(fun, scopeNumber, variableName, newValue) {}
     92
    8593
    8694/**
     
    105113
    106114JavaScriptCallFrame.prototype.restart = function() { }
     115
     116/**
     117 * @param {number} scopeNumber
     118 * @param {string} variableName
     119 * @param {*} newValue
     120 */
     121JavaScriptCallFrame.prototype.setVariableValue = function(scopeNumber, variableName, newValue) {}
    107122
    108123/**
  • trunk/Source/WebCore/inspector/InjectedScriptSource.js

    r142114 r142888  
    597597     * @param {string|boolean} callFrameId or false
    598598     * @param {string|boolean} functionObjectId or false
    599      * @param {integer} scopeNumber
     599     * @param {number} scopeNumber
    600600     * @param {string} variableName
    601601     * @param {string} newValueJsonString RuntimeAgent.CallArgument structure serialized as string
     
    606606        var setter;
    607607        if (callFrameId) {
    608             var callFrame = this._callFrameForId(topCallFrame, callFrameId);
     608            var callFrame = this._callFrameForId(topCallFrame, String(callFrameId));
    609609            if (!callFrame)
    610610                return "Could not find call frame with given id";
    611611            setter = callFrame.setVariableValue.bind(callFrame);   
    612612        } else {
    613             var parsedFunctionId = this._parseObjectId(functionObjectId);
     613            var parsedFunctionId = this._parseObjectId(String(functionObjectId));
    614614            var func = this._objectForId(parsedFunctionId);
    615615            if (typeof func !== "function")
  • trunk/Source/WebCore/inspector/Inspector.json

    r142746 r142888  
    29502950                "name": "setVariableValue",
    29512951                "parameters": [
    2952                     { "name": "callFrameId", "$ref": "CallFrameId", "optional": true, "description": "Id of callframe that holds variable." },
    2953                     { "name": "functionObjectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Object id of closure (function) that holds variable." },
    29542952                    { "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." },
    29552953                    { "name": "variableName", "type": "string", "description": "Variable name." },
    2956                     { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." }
     2954                    { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." },
     2955                    { "name": "callFrameId", "$ref": "CallFrameId", "optional": true, "description": "Id of callframe that holds variable." },
     2956                    { "name": "functionObjectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Object id of closure (function) that holds variable." }
    29572957                ],
    29582958                "hidden": true,
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r142114 r142888  
    581581}
    582582
    583 void InspectorDebuggerAgent::setVariableValue(ErrorString* errorString, const String* callFrameId, const String* functionObjectId, int scopeNumber, const String& variableName, const RefPtr<InspectorObject>& newValue)
     583void InspectorDebuggerAgent::setVariableValue(ErrorString* errorString, int scopeNumber, const String& variableName, const RefPtr<InspectorObject>& newValue, const String* callFrameId, const String* functionObjectId)
    584584{
    585585    InjectedScript injectedScript;
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r142114 r142888  
    114114    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);
    115115    virtual void setOverlayMessage(ErrorString*, const String*);
    116     virtual void setVariableValue(ErrorString*, const String* in_callFrame, const String* in_functionObjectId, int in_scopeNumber, const String& in_variableName, const RefPtr<InspectorObject>& in_newValue);
     116    virtual void setVariableValue(ErrorString*, int in_scopeNumber, const String& in_variableName, const RefPtr<InspectorObject>& in_newValue, const String* in_callFrame, const String* in_functionObjectId);
    117117
    118118    void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<InspectorObject> data);
Note: See TracChangeset for help on using the changeset viewer.