Index: src/transitions.cc |
diff --git a/src/transitions.cc b/src/transitions.cc |
index f00f33146792df503ffe9cd333bb0206e87c97b2..9870e17d83925040e952876c4263cc662f09be78 100644 |
--- a/src/transitions.cc |
+++ b/src/transitions.cc |
@@ -255,8 +255,10 @@ void TransitionArray::PutPrototypeTransition(Handle<Map> map, |
// Grow array by factor 2 up to MaxCachedPrototypeTransitions. |
int new_capacity = Min(kMaxCachedPrototypeTransitions, transitions * 2); |
if (new_capacity == capacity) return; |
+ int grow_by = new_capacity - capacity; |
- cache = FixedArray::CopySize(cache, header + new_capacity); |
+ Isolate* isolate = map->GetIsolate(); |
+ cache = isolate->factory()->CopyFixedArrayAndGrow(cache, grow_by); |
if (capacity < 0) { |
// There was no prototype transitions array before, so the size |
// couldn't be copied. Initialize it explicitly. |