Debian Codegraph @

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

raw
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.
3
4 /*---
5 es6id: 24.2.2.1
6 esid: sec-dataview-buffer-byteoffset-bytelength
7 description: >
8 The new instance is extensible
9 info: |
10 24.2.2.1 DataView (buffer, byteOffset, byteLength )
11
12 ...
13 12. Let O be ? OrdinaryCreateFromConstructor(NewTarget, "%DataViewPrototype%",
14 « [[DataView]], [[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]] »).
15 ...
16 17. Return O.
17
18 9.1.13 OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ ,
19 internalSlotsList ] )
20
21 ...
22 3. Return ObjectCreate(proto, internalSlotsList).
23
24 9.1.12 ObjectCreate (proto [ , internalSlotsList ])
25
26 ...
27 5. Set the [[Extensible]] internal slot of obj to true.
28 ...
29 ---*/
30
31 var buffer = new ArrayBuffer(8);
32 var sample = new DataView(buffer, 0);
33
34 assert(Object.isExtensible(sample));