Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 976130218f98a741c4beaa9fc2078d74f32cef1c..a5a4675650f0ddc2568d1b21e2d6a5f8bc1599e5 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -2777,8 +2777,14 @@ void Heap::CreateInitialObjects() { |
} |
{ |
+ Handle<WeakCell> cell = factory->NewWeakCell(factory->undefined_value()); |
+ set_empty_weak_cell(*cell); |
+ cell->clear(); |
+ |
Handle<FixedArray> cleared_optimized_code_map = |
factory->NewFixedArray(SharedFunctionInfo::kEntriesStart, TENURED); |
+ cleared_optimized_code_map->set(SharedFunctionInfo::kSharedCodeIndex, |
+ *cell); |
STATIC_ASSERT(SharedFunctionInfo::kEntriesStart == 1 && |
SharedFunctionInfo::kSharedCodeIndex == 0); |
set_cleared_optimized_code_map(*cleared_optimized_code_map); |