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 var g = newGlobal();
2 var dbg = Debugger(g);
3 dbg.onDebuggerStatement = function (frame) {
4 try {
5 frame.arguments[0].deleteProperty("x");
6 } catch (exc) {
7 assertEq(exc instanceof ReferenceError, true);
8 assertEq(exc.message, "diaf");
9 assertEq(exc.fileName, "fail");
10 assertEq(exc.lineNumber, 4);
11 assertEq(exc.columnNumber, 20);
12 return;
13 }
14 throw new Error("deleteProperty should throw");
15 };
17 g.evaluate("function h(obj) { debugger; } \n" +
18 "h(new Proxy({}, \n" +
19 " { deleteProperty: function () { \n" +
20 " var e = new ReferenceError('diaf', 'fail'); \n" +
21 " throw e; \n" +
22 " } \n" +
23 " }));");