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

Unified Diff: test/mjsunit/regress/regress-353004.js

Issue 2778623003: [typedarrays] Check detached buffer at start of typed array methods (Closed)
Patch Set: Use inline IS_TYPEDARRAY Created 3 years, 9 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
Index: test/mjsunit/regress/regress-353004.js
diff --git a/test/mjsunit/regress/regress-353004.js b/test/mjsunit/regress/regress-353004.js
index 7e1fb7e939e8b5c9cf59f01e84fe9d3316b2ac33..f035a30dbf3e0116713124dcb5decef7cc68bdd2 100644
--- a/test/mjsunit/regress/regress-353004.js
+++ b/test/mjsunit/regress/regress-353004.js
@@ -59,18 +59,9 @@ assertThrows(function() {
var buffer9 = new ArrayBuffer(1024);
var array9 = new Uint8Array(buffer9);
-var array10 = array9.subarray({valueOf : function() {
+assertThrows(() =>
+ array9.subarray({valueOf : function() {
%ArrayBufferNeuter(buffer9);
return 0;
- }}, 1024);
+ }}, 1024), TypeError);
assertEquals(0, array9.length);
-assertEquals(0, array10.length);
-
-var buffer11 = new ArrayBuffer(1024);
-var array11 = new Uint8Array(buffer11);
-var array12 = array11.subarray(0, {valueOf : function() {
- %ArrayBufferNeuter(buffer11);
- return 1024;
- }});
-assertEquals(0, array11.length);
-assertEquals(0, array12.length);
Dan Ehrenberg 2017/03/28 19:39:28 Rather than deleting the test, can you change it t
Choongwoo Han 2017/03/29 05:36:54 Done.

Powered by Google App Engine
This is Rietveld 408576698