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

Unified Diff: test/mjsunit/elements-length-no-holey.js

Issue 11358011: Ensure reducing the length of an array doesn't make it go holey. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 1 month 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/elements.cc ('k') | test/mjsunit/regress/regress-delete-empty-double.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/elements-length-no-holey.js
diff --git a/test/mjsunit/regress/regress-2286.js b/test/mjsunit/elements-length-no-holey.js
similarity index 93%
copy from test/mjsunit/regress/regress-2286.js
copy to test/mjsunit/elements-length-no-holey.js
index 372451ec44ee067789fbf156c782bec6e5b36408..5bac296e1a65f51d9cdfa8406a7c0cb50f937a33 100644
--- a/test/mjsunit/regress/regress-2286.js
+++ b/test/mjsunit/elements-length-no-holey.js
@@ -27,6 +27,7 @@
// Flags: --allow-natives-syntax
-assertThrows("f()", ReferenceError);
-assertThrows("%f()", TypeError);
-assertThrows("%_f()", SyntaxError);
+a = [1,2,3];
+a.length = 1;
+assertFalse(%HasFastHoleyElements(a));
+assertTrue(%HasFastSmiElements(a));
« no previous file with comments | « src/elements.cc ('k') | test/mjsunit/regress/regress-delete-empty-double.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698