summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/async/await-exception-stack-in-finally-3.js
blob: f7c672c4da305e49ddb82e002300f3918d818b7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ignoreUnhandledRejections();

var g = newGlobal({newCompartment: true})

// Allow |g| to nuke wrappers from the main compartment.
g.nuke = () => {
  // Nuke wrappers and make sure we don't crash.
  nukeAllCCWs();
};

// Throw an exception from a different compartment.
var thrower = g.Function(`
  nuke();
  throw 0;
`);

async function justThrow() {
  thrower();
}

justThrow();