diff -r 000000000000 -r 6474c204b198 js/src/tests/js1_8_5/regress/regress-571014.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/tests/js1_8_5/regress/regress-571014.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,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");