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 /*
2 * Debugger.Source.prototype.text should correctly retrieve the source for
3 * code compiled with CompileOptions::LAZY_SOURCE.
4 */
6 // withSourceHook isn't defined if you pass the shell the --fuzzing-safe
7 // option. Skip this test silently, to avoid spurious failures.
8 if (typeof withSourceHook != 'function')
9 quit(0);
11 let g = newGlobal();
12 let dbg = new Debugger(g);
14 function test(source) {
15 // To ensure that we're getting the value the source hook returns, make
16 // it differ from the actual source.
17 let frobbed = source.replace(/debugger/, 'reggubed');
18 let log = '';
20 withSourceHook(function (url) {
21 log += 's';
22 assertEq(url, "BanalBivalve.jsm");
23 return frobbed;
24 }, () => {
25 dbg.onDebuggerStatement = function (frame) {
26 log += 'd';
27 assertEq(frame.script.source.text, frobbed);
28 }
30 g.evaluate(source, { fileName: "BanalBivalve.jsm",
31 sourceIsLazy: true });
32 });
34 assertEq(log, 'ds');
35 }
37 test("debugger; // Ignominious Iguana");
38 test("(function () { debugger; /* Meretricious Marmoset */})();");
39 test("(() => { debugger; })(); // Gaunt Gibbon");