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

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

Issue 2793233003: Revert of [typedarrays] Check detached buffer at start of typed array methods (Closed)
Patch Set: 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/regress/regress-353004.js ('k') | test/test262/test262.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-4665.js
diff --git a/test/mjsunit/regress/regress-4665.js b/test/mjsunit/regress/regress-4665.js
index 9aed4ed0ce44e453e47a2d0cdc30c11ae7171f9b..a75d68f105633322f9c9c8151dcf4a093e7bbff2 100644
--- a/test/mjsunit/regress/regress-4665.js
+++ b/test/mjsunit/regress/regress-4665.js
@@ -11,14 +11,12 @@
var buf = new Uint8Array(10)
buf.__proto__ = FirstBuffer.prototype
-assertThrows(() => buf.subarray(2), TypeError);
+var buf2 = buf.subarray(2)
+assertEquals(8, buf2.length);
// Second test case
-let seen_args = [];
-
function SecondBuffer (arg) {
- seen_args.push(arg);
var arr = new Uint8Array(arg)
arr.__proto__ = SecondBuffer.prototype
return arr
@@ -27,9 +25,7 @@
SecondBuffer.__proto__ = Uint8Array
var buf3 = new SecondBuffer(10)
-assertEquals([10], seen_args);
var buf4 = buf3.subarray(2)
-assertEquals(10, buf4.length);
-assertEquals([10, buf3.buffer], seen_args);
+assertEquals(8, buf4.length);
« no previous file with comments | « test/mjsunit/regress/regress-353004.js ('k') | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698