tor-browser

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

prop-desc.js (1104B)


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