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 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Test that lookup() on a system principal doesn't crash</title> |
michael@0 | 5 | <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"> |
michael@0 | 7 | </head> |
michael@0 | 8 | |
michael@0 | 9 | <body> |
michael@0 | 10 | <div id="content" style="display: none"> |
michael@0 | 11 | </div> |
michael@0 | 12 | <pre id="test"> |
michael@0 | 13 | |
michael@0 | 14 | <script type="text/javascript"> |
michael@0 | 15 | |
michael@0 | 16 | var Cc = Components.classes; |
michael@0 | 17 | var Ci = Components.interfaces; |
michael@0 | 18 | |
michael@0 | 19 | var dbService = Cc["@mozilla.org/url-classifier/dbservice;1"] |
michael@0 | 20 | .getService(Ci.nsIUrlClassifierDBService); |
michael@0 | 21 | |
michael@0 | 22 | dbService.lookup(document.nodePrincipal, "", function(arg) {}); |
michael@0 | 23 | |
michael@0 | 24 | ok(true, "lookup() didn't crash"); |
michael@0 | 25 | |
michael@0 | 26 | </script> |
michael@0 | 27 | </pre> |
michael@0 | 28 | </body> |
michael@0 | 29 | </html> |