js/src/jit-test/tests/gc/bug-950927.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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.

michael@0 1 var lfcode = new Array();
michael@0 2 lfcode.push("\
michael@0 3 var optionNames = options().split(',');\
michael@0 4 for (var i = 0; i < optionNames.length; i++) {}\
michael@0 5 ");
michael@0 6 lfcode.push("gczeal(7,5);");
michael@0 7 lfcode.push("4");
michael@0 8 lfcode.push("\
michael@0 9 var S = new Array();\
michael@0 10 var x = 1;\
michael@0 11 for ( var i = 8; i >= 0; i-- ) {\
michael@0 12 S[0] += ' ';\
michael@0 13 S[0] += ',';\
michael@0 14 }\
michael@0 15 eval(S);\
michael@0 16 ");
michael@0 17 var lfRunTypeId = -1;
michael@0 18 while (true) {
michael@0 19 var file = lfcode.shift(); if (file == undefined) { break; }
michael@0 20 loadFile(file)
michael@0 21 }
michael@0 22 function loadFile(lfVarx) {
michael@0 23 if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) {
michael@0 24 switch (lfRunTypeId) {
michael@0 25 case 4: eval("(function() { " + lfVarx + " })();"); break;
michael@0 26 default: evaluate(lfVarx, { noScriptRval : true }); break;
michael@0 27 }
michael@0 28 } else if (!isNaN(lfVarx)) {
michael@0 29 lfRunTypeId = parseInt(lfVarx);
michael@0 30 }
michael@0 31 }

mercurial