summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js')
-rw-r--r--js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js b/js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js
new file mode 100644
index 000000000..f1b127839
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testCallApplySpeculationFailed.js
@@ -0,0 +1,5 @@
+function foo(n) { return n; }
+foo.apply = function(a, b) { return b[0]; }
+function bar(value) { return foo.apply(null, arguments); }
+for (var i = 1 ; i < 4; i++)
+ assertEq(bar(i), i);