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: 05 July 2002
9 * SUMMARY: Testing local var having same name as switch label inside function
10 *
11 * The code below crashed while compiling in JS1.1 or JS1.2
12 * See http://bugzilla.mozilla.org/show_bug.cgi?id=144834
13 *
14 */
15 //-----------------------------------------------------------------------------
16 var BUGNUMBER = 144834;
17 var summary = 'Local var having same name as switch label inside function';
19 print(BUGNUMBER);
20 print(summary);
23 function RedrawSched()
24 {
25 var MinBound;
27 switch (i)
28 {
29 case MinBound :
30 }
31 }
34 /*
35 * Also try eval scope -
36 */
37 var s = '';
38 s += 'function RedrawSched()';
39 s += '{';
40 s += ' var MinBound;';
41 s += '';
42 s += ' switch (i)';
43 s += ' {';
44 s += ' case MinBound :';
45 s += ' }';
46 s += '}';
47 eval(s);
49 AddTestCase('Do not crash', 'No Crash', 'No Crash');
50 test();