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: regress-7224.js |
michael@0 | 9 | * Reference: js1_2 |
michael@0 | 10 | * Description: Remove support for the arg |
michael@0 | 11 | * Author: ** replace with your e-mail address ** |
michael@0 | 12 | */ |
michael@0 | 13 | |
michael@0 | 14 | var SECTION = "regress"; // provide a document reference (ie, ECMA section) |
michael@0 | 15 | var VERSION = "JS1_4"; // Version of JavaScript or ECMA |
michael@0 | 16 | var TITLE = "Regression test for bugzilla #7224"; // Provide ECMA section title or a description |
michael@0 | 17 | var BUGNUMBER = "http://bugzilla.mozilla.org/show_bug.cgi?id=7224"; // Provide URL to bugsplat or bugzilla report |
michael@0 | 18 | |
michael@0 | 19 | startTest(); // leave this alone |
michael@0 | 20 | |
michael@0 | 21 | /* |
michael@0 | 22 | * Calls to AddTestCase here. AddTestCase is a function that is defined |
michael@0 | 23 | * in shell.js and takes three arguments: |
michael@0 | 24 | * - a string representation of what is being tested |
michael@0 | 25 | * - the expected result |
michael@0 | 26 | * - the actual result |
michael@0 | 27 | * |
michael@0 | 28 | * For example, a test might look like this: |
michael@0 | 29 | * |
michael@0 | 30 | * var zip = /[\d]{5}$/; |
michael@0 | 31 | * |
michael@0 | 32 | * AddTestCase( |
michael@0 | 33 | * "zip = /[\d]{5}$/; \"PO Box 12345 Boston, MA 02134\".match(zip)", // description of the test |
michael@0 | 34 | * "02134", // expected result |
michael@0 | 35 | * "PO Box 12345 Boston, MA 02134".match(zip) ); // actual result |
michael@0 | 36 | * |
michael@0 | 37 | */ |
michael@0 | 38 | |
michael@0 | 39 | var f = new Function( "return arguments.caller" ); |
michael@0 | 40 | var o = {}; |
michael@0 | 41 | |
michael@0 | 42 | o.foo = f; |
michael@0 | 43 | o.foo("a", "b", "c"); |
michael@0 | 44 | |
michael@0 | 45 | |
michael@0 | 46 | AddTestCase( |
michael@0 | 47 | "var f = new Function( 'return arguments.caller' ); f()", |
michael@0 | 48 | undefined, |
michael@0 | 49 | f() ); |
michael@0 | 50 | |
michael@0 | 51 | AddTestCase( |
michael@0 | 52 | "var o = {}; o.foo = f; o.foo('a')", |
michael@0 | 53 | undefined, |
michael@0 | 54 | o.foo('a') ); |
michael@0 | 55 | |
michael@0 | 56 | test(); // leave this alone. this executes the test cases and |
michael@0 | 57 | // displays results. |