Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 9d6204df2a53974b81b37bb965a1ae2f288aa7ea..8178a1ab4854217aa3986576f3d4b47c4c8eb2bb 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -5454,7 +5454,15 @@ void Heap::TracePossibleWrapper(JSObject* js_object) { |
} |
void Heap::RegisterExternallyReferencedObject(Object** object) { |
- mark_compact_collector()->RegisterExternallyReferencedObject(object); |
+ HeapObject* heap_object = HeapObject::cast(*object); |
+ DCHECK(Contains(heap_object)); |
+ if (FLAG_incremental_marking_wrappers && incremental_marking()->IsMarking()) { |
+ IncrementalMarking::MarkGrey(this, heap_object); |
+ } else { |
+ DCHECK(mark_compact_collector()->in_use()); |
+ MarkBit mark_bit = ObjectMarking::MarkBitFrom(heap_object); |
+ mark_compact_collector()->MarkObject(heap_object, mark_bit); |
+ } |
} |
void Heap::TearDown() { |