tor-browser

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

property-description-must-be-an-object-not-bigint.js (789B)


      1 // Copyright (C) 2020 Rick Waldron. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-objectdefineproperties
      5 description: >
      6  Property description must be an object (bigint)
      7 info: |
      8  ObjectDefineProperties ( O, Properties )
      9 
     10  ...
     11  For each element nextKey of keys, do
     12    Let propDesc be ? props.[[GetOwnProperty]](nextKey).
     13    If propDesc is not undefined and propDesc.[[Enumerable]] is true, then
     14    Let descObj be ? Get(props, nextKey).
     15    Let desc be ? ToPropertyDescriptor(descObj).
     16  ...
     17 
     18  ToPropertyDescriptor ( Obj )
     19 
     20  If Type(Obj) is not Object, throw a TypeError exception.
     21  ...
     22 features: [BigInt]
     23 ---*/
     24 
     25 assert.throws(TypeError, () => {
     26  Object.defineProperties({}, {
     27    a: 0n
     28  });
     29 });
     30 
     31 reportCompare(0, 0);