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 // Breakpoints work in non-compile-and-go code. Bug 738479.
3 var g = newGlobal();
4 g.s = '';
5 var dbg = new Debugger;
6 var gw = dbg.addDebuggee(g);
7 g.evaluate(
8 "function f() {\n" + // fscript.startLine
9 " s += 'a';\n" + // fscript.startLine + 1
10 " s += 'b';\n" + // fscript.startLine + 2
11 "}\n",
12 {compileAndGo: false});
14 var fscript = gw.makeDebuggeeValue(g.f).script;
15 var handler = {hit: function (frame) { g.s += '1'; }};
16 for (var pc of fscript.getLineOffsets(fscript.startLine + 2))
17 fscript.setBreakpoint(pc, handler);
19 g.f();
21 assertEq(g.s, "a1b");