| Index: src/transitions.cc
|
| diff --git a/src/transitions.cc b/src/transitions.cc
|
| index 43a0eb7f9944ce39d1b2382fb7be1d0d8aa74c41..320fc7018129ce6fdd7fa120f6d7ec741028b888 100644
|
| --- a/src/transitions.cc
|
| +++ b/src/transitions.cc
|
| @@ -131,26 +131,11 @@ Handle<TransitionArray> TransitionArray::CopyInsert(Handle<Map> map,
|
| Handle<TransitionArray> result =
|
| map->GetIsolate()->factory()->NewTransitionArray(new_size);
|
|
|
| - // The map's transition array may have disappeared or grown smaller during
|
| - // the allocation above as it was weakly traversed. Trim the result copy if
|
| - // needed, and recompute variables.
|
| + // The map's transition array may grown smaller during the allocation above as
|
| + // it was weakly traversed, though it is guaranteed not to disappear. Trim the
|
| + // result copy if needed, and recompute variables.
|
| + ASSERT(map->HasTransitionArray());
|
| DisallowHeapAllocation no_gc;
|
| - if (!map->HasTransitionArray()) {
|
| - if (flag == SIMPLE_TRANSITION) {
|
| - ASSERT(result->length() >= kSimpleTransitionSize);
|
| - result->Shrink(kSimpleTransitionSize);
|
| - result->set(kSimpleTransitionTarget, *target);
|
| - } else {
|
| - ASSERT(result->length() >= ToKeyIndex(1));
|
| - result->Shrink(ToKeyIndex(1));
|
| - result->set(kPrototypeTransitionsIndex, Smi::FromInt(0));
|
| - result->NoIncrementalWriteBarrierSet(0, *name, *target);
|
| - }
|
| - result->set_back_pointer_storage(map->GetBackPointer());
|
| -
|
| - return result;
|
| - }
|
| -
|
| TransitionArray* array = map->transitions();
|
| if (array->number_of_transitions() != number_of_transitions) {
|
| ASSERT(array->number_of_transitions() < number_of_transitions);
|
|
|