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

Unified Diff: Source/bindings/dart/V8Converter.cpp

Issue 27767003: Convert serialized values to ints if they are whole and less than 53 bits. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 7 years, 2 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/dart/DartUtilities.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/V8Converter.cpp
diff --git a/Source/bindings/dart/V8Converter.cpp b/Source/bindings/dart/V8Converter.cpp
index 6918c385f3dd26f91a4645d0b493000237720ded..f9c9d2aaf4d576a4c3b4d649804bcbe9c1c7cec4 100644
--- a/Source/bindings/dart/V8Converter.cpp
+++ b/Source/bindings/dart/V8Converter.cpp
@@ -170,12 +170,10 @@ Dart_Handle V8Converter::toDart(v8::Handle<v8::Value> value, V8ToDartMap& map, D
return Dart_Null();
if (value->IsString())
return map.put(value, stringToDart(value));
- if (value->IsInt32())
- return Dart_NewInteger(value->Int32Value());
+ if (value->IsNumber())
+ return DartUtilities::numberToDart(value->NumberValue());
if (value->IsBoolean())
return Dart_NewBoolean(value->BooleanValue());
- if (value->IsNumber())
- return Dart_NewDouble(value->NumberValue());
if (value->IsArray())
return listToDart(value.As<v8::Array>(), map, exception);
if (value->IsDate())
« no previous file with comments | « Source/bindings/dart/DartUtilities.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698