Title: [92377] trunk/Source/WebCore
Revision
92377
Author
[email protected]
Date
2011-08-04 09:09:00 -0700 (Thu, 04 Aug 2011)

Log Message

Web Inspector: rename sendResultByValue to returnByValue in Runtime agent.
https://bugs.webkit.org/show_bug.cgi?id=65687

Reviewed by Yury Semikhatsky.

* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::evaluate):
(WebCore::InjectedScript::callFunctionOn):
* inspector/InjectedScript.h:
* inspector/InjectedScriptSource.js:
* inspector/Inspector.json:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):
* inspector/InspectorRuntimeAgent.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92376 => 92377)


--- trunk/Source/WebCore/ChangeLog	2011-08-04 15:41:49 UTC (rev 92376)
+++ trunk/Source/WebCore/ChangeLog	2011-08-04 16:09:00 UTC (rev 92377)
@@ -1,3 +1,21 @@
+2011-08-04  Pavel Feldman  <[email protected]>
+
+        Web Inspector: rename sendResultByValue to returnByValue in Runtime agent.
+        https://bugs.webkit.org/show_bug.cgi?id=65687
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/InjectedScript.cpp:
+        (WebCore::InjectedScript::evaluate):
+        (WebCore::InjectedScript::callFunctionOn):
+        * inspector/InjectedScript.h:
+        * inspector/InjectedScriptSource.js:
+        * inspector/Inspector.json:
+        * inspector/InspectorRuntimeAgent.cpp:
+        (WebCore::InspectorRuntimeAgent::evaluate):
+        (WebCore::InspectorRuntimeAgent::callFunctionOn):
+        * inspector/InspectorRuntimeAgent.h:
+
 2011-08-04  Matt Falkenhagen  <[email protected]>
 
         Use -webkit-locale for font selection.

Modified: trunk/Source/WebCore/inspector/InjectedScript.cpp (92376 => 92377)


--- trunk/Source/WebCore/inspector/InjectedScript.cpp	2011-08-04 15:41:49 UTC (rev 92376)
+++ trunk/Source/WebCore/inspector/InjectedScript.cpp	2011-08-04 16:09:00 UTC (rev 92377)
@@ -54,23 +54,23 @@
 {
 }
 
-void InjectedScript::evaluate(ErrorString* errorString, const String& _expression_, const String& objectGroup, bool includeCommandLineAPI, bool sendResultByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
+void InjectedScript::evaluate(ErrorString* errorString, const String& _expression_, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
 {
     ScriptFunctionCall function(m_injectedScriptObject, "evaluate");
     function.appendArgument(_expression_);
     function.appendArgument(objectGroup);
     function.appendArgument(includeCommandLineAPI);
-    function.appendArgument(sendResultByValue);
+    function.appendArgument(returnByValue);
     makeEvalCall(errorString, function, result, wasThrown);
 }
 
-void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& _expression_, const String& arguments, bool sendResultByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
+void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& _expression_, const String& arguments, bool returnByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
 {
     ScriptFunctionCall function(m_injectedScriptObject, "callFunctionOn");
     function.appendArgument(objectId);
     function.appendArgument(_expression_);
     function.appendArgument(arguments);
-    function.appendArgument(sendResultByValue);
+    function.appendArgument(returnByValue);
     makeEvalCall(errorString, function, result, wasThrown);
 }
 

Modified: trunk/Source/WebCore/inspector/InjectedScript.h (92376 => 92377)


--- trunk/Source/WebCore/inspector/InjectedScript.h	2011-08-04 15:41:49 UTC (rev 92376)
+++ trunk/Source/WebCore/inspector/InjectedScript.h	2011-08-04 16:09:00 UTC (rev 92377)
@@ -59,14 +59,14 @@
                   const String& _expression_,
                   const String& objectGroup,
                   bool includeCommandLineAPI,
-                  bool sendResultByValue,
+                  bool returnByValue,
                   RefPtr<InspectorObject>* result,
                   bool* wasThrown);
     void callFunctionOn(ErrorString*,
                         const String& objectId,
                         const String& _expression_,
                         const String& arguments,
-                        bool sendResultByValue,
+                        bool returnByValue,
                         RefPtr<InspectorObject>* result,
                         bool* wasThrown);
     void evaluateOnCallFrame(ErrorString*, const ScriptValue& callFrames, const String& callFrameId, const String& _expression_, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorObject>* result, bool* wasThrown);

Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (92376 => 92377)


--- trunk/Source/WebCore/inspector/InjectedScriptSource.js	2011-08-04 15:41:49 UTC (rev 92376)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js	2011-08-04 16:09:00 UTC (rev 92377)
@@ -246,12 +246,12 @@
         return Object.keys(propertyNameSet);
     },
 
-    evaluate: function(_expression_, objectGroup, injectCommandLineAPI, sendResultByValue)
+    evaluate: function(_expression_, objectGroup, injectCommandLineAPI, returnByValue)
     {
-        return this._evaluateAndWrap(InjectedScriptHost.evaluate, InjectedScriptHost, _expression_, objectGroup, false, injectCommandLineAPI, sendResultByValue);
+        return this._evaluateAndWrap(InjectedScriptHost.evaluate, InjectedScriptHost, _expression_, objectGroup, false, injectCommandLineAPI, returnByValue);
     },
 
