Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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');