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 /*
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
4 */
5 var expect = '';
6 var actual = '';
8 function test(s) {
9 var threw = false;
10 try {
11 eval(s);
12 } catch (e) {
13 assertEq(e.message.indexOf('(intermediate value)'), -1);
14 threw = true;
15 } finally {
16 assertEq(threw, true);
17 }
18 }
20 test("({p:1, q:2}).m()");
21 test("[].m()");
22 test("[1,2,3].m()");
23 test("/hi/.m()");
25 reportCompare(0, 0, "ok");