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 | // enterFrame test with recursive debuggee function. |
michael@0 | 2 | |
michael@0 | 3 | var g = newGlobal(); |
michael@0 | 4 | var N = g.N = 9; |
michael@0 | 5 | g.eval("function f(i) { if (i < N) f(i + 1); }"); |
michael@0 | 6 | |
michael@0 | 7 | var dbg = Debugger(g); |
michael@0 | 8 | var arr = []; |
michael@0 | 9 | dbg.onEnterFrame = function (frame) { |
michael@0 | 10 | var i; |
michael@0 | 11 | for (i = 0; i < arr.length; i++) |
michael@0 | 12 | assertEq(frame !== arr[i], true); |
michael@0 | 13 | arr[i] = frame; |
michael@0 | 14 | |
michael@0 | 15 | // Check that the whole stack is as expected. |
michael@0 | 16 | var j = i; |
michael@0 | 17 | for (; frame; frame = frame.older) |
michael@0 | 18 | assertEq(arr[j--], frame); |
michael@0 | 19 | }; |
michael@0 | 20 | |
michael@0 | 21 | g.f(0); |
michael@0 | 22 | assertEq(arr.length, N + 1); |