Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: Source/core/inspector/InjectedScriptCanvasModule.cpp

Issue 293963003: Remove ScriptObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InjectedScriptCanvasModule.cpp
diff --git a/Source/core/inspector/InjectedScriptCanvasModule.cpp b/Source/core/inspector/InjectedScriptCanvasModule.cpp
index a844a10091d7855c2ae97f6f03be35e7e10dea0b..1c185c917f1dcbae29c28345f1ee2f135dcab2fc 100644
--- a/Source/core/inspector/InjectedScriptCanvasModule.cpp
+++ b/Source/core/inspector/InjectedScriptCanvasModule.cpp
@@ -33,7 +33,7 @@
#include "InjectedScriptCanvasModuleSource.h"
#include "bindings/v8/ScriptFunctionCall.h"
-#include "bindings/v8/ScriptObject.h"
+#include "bindings/v8/ScriptValue.h"
using WebCore::TypeBuilder::Array;
using WebCore::TypeBuilder::Canvas::ResourceId;
@@ -61,32 +61,32 @@ String InjectedScriptCanvasModule::source() const
return String(reinterpret_cast<const char*>(InjectedScriptCanvasModuleSource_js), sizeof(InjectedScriptCanvasModuleSource_js));
}
-ScriptObject InjectedScriptCanvasModule::wrapCanvas2DContext(const ScriptObject& context)
+ScriptValue InjectedScriptCanvasModule::wrapCanvas2DContext(const ScriptValue& context)
{
return callWrapContextFunction("wrapCanvas2DContext", context);
}
-ScriptObject InjectedScriptCanvasModule::wrapWebGLContext(const ScriptObject& glContext)
+ScriptValue InjectedScriptCanvasModule::wrapWebGLContext(const ScriptValue& glContext)
{
return callWrapContextFunction("wrapWebGLContext", glContext);
}
-ScriptObject InjectedScriptCanvasModule::callWrapContextFunction(const String& functionName, const ScriptObject& context)
+ScriptValue InjectedScriptCanvasModule::callWrapContextFunction(const String& functionName, const ScriptValue& context)
{
- ScriptFunctionCall function(injectedScriptObject(), functionName);
+ ScriptFunctionCall function(injectedScriptValue(), functionName);
function.appendArgument(context);
bool hadException = false;
ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
if (hadException || resultValue.isEmpty() || !resultValue.isObject()) {
ASSERT_NOT_REACHED();
- return ScriptObject();
+ return ScriptValue();
}
- return ScriptObject(context.scriptState(), resultValue);
+ return resultValue;
}
void InjectedScriptCanvasModule::markFrameEnd()
{
- ScriptFunctionCall function(injectedScriptObject(), "markFrameEnd");
+ ScriptFunctionCall function(injectedScriptValue(), "markFrameEnd");
RefPtr<JSONValue> resultValue;
makeCall(function, &resultValue);
ASSERT(resultValue);
@@ -104,7 +104,7 @@ void InjectedScriptCanvasModule::startCapturing(ErrorString* errorString, TraceL
void InjectedScriptCanvasModule::callStartCapturingFunction(const String& functionName, ErrorString* errorString, TraceLogId* traceLogId)
{
- ScriptFunctionCall function(injectedScriptObject(), functionName);
+ ScriptFunctionCall function(injectedScriptValue(), functionName);
RefPtr<JSONValue> resultValue;
makeCall(function, &resultValue);
if (!resultValue || resultValue->type() != JSONValue::TypeString || !resultValue->asString(traceLogId))
@@ -123,7 +123,7 @@ void InjectedScriptCanvasModule::dropTraceLog(ErrorString* errorString, const Tr
void InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument(const String& functionName, ErrorString* errorString, const TraceLogId& traceLogId)
{
- ScriptFunctionCall function(injectedScriptObject(), functionName);
+ ScriptFunctionCall function(injectedScriptValue(), functionName);
function.appendArgument(traceLogId);
bool hadException = false;
callFunctionWithEvalEnabled(function, hadException);
@@ -134,7 +134,7 @@ void InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument(const St
void InjectedScriptCanvasModule::traceLog(ErrorString* errorString, const TraceLogId& traceLogId, const int* startOffset, const int* maxLength, RefPtr<TraceLog>* traceLog)
{
- ScriptFunctionCall function(injectedScriptObject(), "traceLog");
+ ScriptFunctionCall function(injectedScriptValue(), "traceLog");
function.appendArgument(traceLogId);
if (startOffset)
function.appendArgument(*startOffset);
@@ -152,7 +152,7 @@ void InjectedScriptCanvasModule::traceLog(ErrorString* errorString, const TraceL
void InjectedScriptCanvasModule::replayTraceLog(ErrorString* errorString, const TraceLogId& traceLogId, int stepNo, RefPtr<ResourceState>* result, double* replayTime)
{
- ScriptFunctionCall function(injectedScriptObject(), "replayTraceLog");
+ ScriptFunctionCall function(injectedScriptValue(), "replayTraceLog");
function.appendArgument(traceLogId);
function.appendArgument(stepNo);
RefPtr<JSONValue> resultValue;
@@ -175,7 +175,7 @@ void InjectedScriptCanvasModule::replayTraceLog(ErrorString* errorString, const
void InjectedScriptCanvasModule::resourceState(ErrorString* errorString, const TraceLogId& traceLogId, const ResourceId& resourceId, RefPtr<ResourceState>* result)
{
- ScriptFunctionCall function(injectedScriptObject(), "resourceState");
+ ScriptFunctionCall function(injectedScriptValue(), "resourceState");
function.appendArgument(traceLogId);
function.appendArgument(resourceId);
RefPtr<JSONValue> resultValue;
@@ -190,7 +190,7 @@ void InjectedScriptCanvasModule::resourceState(ErrorString* errorString, const T
void InjectedScriptCanvasModule::evaluateTraceLogCallArgument(ErrorString* errorString, const TraceLogId& traceLogId, int callIndex, int argumentIndex, const String& objectGroup, RefPtr<RemoteObject>* result, RefPtr<ResourceState>* resourceState)
{
- ScriptFunctionCall function(injectedScriptObject(), "evaluateTraceLogCallArgument");
+ ScriptFunctionCall function(injectedScriptValue(), "evaluateTraceLogCallArgument");
function.appendArgument(traceLogId);
function.appendArgument(callIndex);
function.appendArgument(argumentIndex);

Powered by Google App Engine
This is Rietveld 408576698