-    callFunctionOn: function(objectId, _expression_, args, sendResultByValue)
+    callFunctionOn: function(objectId, _expression_, args, returnByValue)
     {
         var parsedObjectId = this._parseObjectId(objectId);
         var object = this._objectForId(parsedObjectId);
@@ -287,18 +287,18 @@
                 return "Given _expression_ does not evaluate to a function";
 
             return { wasThrown: false,
-                     result: this._wrapObject(func.apply(object, resolvedArgs), objectGroup, sendResultByValue) };
+                     result: this._wrapObject(func.apply(object, resolvedArgs), objectGroup, returnByValue) };
         } catch (e) {
             return { wasThrown: true,
                      result: this._wrapObject(e, objectGroup) };
         }
     },
 
-    _evaluateAndWrap: function(evalFunction, object, _expression_, objectGroup, isEvalOnCallFrame, injectCommandLineAPI, sendResultByValue)
+    _evaluateAndWrap: function(evalFunction, object, _expression_, objectGroup, isEvalOnCallFrame, injectCommandLineAPI, returnByValue)
     {
         try {
             return { wasThrown: false,
-                     result: this._wrapObject(this._evaluateOn(evalFunction, object, _expression_, isEvalOnCallFrame, injectCommandLineAPI), objectGroup, sendResultByValue) };
+                     result: this._wrapObject(this._evaluateOn(evalFunction, object, _expression_, isEvalOnCallFrame, injectCommandLineAPI), objectGroup, returnByValue) };
         } catch (e) {
             return { wasThrown: true,
                      result: this._wrapObject(e, objectGroup) };

Modified: trunk/Source/WebCore/inspector/Inspector.json (92376 => 92377)


--- trunk/Source/WebCore/inspector/Inspector.json	2011-08-04 15:41:49 UTC (rev 92376)
+++ trunk/Source/WebCore/inspector/Inspector.json	2011-08-04 16:09:00 UTC (rev 92377)
@@ -264,7 +264,7 @@
                     { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." },
                     { "name": "doNotPauseOnExceptions", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions. Overrides setPauseOnException state." },
                     { "name": "frameId", "type": "string", "optional": true, "description": "Specifies in which frame to perform evaluation." },
-                    { "name": "sendResultByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }
+                    { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }
                 ],
                 "returns": [
                     { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." },
@@ -278,7 +278,7 @@
                     { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." },
                     { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
                     { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same _javascript_ world as the target object." },
-                    { "name": "sendResultByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }
+                    { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }
                 ],
                 "returns": [
                     { "name": "result", "$ref": "RemoteObject", "description": "Call result." },

Modified: trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp (92376 => 92377)


--- trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp	2011-08-04 15:41:49 UTC (rev 92376)
+++ trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp	2011-08-04 16:09:00 UTC (rev 92377)
@@ -62,7 +62,7 @@
 {
 }
 
-void InspectorRuntimeAgent::evaluate(ErrorString* errorString, const String& _expression_, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptions, const String* const frameId, const bool* const sendResultByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
+void InspectorRuntimeAgent::evaluate(ErrorString* errorString, const String& _expression_, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptions, const String* const frameId, const bool* const returnByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
 {
     ScriptState* scriptState = 0;
     if (frameId) {
@@ -88,7 +88,7 @@
     }
 #endif
 
-    injectedScript.evaluate(errorString, _expression_, objectGroup ? *objectGroup : "", asBool(includeCommandLineAPI), asBool(sendResultByValue), result, wasThrown);
+    injectedScript.evaluate(errorString, _expression_, objectGroup ? *objectGroup : "", asBool(includeCommandLineAPI), asBool(returnByValue), result, wasThrown);
 
 #if ENABLE(_javascript__DEBUGGER)
     if (pauseStateChanged)
@@ -96,7 +96,7 @@
 #endif
 }
 
-void InspectorRuntimeAgent::callFunctionOn(ErrorString* errorString, const String& objectId, const String& _expression_, const RefPtr<InspectorArray>* const optionalArguments, const bool* const sendResultByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
+void InspectorRuntimeAgent::callFunctionOn(ErrorString* errorString, const String& objectId, const String& _expression_, const RefPtr<InspectorArray>* const optionalArguments, const bool* const returnByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
 {
     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);
     if (injectedScript.hasNoValue()) {
@@ -106,7 +106,7 @@
     String arguments;
     if (optionalArguments)
         arguments = (*optionalArguments)->toJSONString();
-    injectedScript.callFunctionOn(errorString, objectId, _expression_, arguments, asBool(sendResultByValue), result, wasThrown);
+    injectedScript.callFunctionOn(errorString, objectId, _expression_, arguments, asBool(returnByValue), result, wasThrown);
 }
 
 void InspectorRuntimeAgent::getProperties(ErrorString* errorString, const String& objectId, bool ignoreHasOwnProperty, RefPtr<InspectorArray>* result)

Modified: trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h (92376 => 92377)


--- trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h	2011-08-04 15:41:49 UTC (rev 92376)
+++ trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h	2011-08-04 16:09:00 UTC (rev 92377)
@@ -59,14 +59,14 @@
                   const bool* const includeCommandLineAPI,
                   const bool* const doNotPauseOnExceptions,
                   const String* const frameId,
-                  const bool* const sendResultByValue,
+                  const bool* const returnByValue,
                   RefPtr<InspectorObject>* result,
                   bool* wasThrown);
     void callFunctionOn(ErrorString*,
                         const String& objectId,
                         const String& _expression_,
                         const RefPtr<InspectorArray>* const optionalArguments,
-                        const bool* const sendResultByValue,
+                        const bool* const returnByValue,
                         RefPtr<InspectorObject>* result,
                         bool* wasThrown);
     void releaseObject(ErrorString*, const String& objectId);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to