Reviewers: Jakob,
Description:
Fix an implicit cast from int64 to double in the i18n extension
On MSVS, this throws an error
BUG=v8:2745
[email protected]
Please review this at https://codereview.chromium.org/18854002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/extensions/i18n/number-format.cc
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;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.