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

Unified Diff: third_party/WebKit/Source/platform/JSONValuesForV8.cpp

Issue 1638563002: DevTools: migrate ScriptFunctionCall off ScriptValue (to be inlined into the InjectedScript.cpp). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: third_party/WebKit/Source/platform/JSONValuesForV8.cpp
diff --git a/third_party/WebKit/Source/platform/JSONValuesForV8.cpp b/third_party/WebKit/Source/platform/JSONValuesForV8.cpp
index cbbee2c8337375f55f7d9b488b92f0e2ed7a644f..94ded635e57939761eefbcd53aca5b311aef680e 100644
--- a/third_party/WebKit/Source/platform/JSONValuesForV8.cpp
+++ b/third_party/WebKit/Source/platform/JSONValuesForV8.cpp
@@ -15,7 +15,7 @@ static String coreString(v8::Local<v8::String> v8String)
return result;
}
-PassRefPtr<JSONValue> toJSONValue(v8::Isolate* isolate, v8::Local<v8::Value> value, int maxDepth)
+PassRefPtr<JSONValue> toJSONValue(v8::Local<v8::Context> context, v8::Local<v8::Value> value, int maxDepth)
{
if (value.IsEmpty()) {
ASSERT_NOT_REACHED();
@@ -26,7 +26,6 @@ PassRefPtr<JSONValue> toJSONValue(v8::Isolate* isolate, v8::Local<v8::Value> val
return nullptr;
maxDepth--;
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (value->IsNull() || value->IsUndefined())
return JSONValue::null();
if (value->IsBoolean())
@@ -43,7 +42,7 @@ PassRefPtr<JSONValue> toJSONValue(v8::Isolate* isolate, v8::Local<v8::Value> val
v8::Local<v8::Value> value;
if (!array->Get(context, i).ToLocal(&value))
return nullptr;
- RefPtr<JSONValue> element = toJSONValue(isolate, value, maxDepth);
+ RefPtr<JSONValue> element = toJSONValue(context, value, maxDepth);
if (!element)
return nullptr;
inspectorArray->pushValue(element);
@@ -73,7 +72,7 @@ PassRefPtr<JSONValue> toJSONValue(v8::Isolate* isolate, v8::Local<v8::Value> val
v8::Local<v8::Value> property;
if (!object->Get(context, name).ToLocal(&property))
return nullptr;
- RefPtr<JSONValue> propertyValue = toJSONValue(isolate, property, maxDepth);
+ RefPtr<JSONValue> propertyValue = toJSONValue(context, property, maxDepth);
if (!propertyValue)
return nullptr;
jsonObject->setValue(coreString(propertyName), propertyValue);
« no previous file with comments | « third_party/WebKit/Source/platform/JSONValuesForV8.h ('k') | third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698