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 -- slow, killed on x86_64
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 = 338653;
9 var summary = 'Force GC when JSRuntime.gcMallocBytes hits ' +
10 'JSRuntime.gcMaxMallocBytes';
11 var actual = 'No Crash';
12 var expect = 'No Crash';
14 printBugNumber(BUGNUMBER);
15 printStatus (summary);
16 print('This test should never fail explicitly. ' +
17 'You must view the memory usage during the test. ' +
18 'This test fails if the memory usage repeatedly spikes ' +
19 'by several hundred megabytes.');
21 function dosubst()
22 {
23 var f = '0x';
24 var s = f;
26 for (var i = 0; i < 18; i++)
27 {
28 s += s;
29 }
31 var index = s.indexOf(f);
32 while (index != -1 && index < 10000) {
33 s = s.substr(0, index) + '1' + s.substr(index + f.length);
34 index = s.indexOf(f);
35 }
37 }
39 dosubst();
41 reportCompare(expect, actual, summary);