js/src/jit-test/tests/jaeger/bug563000/trap-self-from-trap.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/jaeger/bug563000/trap-self-from-trap.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,24 @@
     1.4 +// |jit-test| debug
     1.5 +setDebug(true);
     1.6 +x = "notset";
     1.7 +
     1.8 +function doNothing() { }
     1.9 +
    1.10 +function myparent(nested) {
    1.11 +  if (nested) {
    1.12 +    /* JSOP_CALL to doNothing in myparent with nested = true. */
    1.13 +    trap(myparent, 36, "success()");
    1.14 +    doNothing();
    1.15 +  } else {
    1.16 +    doNothing();
    1.17 +  }
    1.18 +}
    1.19 +/* JSOP_CALL to doNothing in myparent with nested = false. */
    1.20 +trap(myparent, 51, "myparent(true)");
    1.21 +
    1.22 +function success() {
    1.23 +  x = "success";
    1.24 +}
    1.25 +
    1.26 +myparent(false);
    1.27 +assertEq(x, "success");

mercurial