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 // uncaughtExceptionHook resumption value other than undefined causes further
2 // hooks to be skipped.
4 var g = newGlobal();
5 var log;
7 function makeDebug(g, name) {
8 var dbg = new Debugger(g);
9 dbg.onDebuggerStatement = function (frame) {
10 log += name;
11 throw new Error(name);
12 };
13 dbg.uncaughtExceptionHook = function (exc) {
14 assertEq(exc.message, name);
15 return name == "2" ? {return: 42} : undefined;
16 };
17 }
19 var arr = [];
20 for (var i = 0; i < 6; i++)
21 arr[i] = makeDebug(g, "" + i);
23 log = '';
24 assertEq(g.eval("debugger;"), 42);
25 assertEq(log, "012");