Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index aca86484bd01b8a1dc372ac0fac8a175dd2b266c..391fcba1eefdb303f00d7d3dd0e54b9cf0780b04 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -116,6 +116,7 @@ Heap::Heap() |
inline_allocation_disabled_(false), |
total_regexp_code_generated_(0), |
tracer_(nullptr), |
+ embedder_heap_tracer_(nullptr), |
high_survival_rate_period_length_(0), |
promoted_objects_size_(0), |
promotion_ratio_(0), |
@@ -5420,6 +5421,13 @@ void Heap::NotifyDeserializationComplete() { |
#endif // DEBUG |
} |
+void Heap::RegisterExternallyReferencedObject(Object** object) { |
+ DCHECK(mark_compact_collector()->in_use()); |
+ HeapObject* heap_object = HeapObject::cast(*object); |
+ DCHECK(Contains(heap_object)); |
+ MarkBit mark_bit = Marking::MarkBitFrom(heap_object); |
+ mark_compact_collector()->MarkObject(heap_object, mark_bit); |
+} |
void Heap::TearDown() { |
#ifdef VERIFY_HEAP |
@@ -5585,6 +5593,11 @@ void Heap::RemoveGCEpilogueCallback(v8::Isolate::GCCallback callback) { |
UNREACHABLE(); |
} |
+void Heap::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) { |
+ DCHECK_NOT_NULL(tracer); |
+ CHECK_NULL(embedder_heap_tracer_); |
+ embedder_heap_tracer_ = tracer; |
+} |
// TODO(ishell): Find a better place for this. |
void Heap::AddWeakObjectToCodeDependency(Handle<HeapObject> obj, |