summaryrefslogtreecommitdiff
path: root/js/src/jit-test/tests/jaeger/bug563000/trap-self-as-parent.js
blob: 16c9bd0a940357a2d9d2439ed0aa35cd6f2827ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// |jit-test| debug
setDebug(true);
x = "notset";

function myparent(nested) {
  if (nested) {
    /* noop call in myparent */
    trap(myparent, 50, "success()");
  } else {
    myparent(true);
    x = "failure";
    noop();
  }
}
function noop() { }
function success() { x = "success"; }

myparent();
assertEq(x, "success");