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 if (getBuildConfiguration().parallelJS) {
2 function assertParallelExecSucceeds(opFunction) {
3 for (var i = 0; i < 100; ++i) {
4 opFunction({mode:"compile"});
5 }
6 }
7 function assertArraySeqParResultsEq(arr, op, func) {
8 assertParallelExecSucceeds(
9 function (m) {
10 return arr[op + "Par"].apply(arr, [func, m]);
11 }
12 );
13 }
14 function range(n, m) {
15 var result = [];
16 for (var i = n; i < m; i++)
17 result.push(i);
18 return result;
19 }
20 assertArraySeqParResultsEq(range(0, 512), "map", function(e) { return e+'x'; });
21 }