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 var gTestcases = new Array();
2 var gTc = gTestcases.length;
3 var setterCalled = false;
4 function TestCase() {
5 gTestcases[gTc++] = this;
6 }
7 for(var i = 0; i < 13; ++i) {
8 var testcase = new TestCase();
9 }
10 Array.prototype.__defineSetter__(32, function() { setterCalled = true; });
11 for(var i = 0; i < 20; ++i) {
12 var testcase = new TestCase();
13 }
14 assertEq(setterCalled, true);