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.
michael@0 | 1 | // The tracejit does not prevent onEnterFrame from being called after entering |
michael@0 | 2 | // a debuggee compartment from a non-debuggee compartment. |
michael@0 | 3 | |
michael@0 | 4 | var g1 = newGlobal(); |
michael@0 | 5 | var g2 = newGlobal(); |
michael@0 | 6 | var dbg = Debugger(g1, g2); |
michael@0 | 7 | dbg.removeDebuggee(g2); // turn off debug mode in g2 |
michael@0 | 8 | |
michael@0 | 9 | g1.eval("function f() { return 1; }\n"); |
michael@0 | 10 | var N = g1.N = 11; |
michael@0 | 11 | g1.eval("function h() {\n" + |
michael@0 | 12 | " for (var i = 0; i < N; i += f()) {}\n" + |
michael@0 | 13 | "}"); |
michael@0 | 14 | g1.h(); // record loop |
michael@0 | 15 | |
michael@0 | 16 | var log = ''; |
michael@0 | 17 | dbg.onEnterFrame = function (frame) { log += frame.callee.name; }; |
michael@0 | 18 | g1.h(); |
michael@0 | 19 | assertEq(log, 'h' + Array(N + 1).join('f')); |