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/. */
7 /**
8 * File Name: exception-007
9 * ECMA Section:
10 * Description: Tests for JavaScript Standard Exceptions
11 *
12 * DefaultValue error.
13 *
14 * Author: christine@netscape.com
15 * Date: 31 August 1998
16 */
17 var SECTION = "exception-007";
18 var VERSION = "js1_4";
19 var TITLE = "Tests for JavaScript Standard Exceptions: TypeError";
20 var BUGNUMBER="318250";
22 startTest();
23 writeHeaderToLog( SECTION + " "+ TITLE);
25 DefaultValue_1();
27 test();
30 /**
31 * Getting the [[DefaultValue]] of any instances of MyObject
32 * should result in a runtime error in ToPrimitive.
33 */
35 function MyObject() {
36 this.toString = void 0;
37 this.valueOf = new Object();
38 }
40 function DefaultValue_1() {
41 result = "failed: no exception thrown";
42 exception = null;
44 try {
45 result = new MyObject() + new MyObject();
46 } catch ( e ) {
47 result = "passed: threw exception",
48 exception = e.toString();
49 } finally {
50 new TestCase(
51 SECTION,
52 "new MyObject() + new MyObject() [ exception is " + exception +" ]",
53 "passed: threw exception",
54 result );
55 }
56 }