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 function run_test()
2 {
3 Components.utils.import("resource://gre/modules/jsdebugger.jsm");
4 addDebuggerToGlobal(this);
5 var g = testGlobal("test1");
7 var dbg = new Debugger();
8 dbg.addDebuggee(g);
9 dbg.onDebuggerStatement = function(aFrame) {
10 let args = aFrame.arguments;
11 try {
12 args[0];
13 do_check_true(true);
14 } catch(ex) {
15 do_check_true(false);
16 }
17 };
19 g.eval("function stopMe(arg) {debugger;}");
21 g2 = testGlobal("test2");
22 g2.g = g;
23 g2.eval("(" + function createBadEvent() {
24 let parser = Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser);
25 let doc = parser.parseFromString("<foo></foo>", "text/xml");
26 g.stopMe(doc.createEvent("MouseEvent"));
27 } + ")()");
29 dbg.enabled = false;
30 }