Skip to content

Commit 50270e1

Browse files
iamstoliswoess
authored andcommitted
Regression test of OwnPropertyKeys(typedArrayWithDetachedBuffer).
1 parent 36aefe4 commit 50270e1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2023, 2023, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
6+
*/
7+
8+
/**
9+
* @option debug-builtin
10+
*/
11+
12+
load("assert.js");
13+
14+
var array = new Uint8Array(8);
15+
Debug.typedArrayDetachBuffer(array.buffer);
16+
17+
assertThrows(function() {
18+
Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, 'byteLength').get.call(array);
19+
}, TypeError);
20+
21+
assertSameContent([], Object.getOwnPropertyNames(array));

0 commit comments

Comments
 (0)