tor-browser

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

property-order.js (581B)


      1 // Copyright (C) 2020 ExE Boss. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-createbuiltinfunction
      5 description: Proxy constructor property order
      6 info: |
      7  Set order: "length", "name", ...
      8 features: [Proxy]
      9 ---*/
     10 
     11 var propNames = Object.getOwnPropertyNames(Proxy);
     12 var lengthIndex = propNames.indexOf("length");
     13 var nameIndex = propNames.indexOf("name");
     14 
     15 assert(lengthIndex >= 0 && nameIndex === lengthIndex + 1,
     16  "The `length` property comes before the `name` property on built-in functions");
     17 
     18 reportCompare(0, 0);