diff options
Diffstat (limited to 'deps/v8/src/heap/cppgc/visitor.cc')
-rw-r--r-- | deps/v8/src/heap/cppgc/visitor.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/deps/v8/src/heap/cppgc/visitor.cc b/deps/v8/src/heap/cppgc/visitor.cc index 61eedf3bd9..33786f6fce 100644 --- a/deps/v8/src/heap/cppgc/visitor.cc +++ b/deps/v8/src/heap/cppgc/visitor.cc @@ -68,15 +68,20 @@ void ConservativeTracingVisitor::TraceConservativelyIfNeeded( void ConservativeTracingVisitor::TraceConservativelyIfNeeded( HeapObjectHeader& header) { - if (!header.IsInConstruction<HeapObjectHeader::AccessMode::kNonAtomic>()) { - visitor_.Visit( - header.Payload(), - {header.Payload(), - GlobalGCInfoTable::GCInfoFromIndex(header.GetGCInfoIndex()).trace}); + if (!header.IsInConstruction<AccessMode::kNonAtomic>()) { + VisitFullyConstructedConservatively(header); } else { - VisitConservatively(header, TraceConservatively); + VisitInConstructionConservatively(header, TraceConservatively); } } +void ConservativeTracingVisitor::VisitFullyConstructedConservatively( + HeapObjectHeader& header) { + visitor_.Visit( + header.Payload(), + {header.Payload(), + GlobalGCInfoTable::GCInfoFromIndex(header.GetGCInfoIndex()).trace}); +} + } // namespace internal } // namespace cppgc |