tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nonconfigurable-nonenumerable-nonwritable-descriptors-basic.js (857B)


      1 // Copyright (C) 2017 Caio Lima. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: Mapped arguments property descriptor change with non-configurable, non-enumerable and non-writable property
      6 info: |
      7    Mapping stop working when property is set to non-writable. The
      8    descriptor's enumerable property is the one set before the mapping removal.
      9 flags: [noStrict]
     10 esid: sec-arguments-exotic-objects-defineownproperty-p-desc
     11 includes: [propertyHelper.js]
     12 ---*/
     13 
     14 function fn(a) {
     15  Object.defineProperty(arguments, "0", {configurable: false, enumerable: false, writable: false});
     16 
     17  // Postcondition: Arguments mapping is removed.
     18  a = 2;
     19 
     20  verifyProperty(arguments, "0", {
     21    value: 1,
     22    writable: false,
     23    enumerable: false,
     24    configurable: false,
     25  });
     26 }
     27 fn(1);
     28 
     29 
     30 reportCompare(0, 0);