Debian Codegraph @

js/src/jit-test/tests/basic/offThreadCompileToStencil-02.js

raw
1 // |jit-test| skip-if: helperThreadCount() === 0
2
3 // Test offThreadCompileToStencil/evalStencil option handling.
4
5 offThreadCompileToStencil("Error()");
6 var stencil = finishOffThreadStencil();
7 assertEq(!!evalStencil(stencil).stack.match(/^@<string>:1:1\n/), true);
8
9 offThreadCompileToStencil("Error()", { fileName: "candelabra", lineNumber: 6502 });
10 stencil = finishOffThreadStencil();
11 assertEq(!!evalStencil(stencil).stack.match(/^@candelabra:6502:1\n/), true);
12
13 var element = {};
14 offThreadCompileToStencil("Error()"); // shouldn't crash
15 stencil = finishOffThreadStencil();
16 evalStencil(stencil, { element });
17
18 var elementAttributeName = "molybdenum";
19 elementAttributeName +=
20 elementAttributeName + elementAttributeName + elementAttributeName;
21 offThreadCompileToStencil("Error()"); // shouldn't crash
22 stencil = finishOffThreadStencil();
23 evalStencil(stencil, {
24 elementAttributeName,
25 });