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 // When argument[x] is assigned, where x > callee.length, frame.arguments reflects the change.
3 var g = newGlobal();
4 g.eval("function f(a, b) {\n" +
5 " for (var i = 0; i < arguments.length; i++)\n" +
6 " arguments[i] = i;\n" +
7 " debugger;\n" +
8 "}\n");
10 var dbg = Debugger(g);
11 var hits = 0;
12 dbg.onDebuggerStatement = function (frame) {
13 var argc = frame.eval("arguments.length").return;
14 var args = frame.arguments;
15 assertEq(args.length, argc);
16 for (var i = 0; i < argc; i++)
17 assertEq(args[i], i);
18 hits++;
19 }
21 g.f(9);
22 g.f(9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
23 assertEq(hits, 2);