summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/saved-stacks/display-url.js
blob: 4688fefe013ebed0925b15c658b320f0e8541448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
eval(`
  function a() {
    return b();
  }
  //# sourceURL=source-a.js
`);

eval(`
  function b() {
    return c();
  }
  //# sourceURL=source-b.js
`);

eval(`
  function c() {
    return saveStack();
  }
  //# sourceURL=source-c.js
`);

let stack = a();
print(stack);
assertEq(stack.source, "source-c.js");
assertEq(stack.parent.source, "source-b.js");
assertEq(stack.parent.parent.source, "source-a.js");