summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/typedarray-foreach.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/typedarray-foreach.js')
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-foreach.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/es6/typedarray-foreach.js b/deps/v8/test/mjsunit/es6/typedarray-foreach.js
index b9789805f6..7a846b1ac7 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-foreach.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-foreach.js
@@ -148,6 +148,11 @@ function TestTypedArrayForEach(constructor) {
assertEquals(Array.prototype.forEach.call(a,
function(elt) { x += elt; }), undefined);
assertEquals(x, 4);
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.forEach(() => true), TypeError);
}
for (i = 0; i < typedArrayConstructors.length; i++) {