OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 var typedArrayConstructors = [ | |
6 Uint8Array, | |
7 Int8Array, | |
8 Uint16Array, | |
9 Int16Array, | |
10 Uint32Array, | |
11 Int32Array, | |
12 Uint8ClampedArray, | |
13 Float32Array, | |
14 Float64Array | |
15 ]; | |
16 | |
17 var lengthCalled = false; | |
18 function lengthValue() { | |
19 assertFalse(lengthCalled); | |
20 lengthCalled = true; | |
21 return 5; | |
22 } | |
23 | |
24 for (var constructor of typedArrayConstructors) { | |
25 lengthCalled = false; | |
26 var a = new constructor(10); | |
27 a.set({length: {valueOf: lengthValue}}); | |
Dan Ehrenberg
2015/07/13 23:47:30
Just as a sanity check, test here that lengthCalle
| |
28 } | |
OLD | NEW |