| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index 42307cd84cf5b2789e136fac80fef789f837d45b..52e1706b82ac3637625f155c558f640c08362c23 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.
|
| @@ -2141,10 +2134,9 @@ void MarkCompactCollector::ProcessEphemeralMarking(
|
| bool work_to_do = true;
|
| while (work_to_do) {
|
| if (!only_process_harmony_weak_collections) {
|
| - if (heap_->UsingEmbedderHeapTracer()) {
|
| + if (heap_->local_embedder_heap_tracer()->InUse()) {
|
| 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));
|
| @@ -2159,7 +2151,7 @@ void MarkCompactCollector::ProcessEphemeralMarking(
|
| // discovering new objects reachable from weak roots (that have been made
|
| // strong). This is a limitation of not having a separate handle type
|
| // that doesn't require zapping before this phase. See crbug.com/668060.
|
| - heap_->clear_wrappers_to_trace();
|
| + heap_->local_embedder_heap_tracer()->ClearCachedWrappersToTrace();
|
| }
|
| ProcessWeakCollections();
|
| work_to_do = !marking_deque()->IsEmpty();
|
| @@ -2502,9 +2494,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();
|
| }
|
| }
|
| }
|
|
|