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: src/i18n.js

Issue 68453005: Use %_IsMinusZero where applicable to replace hackery. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | src/math.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.js
diff --git a/src/i18n.js b/src/i18n.js
index a64c7e67844b01ebc134956e95c2cba87cd5a288..6b563a00f915a867056e73c02856f8132226d5eb 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -1302,10 +1302,7 @@ function initializeNumberFormat(numberFormat, locales, options) {
*/
function formatNumber(formatter, value) {
// Spec treats -0 and +0 as 0.
- var number = $Number(value);
- if (number === -0) {
- number = 0;
- }
+ var number = $Number(value) + 0;
return %InternalNumberFormat(formatter.formatter, number);
}
« no previous file with comments | « no previous file | src/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698