summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testFunApplyOverflow.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testFunApplyOverflow.js')
-rw-r--r--js/src/jit-test/tests/basic/testFunApplyOverflow.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testFunApplyOverflow.js b/js/src/jit-test/tests/basic/testFunApplyOverflow.js
new file mode 100644
index 000000000..45be944e9
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testFunApplyOverflow.js
@@ -0,0 +1,10 @@
+function g(x,y) {
+ return x + y;
+}
+
+function f(x) {
+ return g.apply(null, arguments);
+}
+
+for (var i = 0; i < 100; ++i)
+ assertEq(f(i, 1), i+1);