is-a-constructor.js (1018B)
1 // |reftest| skip-if(!this.hasOwnProperty('SharedArrayBuffer')) -- SharedArrayBuffer is not enabled unconditionally 2 // Copyright (C) 2020 Rick Waldron. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-ecmascript-standard-built-in-objects 7 description: > 8 The SharedArrayBuffer constructor implements [[Construct]] 9 info: | 10 IsConstructor ( argument ) 11 12 The abstract operation IsConstructor takes argument argument (an ECMAScript language value). 13 It determines if argument is a function object with a [[Construct]] internal method. 14 It performs the following steps when called: 15 16 If Type(argument) is not Object, return false. 17 If argument has a [[Construct]] internal method, return true. 18 Return false. 19 includes: [isConstructor.js] 20 features: [Reflect.construct, SharedArrayBuffer] 21 ---*/ 22 23 assert.sameValue(isConstructor(SharedArrayBuffer), true, 'isConstructor(SharedArrayBuffer) must return true'); 24 new SharedArrayBuffer(1); 25 26 27 reportCompare(0, 0);