Commit 0c307e66 authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

cppgc: Extract not fully constructed objects atomically

Parallel marking is running at the beginning of the atomic pause, so the
extraction of these objects must happen atomically.

Bug: v8:13045
Change-Id: I90d489597847e76ade7185cd7120816eddcdc9fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749204Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81593}
parent 0e6ba966
......@@ -676,8 +676,11 @@ void MarkerBase::MarkNotFullyConstructedObjects() {
StatsCollector::DisabledScope stats_scope(
heap().stats_collector(),
StatsCollector::kMarkVisitNotFullyConstructedObjects);
// Parallel marking may still be running which is why atomic extraction is
// required.
std::unordered_set<HeapObjectHeader*> objects =
mutator_marking_state_.not_fully_constructed_worklist().Extract();
mutator_marking_state_.not_fully_constructed_worklist()
.Extract<AccessMode::kAtomic>();
for (HeapObjectHeader* object : objects) {
DCHECK(object);
// TraceConservativelyIfNeeded delegates to either in-construction or
......
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