summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onNewScript-off-main-thread-02.js
blob: 25552f8bf42e0c6c7b07b62cfdc089a2c490ec86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// |jit-test| skip-if: helperThreadCount() === 0

var global = newGlobal({newCompartment: true});
var dbg = new Debugger(global);

dbg.onNewScript = function (s) {
  if (s.url === "<string>")
    assertEq(s.getChildScripts().length, 1);
};

global.eval('offThreadCompileScript("function inner() { \\\"use asm\\\"; function xxx() {} return xxx; }");');
global.eval('runOffThreadScript();');