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

     1 var lfcode = new Array();
     2 lfcode.push("3");
     3 lfcode.push("\
     4 	gczeal(2);\
     5 	for (let q = 0; q < 50; ++q) {\
     6 		var w = \"r\".match(/r/);\
     7 	}\
     8 	let (eval) (function  (a) {\
     9 		Function = gczeal;\
    10 	})();\
    11 	// .js\
    12 ");
    13 lfcode.push(" // .js");
    14 lfcode.push(" // .js");
    15 lfcode.push(" // .js");
    16 while (true) {
    17 	var file = lfcode.shift(); if (file == undefined) { break; }
    18         loadFile(file)
    19 }
    20 function loadFile(lfVarx) {
    21     try {
    22         if (lfVarx.substr(-3) == ".js") {
    23 	    uneval("foo");
    24             switch (lfRunTypeId) {
    25                 case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break;
    26                 case 4: eval("(function() { " + lfVarx + " })();"); break;
    27             }
    28         } else if (!isNaN(lfVarx)) {
    29             lfRunTypeId = parseInt(lfVarx);
    30 	}
    31     } catch (lfVare) {}
    32 }

mercurial