blob: 0f8a51c4d55720ea761dcb24878b2a378db66c3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
var F, o;
F = function () {};
F.prototype = new ArrayBuffer(1);
o = new F();
try {
o.byteLength;
} catch (ex) {
// o is not a platform object
assertEq(ex instanceof TypeError, true);
}
o = {};
o.__proto__ = new Int32Array(1);
try {
o.buffer.byteLength;
} catch (ex) {
// o is not a platform object
assertEq(ex instanceof TypeError, true);
}
F = function () {};
F.prototype = new Int32Array(1);
o = new F();
try {
o.slice(0, 1);
reportFailure("Expected an exception!");
} catch (ex) {
}
reportCompare("ok", "ok", "bug 571014");
|