diff options
Diffstat (limited to 'deps/v8/src/heap/embedder-tracing.cc')
-rw-r--r-- | deps/v8/src/heap/embedder-tracing.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/deps/v8/src/heap/embedder-tracing.cc b/deps/v8/src/heap/embedder-tracing.cc index d8659ec889d..bf6d5f3b90d 100644 --- a/deps/v8/src/heap/embedder-tracing.cc +++ b/deps/v8/src/heap/embedder-tracing.cc @@ -34,15 +34,17 @@ void LocalEmbedderHeapTracer::AbortTracing() { void LocalEmbedderHeapTracer::EnterFinalPause() { if (!InUse()) return; - remote_tracer_->EnterFinalPause(); + remote_tracer_->EnterFinalPause(embedder_stack_state_); + // Resetting to state unknown as there may be follow up garbage collections + // triggered from callbacks that have a different stack state. + embedder_stack_state_ = EmbedderHeapTracer::kUnknown; } -bool LocalEmbedderHeapTracer::Trace( - double deadline, EmbedderHeapTracer::AdvanceTracingActions actions) { - if (!InUse()) return false; +bool LocalEmbedderHeapTracer::Trace(double deadline) { + if (!InUse()) return true; DCHECK_EQ(0, NumberOfCachedWrappersToTrace()); - return remote_tracer_->AdvanceTracing(deadline, actions); + return remote_tracer_->AdvanceTracing(deadline); } bool LocalEmbedderHeapTracer::IsRemoteTracingDone() { @@ -67,5 +69,12 @@ bool LocalEmbedderHeapTracer::RequiresImmediateWrapperProcessing() { return cached_wrappers_to_trace_.size() > kTooManyWrappers; } +void LocalEmbedderHeapTracer::SetEmbedderStackStateForNextFinalization( + EmbedderHeapTracer::EmbedderStackState stack_state) { + if (!InUse()) return; + + embedder_stack_state_ = stack_state; +} + } // namespace internal } // namespace v8 |