tor-browser

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

primitive-symbol.js (932B)


      1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-object.getownpropertydescriptor
      6 description: >
      7  Symbol primitive as first argument is coerced to object.
      8 info: |
      9  Object.getOwnPropertyDescriptor ( O, P )
     10 
     11  1. Let obj be ? ToObject(O).
     12  [...]
     13  3. Let desc be ? obj.[[GetOwnProperty]](key).
     14  4. Return FromPropertyDescriptor(desc).
     15 
     16  Properties of Symbol Instances
     17 
     18  Symbol instances are ordinary objects that inherit properties from the Symbol prototype object.
     19  Symbol instances have a [[SymbolData]] internal slot.
     20  The [[SymbolData]] internal slot is the Symbol value represented by this Symbol object.
     21 features: [Symbol]
     22 ---*/
     23 
     24 assert.sameValue(Object.getOwnPropertyDescriptor(Symbol(), 'foo'), undefined);
     25 assert.sameValue(Object.getOwnPropertyDescriptor(Symbol('foo'), 'description'), undefined);
     26 
     27 reportCompare(0, 0);