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 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /*
7 *
8 * Date: 07 February 2003
9 * SUMMARY: Testing 0/0 inside functions
10 *
11 * See http://bugzilla.mozilla.org/show_bug.cgi?id=192288
12 *
13 */
14 //-----------------------------------------------------------------------------
15 var UBound = 0;
16 var BUGNUMBER = 192288;
17 var summary = 'Testing 0/0 inside functions ';
18 var status = '';
19 var statusitems = [];
20 var actual = '';
21 var actualvalues = [];
22 var expect= '';
23 var expectedvalues = [];
26 function f()
27 {
28 return 0/0;
29 }
31 status = inSection(1);
32 actual = isNaN(f());
33 expect = true;
34 addThis();
36 status = inSection(2);
37 actual = isNaN(f.apply(this));
38 expect = true;
39 addThis();
41 status = inSection(3);
42 actual = isNaN(eval("f.apply(this)"));
43 expect = true;
44 addThis();
46 status = inSection(4);
47 actual = isNaN(Function('return 0/0;')());
48 expect = true;
49 addThis();
51 status = inSection(5);
52 actual = isNaN(eval("Function('return 0/0;')()"));
53 expect = true;
54 addThis();
58 //-----------------------------------------------------------------------------
59 test();
60 //-----------------------------------------------------------------------------
64 function addThis()
65 {
66 statusitems[UBound] = status;
67 actualvalues[UBound] = actual;
68 expectedvalues[UBound] = expect;
69 UBound++;
70 }
73 function test()
74 {
75 enterFunc('test');
76 printBugNumber(BUGNUMBER);
77 printStatus(summary);
79 for (var i=0; i<UBound; i++)
80 {
81 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
82 }
84 exitFunc ('test');
85 }