summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/ShadowRealms/interrupt-request.js
blob: 160a86113522184a2aa41fce8aa99d8586725b7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// |reftest| shell-option(--enable-shadow-realms) skip-if(!xulRuntime.shell)

// Request interrupt from shadow realm evaluation.

expectExitCode(6);

new ShadowRealm().evaluate(`
  (interruptIf => {
    interruptIf(true);

    for (;;) {}  // Wait for interrupt.
  });
`)(interruptIf);

if (typeof reportCompare === 'function')
  reportCompare(true, true);