Debian Codegraph @

js/src/jit-test/tests/ion/bug1282944.js

raw
1 // |jit-test| --ion-eager; skip-if: helperThreadCount() === 0
2
3 // (1) Poison an element in the ionLazyLinkList with a builder whose
4 // script is in a different compartment.
5 evaluate(`
6 offThreadCompileToStencil("var x = -1");
7 var stencil = finishOffThreadStencil();
8 evalStencil(stencil);
9 `,
10 { global: newGlobal() });
11
12 // (2) Spam the ionLazyLinkList with pending builders until it pops off the one
13 // for the other compartment's script.
14 for (var i = 0; i < 1000; ++i) {
15 offThreadCompileToStencil('var x = ' + i);
16 var stencil = finishOffThreadStencil();
17 evalStencil(stencil);
18 }