Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index f7916ed7fc5baecba2bdb5152b93991d21c4252a..ccbeadc79c920f01c170bba2503f5756d8497ad6 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2643,7 +2643,7 @@ void Isolate::EnqueueMicrotask(Handle<Object> microtask) { |
queue = factory()->NewFixedArray(8); |
heap()->set_microtask_queue(*queue); |
} else if (num_tasks == queue->length()) { |
- queue = FixedArray::CopySize(queue, num_tasks * 2); |
+ queue = factory()->CopyFixedArrayAndGrow(queue, num_tasks); |
heap()->set_microtask_queue(*queue); |
} |
DCHECK(queue->get(num_tasks)->IsUndefined()); |
@@ -2744,7 +2744,7 @@ void Isolate::AddDetachedContext(Handle<Context> context) { |
Handle<WeakCell> cell = factory()->NewWeakCell(context); |
Handle<FixedArray> detached_contexts(heap()->detached_contexts()); |
int length = detached_contexts->length(); |
- detached_contexts = FixedArray::CopySize(detached_contexts, length + 2); |
+ detached_contexts = factory()->CopyFixedArrayAndGrow(detached_contexts, 2); |
detached_contexts->set(length, Smi::FromInt(0)); |
detached_contexts->set(length + 1, *cell); |
heap()->set_detached_contexts(*detached_contexts); |