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 <!--
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 -->
6 <!DOCTYPE html>
7 <html>
8 <!--
9 Certified and privileged apps can call mozId outside an event handler
10 Certified apps: https://bugzilla.mozilla.org/show_bug.cgi?id=971379
11 Privileged apps: https://bugzilla.mozilla.org/show_bug.cgi?id=982460
12 -->
13 <head>
14 <meta charset="utf-8">
15 <title>Test app for bug 971379</title>
16 </head>
18 <body>
19 <div id='test'>
20 <script type="application/javascript;version=1.8">
22 function postResults(message) {
23 window.realParent.postMessage(JSON.stringify(message), "*");
24 }
26 function onready() {
27 navigator.mozId.request();
28 }
30 function onlogin(backedAssertion) {
31 postResults({success: true, backedAssertion: backedAssertion});
32 }
34 function onerror(error) {
35 postResults({success: false, error: error});
36 }
38 onmessage = function(message) {
39 navigator.mozId.watch({
40 wantIssuer: message.data.wantIssuer,
41 onready: onready,
42 onerror: onerror,
43 onlogin: onlogin,
44 onlogout: function() {},
45 });
46 };
48 </script>
49 </div>
50 </body>
51 </html>