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

Unified Diff: src/extensions/i18n/number-format.cc

Issue 18854002: Fix an implicit cast from int64 to double in the i18n extension (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/number-format.cc
diff --git a/src/extensions/i18n/number-format.cc b/src/extensions/i18n/number-format.cc
index 2240b0846bf545b2210050cccfd047c8ee97359a..136471561c44a727c41a96c6a6d371ddeaf0b127 100644
--- a/src/extensions/i18n/number-format.cc
+++ b/src/extensions/i18n/number-format.cc
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698