1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
if (helperThreadCount() === 0) quit(0); offThreadCompileScript(` function foo(x, {}) { do { re = /erwe/; if (x === 1) re.x = 1; else re.x = "a"; assertEq(re.x.length, (x === 1) ? undefined : 1); } while (!inIon()); } foo(0, 0); RegExp.multiline = 1; foo(1, 0); `); runOffThreadScript();