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 | <html> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title></title> |
michael@0 | 4 | |
michael@0 | 5 | <script type="text/javascript"> |
michael@0 | 6 | |
michael@0 | 7 | function startCleanWorker() { |
michael@0 | 8 | var worker = new Worker("cleanWorker.js"); |
michael@0 | 9 | |
michael@0 | 10 | worker.onmessage = function(event) { |
michael@0 | 11 | if (event.data == "success") { |
michael@0 | 12 | window.parent.postMessage("success:blocked importScripts('evilWorker.js')", "*"); |
michael@0 | 13 | } else { |
michael@0 | 14 | window.parent.postMessage("failure:failed to block importScripts('evilWorker.js')", "*"); |
michael@0 | 15 | } |
michael@0 | 16 | window.parent.postMessage("finish", "*"); |
michael@0 | 17 | }; |
michael@0 | 18 | |
michael@0 | 19 | worker.onerror = function(event) { |
michael@0 | 20 | window.parent.postmessage("failure:failed to load cleanWorker.js", "*"); |
michael@0 | 21 | window.parent.postMessage("finish", "*"); |
michael@0 | 22 | }; |
michael@0 | 23 | |
michael@0 | 24 | worker.postMessage(""); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | function startEvilWorker() { |
michael@0 | 28 | var worker = new Worker("evilWorker.js"); |
michael@0 | 29 | |
michael@0 | 30 | worker.onmessage = function(event) { |
michael@0 | 31 | window.parent.postMessage("failure:failed to block evilWorker.js", "*"); |
michael@0 | 32 | startCleanWorker(); |
michael@0 | 33 | }; |
michael@0 | 34 | |
michael@0 | 35 | worker.onerror = function(event) { |
michael@0 | 36 | window.parent.postMessage("success:blocked evilWorker.js", "*"); |
michael@0 | 37 | startCleanWorker(); |
michael@0 | 38 | }; |
michael@0 | 39 | |
michael@0 | 40 | worker.postMessage(""); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | </script> |
michael@0 | 44 | |
michael@0 | 45 | </head> |
michael@0 | 46 | |
michael@0 | 47 | <body onload="startEvilWorker()"> |
michael@0 | 48 | </body> |
michael@0 | 49 | </html> |