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.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | |
michael@0 | 7 | /** |
michael@0 | 8 | File Name: 10.2.3-2.js |
michael@0 | 9 | ECMA Section: 10.2.3 Function and Anonymous Code |
michael@0 | 10 | Description: |
michael@0 | 11 | |
michael@0 | 12 | The scope chain is initialized to contain the activation object followed |
michael@0 | 13 | by the global object. Variable instantiation is performed using the |
michael@0 | 14 | activation by the global object. Variable instantiation is performed using |
michael@0 | 15 | the activation object as the variable object and using property attributes |
michael@0 | 16 | { DontDelete }. The caller provides the this value. If the this value |
michael@0 | 17 | provided by the caller is not an object (including the case where it is |
michael@0 | 18 | null), then the this value is the global object. |
michael@0 | 19 | |
michael@0 | 20 | Author: christine@netscape.com |
michael@0 | 21 | Date: 12 november 1997 |
michael@0 | 22 | */ |
michael@0 | 23 | |
michael@0 | 24 | var SECTION = "10.2.3-2"; |
michael@0 | 25 | var VERSION = "ECMA_1"; |
michael@0 | 26 | startTest(); |
michael@0 | 27 | var TITLE = "Function and Anonymous Code"; |
michael@0 | 28 | |
michael@0 | 29 | writeHeaderToLog( SECTION + " "+ TITLE); |
michael@0 | 30 | |
michael@0 | 31 | var o = new MyObject("hello"); |
michael@0 | 32 | |
michael@0 | 33 | new TestCase( SECTION, |
michael@0 | 34 | "MyFunction(\"PASSED!\")", |
michael@0 | 35 | "PASSED!", |
michael@0 | 36 | MyFunction("PASSED!") ); |
michael@0 | 37 | |
michael@0 | 38 | var o = MyFunction(); |
michael@0 | 39 | |
michael@0 | 40 | new TestCase( SECTION, |
michael@0 | 41 | "MyOtherFunction(true);", |
michael@0 | 42 | false, |
michael@0 | 43 | MyOtherFunction(true) ); |
michael@0 | 44 | |
michael@0 | 45 | test(); |
michael@0 | 46 | |
michael@0 | 47 | function MyFunction( value ) { |
michael@0 | 48 | var x = value; |
michael@0 | 49 | delete x; |
michael@0 | 50 | return x; |
michael@0 | 51 | } |
michael@0 | 52 | function MyOtherFunction(value) { |
michael@0 | 53 | var x = value; |
michael@0 | 54 | return delete x; |
michael@0 | 55 | } |
michael@0 | 56 | function MyObject( value ) { |
michael@0 | 57 | this.THIS = this; |
michael@0 | 58 | } |