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 | function run_test() |
michael@0 | 2 | { |
michael@0 | 3 | Components.utils.import("resource://gre/modules/jsdebugger.jsm"); |
michael@0 | 4 | addDebuggerToGlobal(this); |
michael@0 | 5 | var xpcInspector = Cc["@mozilla.org/jsinspector;1"].getService(Ci.nsIJSInspector); |
michael@0 | 6 | var g = testGlobal("test1"); |
michael@0 | 7 | |
michael@0 | 8 | var dbg = new Debugger(); |
michael@0 | 9 | dbg.uncaughtExceptionHook = testExceptionHook; |
michael@0 | 10 | |
michael@0 | 11 | dbg.addDebuggee(g); |
michael@0 | 12 | dbg.onDebuggerStatement = function(aFrame) { |
michael@0 | 13 | do_check_true(aFrame === dbg.getNewestFrame()); |
michael@0 | 14 | // Execute from the nested event loop, dbg.getNewestFrame() won't |
michael@0 | 15 | // be working anymore. |
michael@0 | 16 | |
michael@0 | 17 | do_execute_soon(function() { |
michael@0 | 18 | try { |
michael@0 | 19 | do_check_true(aFrame === dbg.getNewestFrame()); |
michael@0 | 20 | } finally { |
michael@0 | 21 | xpcInspector.exitNestedEventLoop("test"); |
michael@0 | 22 | } |
michael@0 | 23 | }); |
michael@0 | 24 | xpcInspector.enterNestedEventLoop("test"); |
michael@0 | 25 | }; |
michael@0 | 26 | |
michael@0 | 27 | g.eval("function debuggerStatement() { debugger; }; debuggerStatement();"); |
michael@0 | 28 | |
michael@0 | 29 | dbg.enabled = false; |
michael@0 | 30 | } |