Fix an implicit cast from int64 to double in the i18n extension
authorjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 8 Jul 2013 15:22:12 +0000 (15:22 +0000)
committerjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 8 Jul 2013 15:22:12 +0000 (15:22 +0000)
On MSVS, this throws an error

BUG=v8:2745
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/18854002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/extensions/i18n/number-format.cc

index 2240b08..1364715 100644 (file)
@@ -148,10 +148,10 @@ void NumberFormat::JSInternalParse(
     args.GetReturnValue().Set(result.getDouble());
     return;
   case icu::Formattable::kLong:
-    args.GetReturnValue().Set(v8::Number::New(result.getLong()));
+    args.GetReturnValue().Set(result.getLong());
     return;
   case icu::Formattable::kInt64:
-    args.GetReturnValue().Set(v8::Number::New(result.getInt64()));
+    args.GetReturnValue().Set(static_cast<double>(result.getInt64()));
     return;
   default:
     return;