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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 // We still get onNewScript notifications for code compiled off the main thread.
     3 if (workerThreadCount() === 0)
     4   quit(0);
     6 var g = newGlobal();
     7 var dbg = new Debugger(g);
     9 var log;
    10 dbg.onNewScript = function (s) {
    11   log += 's';
    12   assertEq(s.source.text, '"t" + "wine"');
    13 }
    15 log = '';
    16 g.offThreadCompileScript('"t" + "wine"');
    17 assertEq(g.runOffThreadScript(), 'twine');
    18 assertEq(log, 's');

mercurial