diff options
Diffstat (limited to 'js/src/jit-test/tests/arguments/slice-args-obj-04.js')
-rw-r--r-- | js/src/jit-test/tests/arguments/slice-args-obj-04.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/slice-args-obj-04.js b/js/src/jit-test/tests/arguments/slice-args-obj-04.js new file mode 100644 index 0000000000..2cddb3351b --- /dev/null +++ b/js/src/jit-test/tests/arguments/slice-args-obj-04.js @@ -0,0 +1,22 @@ +var result; + +function g(a, b) { + with ({}) {} + result = a + b; +} + +function escape() { with({}) {} } + +function f() { + escape(arguments); + for (var i = 0; i < 50; ++i) { + var args = Array.prototype.slice.call(arguments); + g(args[0], args[1]); + } +} + +f(1, 2); +assertEq(result, 3); + +f(""); +assertEq(result, "undefined"); |