diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/basic/spread-call-maxarg.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/basic/spread-call-maxarg.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,30 @@ + +var config = getBuildConfiguration(); + +// FIXME: ASAN and debug builds run this too slowly for now. Re-enable +// after bug 919948 lands. +if (!config.debug && !config.asan) { + let a = []; + a.length = getMaxArgs() + 1; + + let f = function() { + }; + + try { + f(...a); + } catch (e) { + assertEq(e.message, "too many function arguments"); + } + + try { + new f(...a); + } catch (e) { + assertEq(e.message, "too many constructor arguments"); + } + + try { + eval(...a); + } catch (e) { + assertEq(e.message, "too many function arguments"); + } +}