Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index 400e1e49d66b61f6933efc356fa081df074220e6..3f7183072d6091001d9c3befe00ac198ce0820c3 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -796,24 +796,17 @@ void MarkCompactCollector::Prepare() { |
AbortWeakCells(); |
AbortTransitionArrays(); |
AbortCompaction(); |
- if (heap_->UsingEmbedderHeapTracer()) { |
- heap_->embedder_heap_tracer()->AbortTracing(); |
- heap_->clear_wrappers_to_trace(); |
- } |
+ heap_->local_embedder_heap_tracer()->AbortTracing(); |
marking_deque()->Clear(); |
was_marked_incrementally_ = false; |
} |
if (!was_marked_incrementally_) { |
- if (heap_->UsingEmbedderHeapTracer()) { |
- TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPER_PROLOGUE); |
- heap_->embedder_heap_tracer()->TracePrologue(); |
- } |
+ TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPER_PROLOGUE); |
+ heap_->local_embedder_heap_tracer()->TracePrologue(); |
} |
- if (heap_->UsingEmbedderHeapTracer()) { |
- heap_->embedder_heap_tracer()->EnterFinalPause(); |
- } |
+ heap_->local_embedder_heap_tracer()->EnterFinalPause(); |
// Don't start compaction if we are in the middle of incremental |
// marking cycle. We did not collect any slots. |
@@ -2140,10 +2133,9 @@ void MarkCompactCollector::ProcessEphemeralMarking( |
DCHECK(marking_deque()->IsEmpty() && !marking_deque()->overflowed()); |
bool work_to_do = true; |
while (work_to_do) { |
- if (heap_->UsingEmbedderHeapTracer()) { |
+ { |
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPER_TRACING); |
- heap_->RegisterWrappersWithEmbedderHeapTracer(); |
- heap_->embedder_heap_tracer()->AdvanceTracing( |
+ heap_->local_embedder_heap_tracer()->Trace( |
0, EmbedderHeapTracer::AdvanceTracingActions( |
EmbedderHeapTracer::ForceCompletionAction::FORCE_COMPLETION)); |
} |
@@ -2493,9 +2485,9 @@ void MarkCompactCollector::MarkLiveObjects() { |
{ |
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WEAK_CLOSURE_HARMONY); |
ProcessEphemeralMarking(&root_visitor, true); |
- if (heap_->UsingEmbedderHeapTracer()) { |
+ { |
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPER_EPILOGUE); |
- heap()->embedder_heap_tracer()->TraceEpilogue(); |
+ heap()->local_embedder_heap_tracer()->TraceEpilogue(); |
} |
} |
} |