Index: test/mjsunit/json-recursive.js |
diff --git a/test/mjsunit/json-recursive.js b/test/mjsunit/json-recursive.js |
index 7c7b1465cca86e7491e0258b08ff0aa6fcdcea03..adfd93bbcd6f693f8ffad2d758eed5009899b591 100644 |
--- a/test/mjsunit/json-recursive.js |
+++ b/test/mjsunit/json-recursive.js |
@@ -42,15 +42,17 @@ assertThrows(function() { rec(1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4) }, |
RangeError); |
+var depth1 = 2048; |
+var depth2 = 10000; |
var deepArray = []; |
-for (var i = 0; i < 2048; i++) deepArray = [deepArray]; |
+for (var i = 0; i < depth1; i++) deepArray = [deepArray]; |
JSON.stringify(deepArray); |
-for (var i = 2048; i < 4097; i++) deepArray = [deepArray]; |
+for (var i = depth1; i < depth2; i++) deepArray = [deepArray]; |
assertThrows(function() { JSON.stringify(deepArray); }, RangeError); |
var deepObject = {}; |
-for (var i = 0; i < 2048; i++) deepObject = { next: deepObject }; |
+for (var i = 0; i < depth1; i++) deepObject = { next: deepObject }; |
JSON.stringify(deepObject); |
-for (var i = 2048; i < 4097; i++) deepObject = { next: deepObject }; |
+for (var i = depth1; i < depth2; i++) deepObject = { next: deepObject }; |
assertThrows(function() { JSON.stringify(deepObject); }, RangeError); |