michael@0: michael@0: var F, o; michael@0: michael@0: F = function () {}; michael@0: F.prototype = new ArrayBuffer(1); michael@0: o = new F(); michael@0: try { michael@0: o.byteLength; michael@0: } catch (ex) { michael@0: // o is not a platform object michael@0: assertEq(ex instanceof TypeError, true); michael@0: } michael@0: michael@0: o = {}; michael@0: o.__proto__ = new Int32Array(1); michael@0: try { michael@0: o.buffer.byteLength; michael@0: } catch (ex) { michael@0: // o is not a platform object michael@0: assertEq(ex instanceof TypeError, true); michael@0: } michael@0: michael@0: F = function () {}; michael@0: F.prototype = new Int32Array(1); michael@0: o = new F(); michael@0: try { michael@0: o.slice(0, 1); michael@0: reportFailure("Expected an exception!"); michael@0: } catch (ex) { michael@0: } michael@0: michael@0: reportCompare("ok", "ok", "bug 571014");