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

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

Issue 1020233002: [bindings] [devtools] Migrate the usage of ScriptValue.toJSONValue() to ScriptValue::to<JSONValuePt… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 years, 9 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/InjectedScript.cpp
diff --git a/Source/core/inspector/InjectedScript.cpp b/Source/core/inspector/InjectedScript.cpp
index 8916b46ba5eb2b7cae9796a436ae299c4067ef7e..d3191984f52a56d211456af04daf61352165009c 100644
--- a/Source/core/inspector/InjectedScript.cpp
+++ b/Source/core/inspector/InjectedScript.cpp
@@ -280,7 +280,7 @@ PassRefPtr<Array<CallFrame> > InjectedScript::wrapCallFrames(const ScriptValue&
bool hadException = false;
ScriptValue callFramesValue = callFunctionWithEvalEnabled(function, hadException);
ASSERT(!hadException);
- RefPtr<JSONValue> result = callFramesValue.toJSONValue(scriptState());
+ RefPtr<JSONValue> result = toJSONValue(callFramesValue);
if (result && result->type() == JSONValue::TypeArray)
return Array<CallFrame>::runtimeCast(result);
return Array<CallFrame>::create();
@@ -298,7 +298,7 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const
ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
if (hadException)
return nullptr;
- RefPtr<JSONObject> rawResult = r.toJSONValue(scriptState())->asObject();
+ RefPtr<JSONObject> rawResult = toJSONValue(r)->asObject();
return TypeBuilder::Runtime::RemoteObject::runtimeCast(rawResult);
}
@@ -316,7 +316,7 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapTable(const S
ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
if (hadException)
return nullptr;
- RefPtr<JSONObject> rawResult = r.toJSONValue(scriptState())->asObject();
+ RefPtr<JSONObject> rawResult = toJSONValue(r)->asObject();
return TypeBuilder::Runtime::RemoteObject::runtimeCast(rawResult);
}
« no previous file with comments | « Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp ('k') | Source/core/inspector/InjectedScriptBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698