Commit f19ea33e authored by Omer Katz's avatar Omer Katz Committed by V8 LUCI CQ

cppgc: Prefinalizers scopes

Enable the prefinalizers scope and add a top level AtomicSweep scope
so that prefinalizers are accounted as part of sweeping.

Change-Id: I9dade6a2367d30d20395de30c3db84922fee5a49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306567Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78185}
parent 9e0439d1
......@@ -52,7 +52,9 @@ void PreFinalizerHandler::RegisterPrefinalizer(PreFinalizer pre_finalizer) {
}
void PreFinalizerHandler::InvokePreFinalizers() {
StatsCollector::DisabledScope stats_scope(
StatsCollector::EnabledScope stats_scope(heap_.stats_collector(),
StatsCollector::kAtomicSweep);
StatsCollector::EnabledScope nested_stats_scope(
heap_.stats_collector(), StatsCollector::kSweepInvokePreFinalizers);
DCHECK(CurrentThreadIsCreationThread());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment