Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 51675d4c21597465a1e4fa790127b4e33d411d6f..f4a637c008612f9faaf858d14d00855c3865576e 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -9539,9 +9539,9 @@ void SharedFunctionInfo::AddToOptimizedCodeMap( |
// Copy old map and append one new entry. |
Handle<FixedArray> old_code_map = Handle<FixedArray>::cast(value); |
DCHECK(!shared->SearchOptimizedCodeMap(*native_context, osr_ast_id).code); |
+ new_code_map = |
+ isolate->factory()->CopyFixedArrayAndGrow(old_code_map, kEntryLength); |
old_length = old_code_map->length(); |
- new_code_map = FixedArray::CopySize( |
- old_code_map, old_length + kEntryLength); |
// Zap the old map for the sake of the heap verifier. |
if (Heap::ShouldZapGarbage()) { |
Object** data = old_code_map->data_start(); |