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.
4 esid: sec-integer-indexed-exotic-objects-hasproperty-p
6 Returns false if this has a detached buffer (honoring the Realm of the
7 current execution context)
9 9.4.5.2 [[HasProperty]](P)
12 3. If Type(P) is String, then
13 a. Let numericIndex be ! CanonicalNumericIndexString(P).
14 b. If numericIndex is not undefined, then
15 i. Let buffer be O.[[ViewedArrayBuffer]].
16 ii. If IsDetachedBuffer(buffer) is true, return false.
18 includes: [testBigIntTypedArray.js, detachArrayBuffer.js]
19 features: [align-detached-buffer-semantics-with-web-reality, BigInt, cross-realm, Reflect, TypedArray]
22 var other = $262.createRealm().global;
24 testWithBigIntTypedArrayConstructors(function(TA) {
25 var OtherTA = other[TA.name];
26 var sample = new OtherTA(1);
28 $DETACHBUFFER(sample.buffer);
30 assert.sameValue(Reflect.has(sample, '0'), false, 'Reflect.has(sample, "0") must return false');