tor-browser

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

message-method-prop.js (879B)


      1 // Copyright (C) 2019 Leo Balter. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-aggregate-error
      6 description: >
      7  Creates a method property for message
      8 info: |
      9  AggregateError ( errors, message )
     10 
     11  ...
     12  5. If message is not undefined, then
     13    a. Let msg be ? ToString(message).
     14    b. Perform ! CreateMethodProperty(O, "message", msg).
     15  6. Return O.
     16 
     17  CreateMethodProperty ( O, P, V )
     18 
     19  ...
     20  3. Let newDesc be the PropertyDescriptor { [[Value]]: V, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.
     21  4. Return ? O.[[DefineOwnProperty]](P, newDesc).
     22 features: [AggregateError]
     23 includes: [propertyHelper.js]
     24 ---*/
     25 
     26 var obj = new AggregateError([], '42');
     27 
     28 verifyProperty(obj, 'message', {
     29  value: '42',
     30  writable: true,
     31  enumerable: false,
     32  configurable: true,
     33 });
     34 
     35 reportCompare(0, 0);