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 // Resumption values other than |undefined| from uncaughtExceptionHook from
2 // onNewGlobalObject handlers are ignored (other than cancelling further hooks).
4 load(libdir + 'asserts.js');
6 var dbg = new Debugger;
7 var log;
9 dbg.onNewGlobalObject = function () {
10 log += 'n';
11 throw 'party';
12 };
14 dbg.uncaughtExceptionHook = function (ex) {
15 log += 'u';
16 assertEq(ex, 'party');
17 return { throw: 'fit' };
18 };
20 log = '';
21 assertEq(typeof newGlobal(), 'object');
22 assertEq(log, 'nu');
24 dbg.uncaughtExceptionHook = function (ex) {
25 log += 'u';
26 assertEq(ex, 'party');
27 };
29 log = '';
30 assertEq(typeof newGlobal(), 'object');
31 assertEq(log, 'nu');