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 // Control can exit a for-of loop via throw.
3 function f() {
4 for (var a of [1, 2, 3]) {
5 for (var b of [1, 2, 3]) {
6 for (var c of [1, 2, 3]) {
7 if (a !== b && b !== c && c !== a)
8 throw [a, b, c];
9 }
10 }
11 }
12 }
14 var x = null;
15 try {
16 f();
17 } catch (exc) {
18 x = exc.join("");
19 }
20 assertEq(x, "123");