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 var BUGNUMBER = 333728;
8 var summary = 'Throw ReferenceErrors for typeof(...undef)';
9 var actual = '';
10 var expect = 'ReferenceError';
12 printBugNumber(BUGNUMBER);
13 printStatus (summary);
15 try
16 {
17 actual = typeof (0, undef);
18 }
19 catch(ex)
20 {
21 actual = ex.name;
22 }
24 reportCompare(expect, actual, summary + ': typeof (0, undef)');
26 try
27 {
28 actual = typeof (0 || undef);
29 }
30 catch(ex)
31 {
32 actual = ex.name;
33 }
35 reportCompare(expect, actual, summary + ': typeof (0 || undef)');
37 try
38 {
39 actual = typeof (1 && undef);
40 }
41 catch(ex)
42 {
43 actual = ex.name;
44 }
46 reportCompare(expect, actual, summary + ': typeof (1 && undef)');
48 /*
49 try
50 {
51 actual = typeof (0 ? 0 : undef);
52 }
53 catch(ex)
54 {
55 actual = ex.name;
56 }
58 reportCompare(expect, actual, summary + ': typeof (0 ? 0 : undef)');
59 */
61 /*
62 try
63 {
64 actual = typeof (1 ? undef : 0);
65 }
66 catch(ex)
67 {
68 actual = ex.name;
69 }
71 reportCompare(expect, actual, summary + ': typeof (1 ? undef : 0)');
72 */
74 try
75 {
76 actual = typeof (!this ? 0 : undef);
77 }
78 catch(ex)
79 {
80 actual = ex.name;
81 }
83 reportCompare(expect, actual, summary + ': typeof (!this ? 0 : undef)');