js/src/jit-test/tests/basic/bug592927.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/bug592927.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +// vim: set ts=8 sts=4 et sw=4 tw=99:
     1.5 +function f(x, y) {
     1.6 +    x(f);
     1.7 +    assertEq(y, "hello");
     1.8 +}
     1.9 +
    1.10 +function g(x) {
    1.11 +    assertEq(x.arguments[1], "hello");
    1.12 +    x.arguments[1] = "bye";
    1.13 +    assertEq(x.arguments[1], "hello");
    1.14 +}
    1.15 +
    1.16 +function f2(x, y) {
    1.17 +    arguments;
    1.18 +    x(f2);
    1.19 +    assertEq(y, "hello");
    1.20 +}
    1.21 +
    1.22 +function g2(x) {
    1.23 +    assertEq(x.arguments[1], "hello");
    1.24 +    x.arguments[1] = "bye";
    1.25 +    assertEq(x.arguments[1], "hello");
    1.26 +}
    1.27 +
    1.28 +f(g, "hello");
    1.29 +f2(g2, "hello");
    1.30 +

mercurial