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

Unified Diff: src/json.js

Issue 1143993003: Use shared container to manage imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed test for no-snap Created 5 years, 7 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/iterator-prototype.js ('k') | src/math.js » ('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 2e6bbbbce2d2bf6217a5ea61700d61f8eb3a5635..d62bb1839ed4695165d9785e878c398cd17a2b36 100644
--- a/src/json.js
+++ b/src/json.js
@@ -4,7 +4,7 @@
var $jsonSerializeAdapter;
-(function(global, shared, exports) {
+(function(global, utils) {
"use strict";
@@ -14,7 +14,15 @@ var $jsonSerializeAdapter;
// Imports
var GlobalJSON = global.JSON;
-var InternalArray = shared.InternalArray;
+var InternalArray = utils.InternalArray;
+
+var MathMax;
+var MathMin;
+
+utils.Import(function(from) {
+ MathMax = from.MathMax;
+ MathMin = from.MathMin;
+});
// -------------------------------------------------------------------
@@ -183,7 +191,7 @@ function JSONStringify(value, replacer, space) {
}
var gap;
if (IS_NUMBER(space)) {
- space = $max(0, $min($toInteger(space), 10));
+ space = MathMax(0, MathMin($toInteger(space), 10));
gap = %_SubString(" ", 0, space);
} else if (IS_STRING(space)) {
if (space.length > 10) {
« no previous file with comments | « src/iterator-prototype.js ('k') | src/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698