aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/big-object-literal.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/big-object-literal.js')
-rw-r--r--deps/v8/test/mjsunit/big-object-literal.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/big-object-literal.js b/deps/v8/test/mjsunit/big-object-literal.js
index c937f54de1..92c6ab7b7b 100644
--- a/deps/v8/test/mjsunit/big-object-literal.js
+++ b/deps/v8/test/mjsunit/big-object-literal.js
@@ -92,16 +92,25 @@ for (var i = 0; i < sizes.length; i++) {
testLiteral(sizes[i], true);
}
+
+function checkExpectedException(e) {
+ assertInstanceof(e, RangeError);
+ assertTrue(e.message.indexOf("Maximum call stack size exceeded") >= 0);
+}
+
+
function testLiteralAndCatch(size) {
var big_enough = false;
try {
testLiteral(size, false);
} catch (e) {
+ checkExpectedException(e);
big_enough = true;
}
try {
testLiteral(size, true);
} catch (e) {
+ checkExpectedException(e);
big_enough = true;
}
return big_enough;