summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/saved-stacks/bug1832936.js
blob: bb0e2c63ebf106cad0ced94ce40403b6f36edd22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
const g = newGlobal({"newCompartment": true});
const dbg = Debugger(g);

dbg.onDebuggerStatement = function () {
  const stack = saveStack();
  for (let i = 0; i < 50; i++) {}
  function foo() {
    saveStack();
    dbg.getNewestFrame().eval(`saveStack()`);
  }
  bindToAsyncStack(foo, {"stack": stack})();
}
g.eval("debugger;");