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: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * Any copyright is dedicated to the Public Domain.
4 * http://creativecommons.org/licenses/publicdomain/
5 *
6 * Test courtesy of Olov Lassus <olov.lassus@gmail.com>.
7 */
9 function keys(o) {
10 var a = [];
11 for (var key in o) {
12 a.push(key);
13 }
14 return a;
15 }
17 var obj = {
18 'a': function() {}, 'b': function() {}, 'c': function() {}
19 };
20 var orig_order = keys(obj).toString();
21 var tmp = obj["b"];
22 var read_order = keys(obj).toString();
24 reportCompare(orig_order, read_order,
25 "property enumeration order should not change after reading a method value");