js/src/jit-test/tests/auto-regress/bug687399.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-64-06445f55f009-linux
     2 // Flags: -m -n -a
     3 //
     5 if (!this.emulatedJSON) {
     6     emulatedJSON = function () {
     7         function stringify(value, whitelist) {
     8             var a, i, v;
     9             switch (typeof value) {
    10             case 'string':
    11                 if (!(value.propertyIsEnumerable('length'))) {
    12                     for (i = 0; i < l; i += 1) {
    13                         k = whitelist[i];
    14                         if (typeof k === 'string') {
    15                             if (i %= 'not visited') {}
    16                         }
    17                     }
    18                 }
    19             }
    20         }
    21         return {
    22             stringify: stringify,
    23         };
    24     }();
    25     var testPairs = [ ['{"five":5}'] ]
    26     for (var i = 0; i < testPairs.length; i++) {
    27         var pair = testPairs[i];
    28         var s = emulatedJSON.stringify(pair[1])
    29     }
    30 }

mercurial