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 // |reftest| skip-if(Android) silentfail
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 280769;
9 var summary = 'Do not overflow 64K boundary in treeDepth';
10 var actual = 'No Crash';
11 var expect = /No Crash|InternalError: allocation size overflow/;
12 var status;
13 var result;
15 printBugNumber(BUGNUMBER);
16 printStatus (summary);
18 expectExitCode(0);
19 expectExitCode(5);
21 status = summary + ' ' + inSection(1) + ' (new RegExp("0|...|99999") ';
23 try
24 {
25 var N = 100 * 1000;
26 var a = new Array(N);
27 for (var i = 0; i != N; ++i) {
28 a[i] = i;
29 }
30 var str = a.join('|'); // str is 0|1|2|3|...|<printed value of N -1>
31 var re = new RegExp(str);
32 re.exec(N - 1);
33 }
34 catch(ex)
35 {
36 actual = ex + '';
37 }
39 print('Done: ' + actual);
41 reportMatch(expect, actual, summary);