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

Unified Diff: src/json.js

Issue 1378533002: [es6] Introduce %ToInteger and %ToLength. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « src/hydrogen.cc ('k') | src/macros.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json.js
diff --git a/src/json.js b/src/json.js
index 8fe30efafc64c9e348267d95c8cfac14aa52027d..6f8489088b5191a2cef1312a10f48121028b6ef7 100644
--- a/src/json.js
+++ b/src/json.js
@@ -217,7 +217,7 @@ function JSONStringify(value, replacer, space) {
}
var gap;
if (IS_NUMBER(space)) {
- space = MathMax(0, MathMin($toInteger(space), 10));
+ space = MathMax(0, MathMin(TO_INTEGER(space), 10));
gap = %_SubString(" ", 0, space);
} else if (IS_STRING(space)) {
if (space.length > 10) {
« no previous file with comments | « src/hydrogen.cc ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698