Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1418)

Unified Diff: test/mjsunit/es6/typedarray-every.js

Issue 2827443002: Reland [typedarrays] Check detached buffer at start of typed array methods (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/typedarray-copywithin.js ('k') | test/mjsunit/es6/typedarray-fill.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/typedarray-every.js
diff --git a/test/mjsunit/es6/typedarray-every.js b/test/mjsunit/es6/typedarray-every.js
index 4ceee5f3aa578eb42c779b0b5b54a49eefd5461b..a3498f57866778c1b8646814ea7f12f1ab8c9308 100644
--- a/test/mjsunit/es6/typedarray-every.js
+++ b/test/mjsunit/es6/typedarray-every.js
@@ -159,6 +159,11 @@ function TestTypedArrayForEach(constructor) {
assertEquals(Array.prototype.every.call(a,
function(elt) { x += elt; return true; }), true);
assertEquals(x, 4);
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.every(() => true), TypeError);
}
for (i = 0; i < typedArrayConstructors.length; i++) {
« no previous file with comments | « test/mjsunit/es6/typedarray-copywithin.js ('k') | test/mjsunit/es6/typedarray-fill.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698