Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 load(libdir + "parallelarray-helpers.js");
3 function testMap() {
5 // Note: This is the same kernel function as `alloc-many-objs`, but
6 // with a larger bound. This often fails par. exec. because it
7 // triggers GC at inconvenient times. But let's just test that it
8 // doesn't crash or something!
10 var ints = range(0, 100000);
12 // The disqual occurs because each time we try to run we wind up
13 // bailing due to running out of memory or requesting a GC.
14 assertParallelExecWillBail(function (m) {
15 ints.mapPar(kernel, m);
16 });
18 function kernel(v) {
19 var x = [];
21 if (inParallelSection()) {
22 // don't bother to stress test the non-parallel paths!
23 for (var i = 0; i < 50; i++) {
24 x[i] = [];
25 for (var j = 0; j < 1024; j++) {
26 x[i][j] = j;
27 }
28 }
29 }
31 return x;
32 }
33 }
35 if (getBuildConfiguration().parallelJS)
36 testMap();