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

Unified Diff: Source/bindings/core/v8/V8Binding.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
« no previous file with comments | « Source/bindings/core/v8/V8Binding.h ('k') | Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8Binding.cpp
diff --git a/Source/bindings/core/v8/V8Binding.cpp b/Source/bindings/core/v8/V8Binding.cpp
index e5377e7df74ea72b9e5e176c68cb269760939287..68c856af103c17f42bab7f6fe9513dad57e7149d 100644
--- a/Source/bindings/core/v8/V8Binding.cpp
+++ b/Source/bindings/core/v8/V8Binding.cpp
@@ -835,7 +835,7 @@ v8::Isolate* toIsolate(LocalFrame* frame)
return frame->script().isolate();
}
-PassRefPtr<JSONValue> v8ToJSONValue(v8::Isolate* isolate, v8::Handle<v8::Value> value, int maxDepth)
+JSONValuePtr NativeValueTraits<JSONValuePtr>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState, int maxDepth)
{
if (value.IsEmpty()) {
ASSERT_NOT_REACHED();
@@ -860,7 +860,7 @@ PassRefPtr<JSONValue> v8ToJSONValue(v8::Isolate* isolate, v8::Handle<v8::Value>
uint32_t length = array->Length();
for (uint32_t i = 0; i < length; i++) {
v8::Local<v8::Value> value = array->Get(v8::Int32::New(isolate, i));
- RefPtr<JSONValue> element = v8ToJSONValue(isolate, value, maxDepth);
+ RefPtr<JSONValue> element = nativeValue(isolate, value, exceptionState, maxDepth);
if (!element)
return nullptr;
inspectorArray->pushValue(element);
@@ -879,7 +879,7 @@ PassRefPtr<JSONValue> v8ToJSONValue(v8::Isolate* isolate, v8::Handle<v8::Value>
// FIXME(yurys): v8::Object should support GetOwnPropertyNames
if (name->IsString() && !object->HasRealNamedProperty(v8::Handle<v8::String>::Cast(name)))
continue;
- RefPtr<JSONValue> propertyValue = v8ToJSONValue(isolate, object->Get(name), maxDepth);
+ RefPtr<JSONValue> propertyValue = nativeValue(isolate, object->Get(name), exceptionState, maxDepth);
if (!propertyValue)
return nullptr;
TOSTRING_DEFAULT(V8StringResource<TreatNullAsNullString>, nameString, name, nullptr);
« no previous file with comments | « Source/bindings/core/v8/V8Binding.h ('k') | Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698