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

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

Issue 2778623003: [typedarrays] Check detached buffer at start of typed array methods (Closed)
Patch Set: rebase 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-4665.js
diff --git a/test/mjsunit/regress/regress-4665.js b/test/mjsunit/regress/regress-4665.js
index a75d68f105633322f9c9c8151dcf4a093e7bbff2..4d798f18e98b8646ddf47411aacdc36aca48cce2 100644
--- a/test/mjsunit/regress/regress-4665.js
+++ b/test/mjsunit/regress/regress-4665.js
@@ -11,8 +11,7 @@ FirstBuffer.__proto__ = Uint8Array
var buf = new Uint8Array(10)
buf.__proto__ = FirstBuffer.prototype
-var buf2 = buf.subarray(2)
-assertEquals(8, buf2.length);
+assertThrows(() => buf.subarray(2), TypeError);
// Second test case
Camillo Bruni 2017/04/03 08:18:14 Would you mind extending this test a bit to make i
Choongwoo Han 2017/04/03 08:42:29 Done.
@@ -28,4 +27,4 @@ var buf3 = new SecondBuffer(10)
var buf4 = buf3.subarray(2)
-assertEquals(8, buf4.length);
+assertEquals(10, buf4.length);
Camillo Bruni 2017/04/03 08:18:14 assertEquals([10, buf3.buffer], seen_args);
Choongwoo Han 2017/04/03 08:42:29 Done.

Powered by Google App Engine
This is Rietveld 408576698