summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-getPromiseReactions-07.js
blob: a79b2dc2ef07c6d3bc6c1a022285ae9600e3f32b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
async function f(arg) {
  await arg;

  const g = newGlobal({ sameZoneAs: {} });
  const dbg = g.Debugger({});
  const promise = dbg.getNewestFrame().asyncPromise;
  dbg.removeAllDebuggees();

  // getPromiseReactions should return an empty array after removing debuggee.
  assertEq(promise.getPromiseReactions().length, 0);
}

const p = f();
f(p);