js/src/jit-test/tests/ion/bug820873.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.

     2 var lfcode = new Array();
     3 lfcode.push("3");
     4 lfcode.push("with(evalcx('')) this.__defineGetter__('x', Function);");
     5 lfcode.push("gczeal(2)");
     6 lfcode.push("4");
     7 lfcode.push("\
     8 	var log = '';\
     9 	for (var { m  } = i = 0 ;  ; i++) {\
    10 		log += x; \
    11 		if (x === 6)\
    12 			a.slow = true; if (i > 1000) break;\
    13 	}\
    14 ");
    15 while (true) {
    16 	var file = lfcode.shift(); if (file == undefined) { break; }
    17         loadFile(file)
    18 }
    19 function loadFile(lfVarx) {
    20 	if (!isNaN(lfVarx)) {
    21             lfRunTypeId = parseInt(lfVarx);
    22         } else {
    23             switch (lfRunTypeId) {
    24                 case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break;
    25                 case 4: eval("(function() { " + lfVarx + " })();"); break;
    26 	}
    27     }
    28 }

mercurial