summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/typedarray-reverse.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/typedarray-reverse.js')
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-reverse.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/es6/typedarray-reverse.js b/deps/v8/test/mjsunit/es6/typedarray-reverse.js
index f32813e155..bfeb227c5c 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-reverse.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-reverse.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
function ArrayMaker(x) {
return x;
}
@@ -51,4 +53,11 @@ for (var constructor of arrayConstructors) {
}
assertEquals(0, a.reverse.length);
+
+ // Detached Operation
+ if (constructor != ArrayMaker) {
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.reverse(), TypeError);
+ }
}