js/src/jit-test/tests/baseline/bug842326.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 function TestCase(n, d, e, a)
     2 this.passed = getTestCaseResult(e, a);
     3 function getTestCaseResult(expected, actual) {
     4     if (actual != actual)
     5 	return gTestcases;
     6 }
     7 gczeal(4);
     8 try {
     9     var TEST_STRING = new String("");
    10     new TestCase(null, 0,eval("x = new Boolean(true); x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(0)") );
    11     new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(1)"));
    12     new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(2)"));
    13     new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(3)"));
    14     new TestCase(null, null, Number.NaN, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(4)"));
    15     new new let (r) (function () {}) ();
    16 } catch(e) {}

mercurial