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

Unified Diff: src/objects.cc

Issue 18711: Do not violate the assumption that fast-case arrays have Smi length... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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 | « no previous file | test/mjsunit/regress/regress-201.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 1131)
+++ src/objects.cc (working copy)
@@ -5160,6 +5160,7 @@
uint32_t new_length = 0;
if (IsJSArray()) {
CHECK(Array::IndexFromObject(JSArray::cast(this)->length(), &new_length));
+ JSArray::cast(this)->set_length(Smi::FromInt(new_length));
} else {
new_length = Dictionary::cast(elements())->max_number_key() + 1;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-201.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698