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