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 | // |jit-test| debug |
michael@0 | 2 | setDebug(true); |
michael@0 | 3 | var a = new Array(); |
michael@0 | 4 | |
michael@0 | 5 | function i(save) { |
michael@0 | 6 | var x = 9; |
michael@0 | 7 | evalInFrame(0, "a.push(x)", save); |
michael@0 | 8 | evalInFrame(1, "a.push(z)", save); |
michael@0 | 9 | evalInFrame(2, "a.push(z)", save); |
michael@0 | 10 | evalInFrame(3, "a.push(y)", save); |
michael@0 | 11 | evalInFrame(4, "a.push(x)", save); |
michael@0 | 12 | } |
michael@0 | 13 | |
michael@0 | 14 | function h() { |
michael@0 | 15 | var z = 5; |
michael@0 | 16 | evalInFrame(0, "a.push(z)"); |
michael@0 | 17 | evalInFrame(1, "a.push(y)"); |
michael@0 | 18 | evalInFrame(2, "a.push(x)"); |
michael@0 | 19 | evalInFrame(0, "i(false)"); |
michael@0 | 20 | evalInFrame(0, "a.push(z)", true); |
michael@0 | 21 | evalInFrame(1, "a.push(y)", true); |
michael@0 | 22 | evalInFrame(2, "a.push(x)", true); |
michael@0 | 23 | evalInFrame(0, "i(true)", true); |
michael@0 | 24 | } |
michael@0 | 25 | |
michael@0 | 26 | function g() { |
michael@0 | 27 | var y = 4; |
michael@0 | 28 | h(); |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | function f() { |
michael@0 | 32 | var x = 3; |
michael@0 | 33 | g(); |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | f(); |
michael@0 | 37 | assertEq(a+'', [5, 4, 3, 9, 5, 5, 4, 3, 5, 4, 3, 9, 5, 5, 4, 3]+''); |