Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index cfeda5d55711a71cd650131edd145da162d9e986..a186f4a7c265bacc36730074aa1fc4e7d0c05883 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -2815,6 +2815,9 @@ void Heap::CreateInitialObjects() { |
*WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, |
TENURED)); |
+ set_stack_frame_cache(*WeakHashTable::New( |
+ isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, TENURED)); |
+ |
set_weak_new_space_object_to_code_list( |
ArrayList::cast(*(factory->NewFixedArray(16, TENURED)))); |
weak_new_space_object_to_code_list()->SetLength(0); |
@@ -2937,6 +2940,7 @@ bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) { |
case kMicrotaskQueueRootIndex: |
case kDetachedContextsRootIndex: |
case kWeakObjectToCodeTableRootIndex: |
+ case kStackFrameCacheRootIndex: |
case kWeakNewSpaceObjectToCodeListRootIndex: |
case kRetainedMapsRootIndex: |
case kCodeCoverageListRootIndex: |
@@ -5855,13 +5859,16 @@ void Heap::AddWeakObjectToCodeDependency(Handle<HeapObject> obj, |
DCHECK_EQ(*dep, LookupWeakObjectToCodeDependency(obj)); |
} |
- |
DependentCode* Heap::LookupWeakObjectToCodeDependency(Handle<HeapObject> obj) { |
Object* dep = weak_object_to_code_table()->Lookup(obj); |
if (dep->IsDependentCode()) return DependentCode::cast(dep); |
return DependentCode::cast(empty_fixed_array()); |
} |
+void Heap::SetStackFrameCache(WeakHashTable* table) { |
+ set_stack_frame_cache(table); |
+} |
+ |
namespace { |
void CompactWeakFixedArray(Object* object) { |
if (object->IsWeakFixedArray()) { |