| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 67ff486905d498889a93e64c14717fc0569604b5..e229017daad07afa0d31a203c6d68bcec2c616b4 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -2121,8 +2121,6 @@ template<RightTrimMode trim_mode>
|
| static void RightTrimFixedArray(Heap* heap, FixedArray* elms, int to_trim) {
|
| ASSERT(elms->map() != HEAP->fixed_cow_array_map());
|
| // For now this trick is only applied to fixed arrays in new and paged space.
|
| - // In large object space the object's start must coincide with chunk
|
| - // and thus the trick is just not applicable.
|
| ASSERT(!HEAP->lo_space()->Contains(elms));
|
|
|
| const int len = elms->length();
|
| @@ -2218,7 +2216,7 @@ void Map::CopyAppendCallbackDescriptors(Handle<Map> map,
|
| }
|
|
|
| // If duplicates were detected, trim the descriptor array to the right size.
|
| - int new_array_size = DescriptorArray::SizeFor(new_number_of_descriptors);
|
| + int new_array_size = DescriptorArray::LengthFor(new_number_of_descriptors);
|
| if (new_array_size < result->length()) {
|
| RightTrimFixedArray<FROM_MUTATOR>(
|
| isolate->heap(), *result, result->length() - new_array_size);
|
| @@ -4884,7 +4882,7 @@ MaybeObject* Map::CopyReplaceDescriptors(DescriptorArray* descriptors,
|
| result->SetLastAdded(last_added);
|
| }
|
|
|
| - if (flag == INSERT_TRANSITION) {
|
| + if (flag == INSERT_TRANSITION && CanHaveMoreTransitions()) {
|
| TransitionArray* transitions;
|
| MaybeObject* maybe_transitions = AddTransition(name, result);
|
| if (!maybe_transitions->To(&transitions)) return maybe_transitions;
|
| @@ -5844,7 +5842,7 @@ MaybeObject* DescriptorArray::Allocate(int number_of_descriptors,
|
| }
|
| // Allocate the array of keys.
|
| MaybeObject* maybe_array =
|
| - heap->AllocateFixedArray(SizeFor(number_of_descriptors));
|
| + heap->AllocateFixedArray(LengthFor(number_of_descriptors));
|
| if (!maybe_array->To(&result)) return maybe_array;
|
|
|
| result->set(kEnumCacheIndex, Smi::FromInt(0));
|
|
|