onNewScript-off-main-thread-02.js (449B)
1 // |jit-test| skip-if: helperThreadCount() === 0 2 3 var global = newGlobal({newCompartment: true}); 4 var dbg = new Debugger(global); 5 6 dbg.onNewScript = function (s) { 7 if (s.url === "<string>") 8 assertEq(s.getChildScripts().length, 1); 9 }; 10 11 global.eval('offThreadCompileToStencil("function inner() { \\\"use asm\\\"; function xxx() {} return xxx; }");'); 12 global.eval('var stencil = finishOffThreadStencil();'); 13 global.eval('evalStencil(stencil);');