js/src/jit-test/tests/debug/onNewScript-off-main-thread.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:2079f5b1b346
1 // We still get onNewScript notifications for code compiled off the main thread.
2
3 if (workerThreadCount() === 0)
4 quit(0);
5
6 var g = newGlobal();
7 var dbg = new Debugger(g);
8
9 var log;
10 dbg.onNewScript = function (s) {
11 log += 's';
12 assertEq(s.source.text, '"t" + "wine"');
13 }
14
15 log = '';
16 g.offThreadCompileScript('"t" + "wine"');
17 assertEq(g.runOffThreadScript(), 'twine');
18 assertEq(log, 's');

mercurial