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 // |jit-test| debug
2 // frame properties throw if !frame.live
4 load(libdir + "asserts.js");
6 var g = newGlobal();
7 var f;
8 Debugger(g).onDebuggerStatement = function (frame) {
9 assertEq(frame.live, true);
10 assertEq(frame.type, "call");
11 assertEq(frame.this instanceof Object, true);
12 assertEq(frame.older instanceof Debugger.Frame, true);
13 assertEq(frame.callee instanceof Debugger.Object, true);
14 assertEq(frame.generator, false);
15 assertEq(frame.constructing, false);
16 assertEq(frame.arguments.length, 0);
17 f = frame;
18 };
20 g.eval("(function () { debugger; }).call({});");
21 assertEq(f.live, false);
22 assertThrowsInstanceOf(function () { f.type; }, Error);
23 assertThrowsInstanceOf(function () { f.this; }, Error);
24 assertThrowsInstanceOf(function () { f.older; }, Error);
25 assertThrowsInstanceOf(function () { f.callee; }, Error);
26 assertThrowsInstanceOf(function () { f.generator; }, Error);
27 assertThrowsInstanceOf(function () { f.constructing; }, Error);
28 assertThrowsInstanceOf(function () { f.arguments; }, Error);