js/src/jit-test/tests/arguments/testDelArg3Strict.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 "use strict";
     3 function assertGood(x) {
     4     assertEq(x, "good");
     5 }
     7 (function() {
     8     var a = arguments;
     9     return function() {
    10         assertGood.apply(null, a);
    11     }
    12 })("good")();
    14 (function() {
    15     var a = arguments;
    16     return function() {
    17         a[0] = "good";
    18         assertGood.apply(null, a);
    19     }
    20 })("bad")();
    22 Object.prototype[0] = "good";
    24 (function() {
    25     var a = arguments;
    26     return function() {
    27         delete a[0];
    28         assertGood.apply(null, a);
    29     }
    30 })("bad")();
    32 delete Object.prototype[0];
    34 function assertUndefined(x) {
    35     assertEq(x, undefined);
    36 }
    38 (function() {
    39     var a = arguments;
    40     return function() {
    41         a[0] = "bad";
    42         assertUndefined.apply(null, a);
    43     }
    44 })()();

mercurial