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

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: Created 8 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
Index: test/mjsunit/elements-length-no-holey.js
diff --git a/test/mjsunit/regress/regress-113924.js b/test/mjsunit/elements-length-no-holey.js
similarity index 94%
copy from test/mjsunit/regress/regress-113924.js
copy to test/mjsunit/elements-length-no-holey.js
index 3ecdec48f219b9ea545702ebf3a396debe7a93f8..a753fd0651ab6fdefef6afa872aa67f54a9721db 100644
--- a/test/mjsunit/regress/regress-113924.js
+++ b/test/mjsunit/elements-length-no-holey.js
@@ -25,7 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-var count=12000;
-while(count--) {
- eval("var a = new Object(10); a[2] += 7;");
-}
+// Flags: --allow-natives-syntax
+
+a = [1,2,3];
+a.length = 1;
+assertFalse(%HasFastHoleyElements(a));
danno 2012/10/31 18:23:11 assertTrue(%FastSmiElements(a));

Powered by Google App Engine
This is Rietveld 408576698