summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Environment-module-tla-env.js
blob: f75829d446262bb92466ba2e0c5b42ca7a2a4fed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Taking frame snapshot after await should not crash.

var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
dbg.onDebuggerStatement = function (frame) {
  // Create DebugEnvironmentProxy.
  frame.environment;
};
const m = g.parseModule(`
  var x = 0;
  debugger;
  await 10;
  debugger;
`);
moduleLink(m);
moduleEvaluate(m);