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 */
6 /* Don't crash. */
7 try {
8 eval("function f(){}(((f)for(x in function(){}))())");
9 var threwTypeError = false;
10 } catch (x) {
11 var threwTypeError = x instanceof TypeError;
12 }
13 assertEq(threwTypeError, true);
15 /* Properly bind f. */
16 assertEq(eval("function f() {}; var i = (f for (f in [1])); uneval([n for (n in i)])"),
17 '["0"]');
19 reportCompare(true, true);