Index: test/mjsunit/stack-traces-overflow.js |
diff --git a/test/mjsunit/stack-traces-overflow.js b/test/mjsunit/stack-traces-overflow.js |
index 7722e93bd26129f91c2dae44b8294fbb76806c19..1c676802101c57d0f0c4d3a165bd90c1746d55bd 100644 |
--- a/test/mjsunit/stack-traces-overflow.js |
+++ b/test/mjsunit/stack-traces-overflow.js |
@@ -106,6 +106,21 @@ try { |
assertEquals(1, e.stack.split('\n').length); |
} |
+// A limit outside the range of integers. |
+Error.stackTraceLimit = 1e12; |
+try { |
+ rec1(0); |
+} catch (e) { |
+ assertTrue(e.stack.split('\n').length > 100); |
+} |
+ |
+Error.stackTraceLimit = Infinity; |
+try { |
+ rec1(0); |
+} catch (e) { |
+ assertTrue(e.stack.split('\n').length > 100); |
+} |
+ |
Error.stackTraceLimit = "not a number"; |
try { |
rec1(0); |