Index: test/mjsunit/es6/typedarray-tostring.js |
diff --git a/test/mjsunit/es6/typedarray-tostring.js b/test/mjsunit/es6/typedarray-tostring.js |
index 9d49cb1cc9a76b23c0e638f69bf71c42fa4e6e43..a1fa9c7665c46a393e6db7eabb3ac301e0b143a4 100644 |
--- a/test/mjsunit/es6/typedarray-tostring.js |
+++ b/test/mjsunit/es6/typedarray-tostring.js |
@@ -5,6 +5,8 @@ |
// Array's toString should call the object's own join method, if one exists and |
// is callable. Otherwise, just use the original Object.toString function. |
+// Flags: --allow-natives-syntax |
+ |
var typedArrayConstructors = [ |
Uint8Array, |
Int8Array, |
@@ -96,4 +98,11 @@ for (var constructor of typedArrayConstructors) { |
Number.prototype.toLocaleString = NumberToLocaleString; |
})(); |
+ |
+ // Detached Operation |
+ var array = new constructor([1, 2, 3]); |
+ %ArrayBufferNeuter(array.buffer); |
+ assertThrows(() => array.join(), TypeError); |
+ assertThrows(() => array.toLocalString(), TypeError); |
+ assertThrows(() => array.toString(), TypeError); |
} |