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: 15.2.1.2.js
9 ECMA Section: 15.2.1.2 The Object Constructor Called as a Function:
10 Object(value)
11 Description: When Object is called as a function rather than as a
12 constructor, the following steps are taken:
14 1. If value is null or undefined, create and return a
15 new object with no proerties other than internal
16 properties exactly as if the object constructor
17 had been called on that same value (15.2.2.1).
18 2. Return ToObject (value), whose rules are:
20 undefined generate a runtime error
21 null generate a runtime error
22 boolean create a new Boolean object whose default
23 value is the value of the boolean.
24 number Create a new Number object whose default
25 value is the value of the number.
26 string Create a new String object whose default
27 value is the value of the string.
28 object Return the input argument (no conversion).
30 Author: christine@netscape.com
31 Date: 17 july 1997
32 */
34 var SECTION = "15.2.1.2";
35 var VERSION = "ECMA_1";
36 startTest();
37 var TITLE = "Object()";
39 writeHeaderToLog( SECTION + " "+ TITLE);
41 var MYOB = Object();
43 new TestCase( SECTION, "var MYOB = Object(); MYOB.valueOf()", MYOB, MYOB.valueOf() );
44 new TestCase( SECTION, "typeof Object()", "object", typeof (Object(null)) );
45 new TestCase( SECTION, "var MYOB = Object(); MYOB.toString()", "[object Object]", eval("var MYOB = Object(); MYOB.toString()") );
47 test();