summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/bug508178.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/arguments/bug508178.js')
-rw-r--r--js/src/jit-test/tests/arguments/bug508178.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/bug508178.js b/js/src/jit-test/tests/arguments/bug508178.js
new file mode 100644
index 0000000000..c779c82200
--- /dev/null
+++ b/js/src/jit-test/tests/arguments/bug508178.js
@@ -0,0 +1,18 @@
+actual = '';
+expected = 'g,g,g,g,f,';
+
+function test() {
+ var testargs = arguments;
+ var f = function (name, which) {
+ var args = [testargs, arguments];
+ return args[which][0];
+ };
+ var arr = [0, 0, 0, 0, 1];
+ for (var i = 0; i < arr.length; i++)
+ arr[i] = f("f", arr[i]);
+ appendToActual(arr);
+}
+test('g');
+
+
+assertEq(actual, expected)