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 // For-of can't have initializers.
3 load(libdir + 'asserts.js');
5 function assertSyntaxError(str) {
6 assertThrowsInstanceOf(function () { return Function(str); }, SyntaxError);
7 }
9 assertSyntaxError("for (var x = 1 of []) {}");
10 assertSyntaxError("for (var [x] = 1 of []) {}");
11 assertSyntaxError("for (var {x} = 1 of []) {}");
13 assertSyntaxError("for (let x = 1 of []) {}");
14 assertSyntaxError("for (let [x] = 1 of []) {}");
15 assertSyntaxError("for (let {x} = 1 of []) {}");
17 assertSyntaxError("for (const x = 1 of []) {}");
18 assertSyntaxError("for (const [x] = 1 of []) {}");
19 assertSyntaxError("for (const {x} = 1 of []) {}");