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 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function doIt() {
6 var doc = window.frames[0].document;
7 var ok = (doc.form1 == doc.getElementById("test1"));
8 window.parent.postMessage(
9 JSON.stringify({ ok: ok,
10 reason: "Should be able to get named items by name" }),
11 "*");
12 window.parent.postMessage("finish", "*");
13 }
15 window.onmessage = function(ev) {
16 if (ev.data == "start") {
17 doIt();
18 }
19 }
21 document.domain = "example.org";
22 </script>
23 </head>
24 <body>
25 <iframe id="subframe"></iframe>
26 <script>
27 document.getElementById("subframe").src =
28 "http://test2.example.org" +
29 location.pathname.replace(/file1_bug629227.html/, "file2_bug629227.html");
30 </script>
31 </body>
32 </html>