tor-browser

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

prop-desc.js (1263B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Atomics')) -- Atomics is not enabled unconditionally
      2 // Copyright (C) 2016 The V8 Project authors. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-atomics-object
      7 description: >
      8  Property descriptor of Atomics
      9 info: |
     10  The Atomics Object
     11 
     12  ...
     13  The Atomics object does not have a [[Construct]] internal method;
     14  it is not possible to use the Atomics object as a constructor with the new operator.
     15 
     16  The Atomics object does not have a [[Call]] internal method;
     17  it is not possible to invoke the Atomics object as a function.
     18 
     19  17 ECMAScript Standard Built-in Objects:
     20 
     21  Every other data property described in clauses 18 through 26 and in Annex B.2
     22  has the attributes { [[Writable]]: true, [[Enumerable]]: false,
     23  [[Configurable]]: true } unless otherwise specified.
     24 includes: [propertyHelper.js]
     25 features: [Atomics]
     26 ---*/
     27 
     28 assert.sameValue(typeof Atomics, "object", 'The value of `typeof Atomics` is "object"');
     29 
     30 assert.throws(TypeError, function() {
     31  Atomics();
     32 });
     33 
     34 assert.throws(TypeError, function() {
     35  new Atomics();
     36 });
     37 
     38 verifyProperty(this, "Atomics", {
     39  enumerable: false,
     40  writable: true,
     41  configurable: true
     42 });
     43 
     44 reportCompare(0, 0);