Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 6dd2a99518753b694a64e44b9848d0c9713a4935..feca2719f3481c59feb9c8c712be07af03e67593 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3653,12 +3653,12 @@ void Map::SetBackPointer(Object* value, WriteBarrierMode mode) { |
ASSERT((value->IsUndefined() && GetBackPointer()->IsMap()) || |
(value->IsMap() && GetBackPointer()->IsUndefined())); |
Object* object = READ_FIELD(this, kInstanceDescriptorsOrBackPointerOffset); |
- if (object->IsMap()) { |
+ if (object->IsDescriptorArray()) { |
+ DescriptorArray::cast(object)->set_back_pointer_storage(value); |
+ } else { |
WRITE_FIELD(this, kInstanceDescriptorsOrBackPointerOffset, value); |
CONDITIONAL_WRITE_BARRIER( |
GetHeap(), this, kInstanceDescriptorsOrBackPointerOffset, value, mode); |
- } else { |
- DescriptorArray::cast(object)->set_back_pointer_storage(value); |
} |
} |
@@ -4301,7 +4301,7 @@ MaybeObject* JSFunction::set_initial_map_and_cache_transitions( |
Map* new_map; |
ElementsKind next_kind = GetFastElementsKindFromSequenceIndex(i); |
MaybeObject* maybe_new_map = |
- current_map->CreateNextElementsTransition(next_kind); |
+ current_map->CopyAsElementsKind(next_kind, INSERT_TRANSITION); |
if (!maybe_new_map->To(&new_map)) return maybe_new_map; |
maps->set(next_kind, new_map); |
current_map = new_map; |