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 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * Passing arguments by reference do change values of reference to be passed
6 *
7 * @path ch08/8.7/S8.7_A7.js
8 * @description Add new property to original variable inside function
9 */
11 var n = {};
12 var m = n;
14 //////////////////////////////////////////////////////////////////////////////
15 //CHECK#1
16 if (typeof m !== "object") {
17 $ERROR('#1: var n = {}; var m = n; typeof m === "object". Actual: ' + (typeof m));
18 }
19 //
20 //////////////////////////////////////////////////////////////////////////////
22 function populateAge(person){person.age = 50;}
24 populateAge(m);
26 //////////////////////////////////////////////////////////////////////////////
27 //CHECK#2
28 if (n.age !== 50) {
29 $ERROR('#2: var n = {}; var m = n; function populateAge(person){person.age = 50;} populateAge(m); n.age === 50. Actual: ' + (n.age));
30 }
32 //
33 //////////////////////////////////////////////////////////////////////////////