| Index: Source/core/inspector/InjectedScript.cpp
|
| diff --git a/Source/core/inspector/InjectedScript.cpp b/Source/core/inspector/InjectedScript.cpp
|
| index 3c9e690515316653b67bd7ec9295befda7a01f78..347475b8d05ad7817496c9091fb524683829b307 100644
|
| --- a/Source/core/inspector/InjectedScript.cpp
|
| +++ b/Source/core/inspector/InjectedScript.cpp
|
| @@ -52,14 +52,14 @@ InjectedScript::InjectedScript()
|
| {
|
| }
|
|
|
| -InjectedScript::InjectedScript(ScriptObject injectedScriptObject, InspectedStateAccessCheck accessCheck)
|
| - : InjectedScriptBase("InjectedScript", injectedScriptObject, accessCheck)
|
| +InjectedScript::InjectedScript(ScriptValue injectedScriptValue, InspectedStateAccessCheck accessCheck)
|
| + : InjectedScriptBase("InjectedScript", injectedScriptValue, accessCheck)
|
| {
|
| }
|
|
|
| void InjectedScript::evaluate(ErrorString* errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "evaluate");
|
| + ScriptFunctionCall function(injectedScriptValue(), "evaluate");
|
| function.appendArgument(expression);
|
| function.appendArgument(objectGroup);
|
| function.appendArgument(includeCommandLineAPI);
|
| @@ -70,7 +70,7 @@ void InjectedScript::evaluate(ErrorString* errorString, const String& expression
|
|
|
| void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn");
|
| + ScriptFunctionCall function(injectedScriptValue(), "callFunctionOn");
|
| function.appendArgument(objectId);
|
| function.appendArgument(expression);
|
| function.appendArgument(arguments);
|
| @@ -81,7 +81,7 @@ void InjectedScript::callFunctionOn(ErrorString* errorString, const String& obje
|
|
|
| void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptValue& callFrames, const Vector<ScriptValue>& asyncCallStacks, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, RefPtr<RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "evaluateOnCallFrame");
|
| + ScriptFunctionCall function(injectedScriptValue(), "evaluateOnCallFrame");
|
| function.appendArgument(callFrames);
|
| function.appendArgument(asyncCallStacks);
|
| function.appendArgument(callFrameId);
|
| @@ -95,7 +95,7 @@ void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptV
|
|
|
| void InjectedScript::restartFrame(ErrorString* errorString, const ScriptValue& callFrames, const String& callFrameId, RefPtr<JSONObject>* result)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "restartFrame");
|
| + ScriptFunctionCall function(injectedScriptValue(), "restartFrame");
|
| function.appendArgument(callFrames);
|
| function.appendArgument(callFrameId);
|
| RefPtr<JSONValue> resultValue;
|
| @@ -115,7 +115,7 @@ void InjectedScript::restartFrame(ErrorString* errorString, const ScriptValue& c
|
|
|
| void InjectedScript::getStepInPositions(ErrorString* errorString, const ScriptValue& callFrames, const String& callFrameId, RefPtr<Array<TypeBuilder::Debugger::Location> >& positions)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "getStepInPositions");
|
| + ScriptFunctionCall function(injectedScriptValue(), "getStepInPositions");
|
| function.appendArgument(callFrames);
|
| function.appendArgument(callFrameId);
|
| RefPtr<JSONValue> resultValue;
|
| @@ -135,7 +135,7 @@ void InjectedScript::getStepInPositions(ErrorString* errorString, const ScriptVa
|
|
|
| void InjectedScript::setVariableValue(ErrorString* errorString, const ScriptValue& callFrames, const String* callFrameIdOpt, const String* functionObjectIdOpt, int scopeNumber, const String& variableName, const String& newValueStr)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "setVariableValue");
|
| + ScriptFunctionCall function(injectedScriptValue(), "setVariableValue");
|
| if (callFrameIdOpt) {
|
| function.appendArgument(callFrames);
|
| function.appendArgument(*callFrameIdOpt);
|
| @@ -165,7 +165,7 @@ void InjectedScript::setVariableValue(ErrorString* errorString, const ScriptValu
|
|
|
| void InjectedScript::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<FunctionDetails>* result)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "getFunctionDetails");
|
| + ScriptFunctionCall function(injectedScriptValue(), "getFunctionDetails");
|
| function.appendArgument(functionId);
|
| RefPtr<JSONValue> resultValue;
|
| makeCall(function, &resultValue);
|
| @@ -179,7 +179,7 @@ void InjectedScript::getFunctionDetails(ErrorString* errorString, const String&
|
|
|
| void InjectedScript::getProperties(ErrorString* errorString, const String& objectId, bool ownProperties, bool accessorPropertiesOnly, RefPtr<Array<PropertyDescriptor> >* properties)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "getProperties");
|
| + ScriptFunctionCall function(injectedScriptValue(), "getProperties");
|
| function.appendArgument(objectId);
|
| function.appendArgument(ownProperties);
|
| function.appendArgument(accessorPropertiesOnly);
|
| @@ -195,7 +195,7 @@ void InjectedScript::getProperties(ErrorString* errorString, const String& objec
|
|
|
| void InjectedScript::getInternalProperties(ErrorString* errorString, const String& objectId, RefPtr<Array<InternalPropertyDescriptor> >* properties)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "getInternalProperties");
|
| + ScriptFunctionCall function(injectedScriptValue(), "getInternalProperties");
|
| function.appendArgument(objectId);
|
|
|
| RefPtr<JSONValue> result;
|
| @@ -214,7 +214,7 @@ Node* InjectedScript::nodeForObjectId(const String& objectId)
|
| if (isEmpty() || !canAccessInspectedWindow())
|
| return 0;
|
|
|
| - ScriptFunctionCall function(injectedScriptObject(), "nodeForObjectId");
|
| + ScriptFunctionCall function(injectedScriptValue(), "nodeForObjectId");
|
| function.appendArgument(objectId);
|
|
|
| bool hadException = false;
|
| @@ -226,7 +226,7 @@ Node* InjectedScript::nodeForObjectId(const String& objectId)
|
|
|
| void InjectedScript::releaseObject(const String& objectId)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "releaseObject");
|
| + ScriptFunctionCall function(injectedScriptValue(), "releaseObject");
|
| function.appendArgument(objectId);
|
| RefPtr<JSONValue> result;
|
| makeCall(function, &result);
|
| @@ -235,7 +235,7 @@ void InjectedScript::releaseObject(const String& objectId)
|
| PassRefPtr<Array<CallFrame> > InjectedScript::wrapCallFrames(const ScriptValue& callFrames, int asyncOrdinal)
|
| {
|
| ASSERT(!isEmpty());
|
| - ScriptFunctionCall function(injectedScriptObject(), "wrapCallFrames");
|
| + ScriptFunctionCall function(injectedScriptValue(), "wrapCallFrames");
|
| function.appendArgument(callFrames);
|
| function.appendArgument(asyncOrdinal);
|
| bool hadException = false;
|
| @@ -250,7 +250,7 @@ PassRefPtr<Array<CallFrame> > InjectedScript::wrapCallFrames(const ScriptValue&
|
| PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const ScriptValue& value, const String& groupName, bool generatePreview) const
|
| {
|
| ASSERT(!isEmpty());
|
| - ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapObject");
|
| + ScriptFunctionCall wrapFunction(injectedScriptValue(), "wrapObject");
|
| wrapFunction.appendArgument(value);
|
| wrapFunction.appendArgument(groupName);
|
| wrapFunction.appendArgument(canAccessInspectedWindow());
|
| @@ -266,7 +266,7 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const
|
| PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapTable(const ScriptValue& table, const ScriptValue& columns) const
|
| {
|
| ASSERT(!isEmpty());
|
| - ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapTable");
|
| + ScriptFunctionCall wrapFunction(injectedScriptValue(), "wrapTable");
|
| wrapFunction.appendArgument(canAccessInspectedWindow());
|
| wrapFunction.appendArgument(table);
|
| if (columns.isEmpty())
|
| @@ -289,7 +289,7 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapNode(Node* no
|
| ScriptValue InjectedScript::findObjectById(const String& objectId) const
|
| {
|
| ASSERT(!isEmpty());
|
| - ScriptFunctionCall function(injectedScriptObject(), "findObjectById");
|
| + ScriptFunctionCall function(injectedScriptValue(), "findObjectById");
|
| function.appendArgument(objectId);
|
|
|
| bool hadException = false;
|
| @@ -300,7 +300,7 @@ ScriptValue InjectedScript::findObjectById(const String& objectId) const
|
|
|
| ScriptValue InjectedScript::findCallFrameById(ErrorString* errorString, const ScriptValue& topCallFrame, const String& callFrameId)
|
| {
|
| - ScriptFunctionCall function(injectedScriptObject(), "callFrameForId");
|
| + ScriptFunctionCall function(injectedScriptValue(), "callFrameForId");
|
| function.appendArgument(topCallFrame);
|
| function.appendArgument(callFrameId);
|
| bool hadException = false;
|
| @@ -316,7 +316,7 @@ ScriptValue InjectedScript::findCallFrameById(ErrorString* errorString, const Sc
|
| void InjectedScript::inspectNode(Node* node)
|
| {
|
| ASSERT(!isEmpty());
|
| - ScriptFunctionCall function(injectedScriptObject(), "inspectNode");
|
| + ScriptFunctionCall function(injectedScriptValue(), "inspectNode");
|
| function.appendArgument(nodeAsScriptValue(node));
|
| RefPtr<JSONValue> result;
|
| makeCall(function, &result);
|
| @@ -325,7 +325,7 @@ void InjectedScript::inspectNode(Node* node)
|
| void InjectedScript::releaseObjectGroup(const String& objectGroup)
|
| {
|
| ASSERT(!isEmpty());
|
| - ScriptFunctionCall releaseFunction(injectedScriptObject(), "releaseObjectGroup");
|
| + ScriptFunctionCall releaseFunction(injectedScriptValue(), "releaseObjectGroup");
|
| releaseFunction.appendArgument(objectGroup);
|
| bool hadException = false;
|
| callFunctionWithEvalEnabled(releaseFunction, hadException);
|
|
|