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 = 253150;
8 var summary = 'Do not warn on detecting properties';
9 var actual = '';
10 var expect = 'No warning';
12 printBugNumber(BUGNUMBER);
13 printStatus (summary);
15 var testobject = {};
17 options('strict');
18 options('werror');
20 try
21 {
22 var testresult = testobject.foo;
23 actual = 'No warning';
24 }
25 catch(ex)
26 {
27 actual = ex + '';
28 }
30 reportCompare(expect, actual, summary + ': 1');
32 try
33 {
34 if (testobject.foo)
35 {
36 ;
37 }
38 actual = 'No warning';
39 }
40 catch(ex)
41 {
42 actual = ex + '';
43 }
45 reportCompare(expect, actual, summary + ': 2');
47 try
48 {
49 if (typeof testobject.foo == 'undefined')
50 {
51 ;
52 }
53 actual = 'No warning';
54 }
55 catch(ex)
56 {
57 actual = ex + '';
58 }
60 reportCompare(expect, actual, summary + ': 3');
62 try
63 {
64 if (testobject.foo == null)
65 {
66 ;
67 }
68 actual = 'No warning';
69 }
70 catch(ex)
71 {
72 actual = ex + '';
73 }
75 reportCompare(expect, actual, summary + ': 4');
77 try
78 {
79 if (testobject.foo == undefined)
80 {
81 ;
82 }
83 actual = 'No warning';
84 }
85 catch(ex)
86 {
87 actual = ex + '';
88 }
90 reportCompare(expect, actual, summary + ': 3');