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 document.domain = "example.org";
2 function $(str) { return document.getElementById(str); }
3 function hookLoad(str) {
4 $(str).onload = function() { window.parent.parent.postMessage('end', '*'); };
5 window.parent.parent.postMessage('start', '*');
6 }
7 window.onload = function() {
8 hookLoad("w");
9 $("w").contentWindow.location.href = "test1.example.org.png";
10 hookLoad("x");
11 var doc = $("x").contentDocument;
12 doc.write('<img src="test1.example.org.png">');
13 doc.close();
14 };
15 function doIt() {
16 hookLoad("y");
17 $("y").contentWindow.location.href = "example.org.png";
18 hookLoad("z");
19 var doc = $("z").contentDocument;
20 doc.write('<img src="example.org.png">');
21 doc.close();
22 }
23 window.addEventListener("message", doIt, false);