summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/offThreadCompileScript-02.js
blob: ad1a5da1dfb0abd30d1c0cd15950be8e510710d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |jit-test| skip-if: helperThreadCount() === 0

// Test offThreadCompileScript option handling.

offThreadCompileScript("Error()");
assertEq(!!runOffThreadScript().stack.match(/^@<string>:1:1\n/), true);

 offThreadCompileScript("Error()", { fileName: "candelabra", lineNumber: 6502 });
assertEq(!!runOffThreadScript().stack.match(/^@candelabra:6502:1\n/), true);

var element = {};
offThreadCompileScript("Error()", { element }); // shouldn't crash
runOffThreadScript();

var elementAttributeName = "molybdenum";
elementAttributeName +=
  elementAttributeName + elementAttributeName + elementAttributeName;
offThreadCompileScript("Error()", {
  elementAttributeName,
}); // shouldn't crash
runOffThreadScript();