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

Unified Diff: test/mjsunit/harmony/array-length.js

Issue 1428483002: Check that array length stays a safe integer in Array.prototype.push (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use 2**30 Created 5 years, 2 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 | « src/messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/array-length.js
diff --git a/test/mjsunit/harmony/array-length.js b/test/mjsunit/harmony/array-length.js
index df488196ff61a055ccbc615baa5589fe3f0f03e7..cc3b88105c840ffe2411013f9228b63aa33bd734 100644
--- a/test/mjsunit/harmony/array-length.js
+++ b/test/mjsunit/harmony/array-length.js
@@ -33,13 +33,7 @@ assertEquals(1, o.length);
assertEquals(1, o[0]);
var o = { length: Number.MAX_VALUE };
-Array.prototype.push.call(o, 1);
-assertEquals(o.length, Number.MAX_SAFE_INTEGER + 1);
-assertEquals(1, o[Number.MAX_SAFE_INTEGER]);
-
-Array.prototype.push.call(o, 2);
-assertEquals(o.length, Number.MAX_SAFE_INTEGER + 1);
-assertEquals(2, o[Number.MAX_SAFE_INTEGER]);
+assertThrows(() => Array.prototype.push.call(o, 1), TypeError);
// ArrayPop
« no previous file with comments | « src/messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698