js/src/jit-test/tests/auto-regress/bug763989.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 // Binary: cache/js-dbg-32-4bcbb63b89c3-linux
     2 // Flags: --ion-eager
     3 //
     4 var summary = '';
     5 function reportFailure (msg) {}
     6 function toPrinted(value) {
     7   value = value.replace(/\n/g, 'NL')
     8 }
     9 function reportCompare (expected, actual, description) {
    10   var output = "";
    11   output += "Expected value '" + toPrinted(expected) +
    12       "', Actual value '" + toPrinted(actual) + "' ";
    13       reportFailure (description + " : " + output);
    14 }
    15 var lfcode = new Array();
    16 lfcode.push("\
    17   expect = actual = 'No Exception';\
    18   reportCompare(expect, actual, summary);\
    19 ");
    20 lfcode.push("\
    21 function reportFailure (section, msg)\
    22   msg = inSection(section)+\"\"+msg;\
    23 ");
    24 lfcode.push("\
    25 try {\
    26   for (var i in expect) \
    27     reportCompare(expect[i], actual[i], getStatus(i));\
    28 } catch(exc1) {}\
    29 function getStatus(i) {}\
    30 ");
    31 lfcode.push("gczeal(2,(9));");
    32 lfcode.push("evaluate(\"reportCompare(expect, actual, summary);\");");
    33 	gcPreserveCode()
    34 while (true) {
    35 	var file = lfcode.shift(); if (file == undefined) { break; }
    36 	if (file == "evaluate") {
    37 	} else {
    38                 loadFile(file);
    39 	}
    40 }
    41 function loadFile(lfVarx) {
    42 	try {
    43 		if (lfVarx.substr(-3) != ".js") {
    44 			evaluate(lfVarx);
    45 		}
    46 	} catch (lfVare) {}
    47 }

mercurial