Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/DataView/instance-extensibility-sab.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // Copyright (C) 2017 Mozilla Corporation. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 es6id: 24.2.2.1
7 esid: sec-dataview-buffer-byteoffset-bytelength
8 description: >
9 The new instance is extensible
10 info: |
11 24.2.2.1 DataView (buffer, byteOffset, byteLength )
12
13 ...
14 12. Let O be ? OrdinaryCreateFromConstructor(NewTarget, "%DataViewPrototype%",
15 « [[DataView]], [[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]] »).
16 ...
17 17. Return O.
18
19 9.1.13 OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ ,
20 internalSlotsList ] )
21
22 ...
23 3. Return ObjectCreate(proto, internalSlotsList).
24
25 9.1.12 ObjectCreate (proto [ , internalSlotsList ])
26
27 ...
28 5. Set the [[Extensible]] internal slot of obj to true.
29 ...
30 features: [SharedArrayBuffer]
31 ---*/
32
33 var buffer = new SharedArrayBuffer(8);
34 var sample = new DataView(buffer, 0);
35
36 assert(Object.isExtensible(sample));