cppgc: young-gen: Fix generational barrier when value is not present
params.start was not set when marker was present, however the barrier relies on params.start. Bug: chromium:1029379 Change-Id: I12cfbdbdec63518cfc0d0d174085ea8aefb3a375 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605822 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/main@{#80207}
This commit is contained in:
parent
e6d2edd710
commit
353e95daa2
@ -188,16 +188,13 @@ bool WriteBarrierTypeForNonCagedHeapPolicy::IsMarking(HeapHandle& heap_handle) {
|
||||
bool WriteBarrierTypeForCagedHeapPolicy::IsMarking(
|
||||
const HeapHandle& heap_handle, WriteBarrier::Params& params) {
|
||||
const auto& heap_base = internal::HeapBase::From(heap_handle);
|
||||
if (const MarkerBase* marker = heap_base.marker()) {
|
||||
return marker->IsMarking();
|
||||
}
|
||||
const bool is_marking = heap_base.marker() && heap_base.marker()->IsMarking();
|
||||
// Also set caged heap start here to avoid another call immediately after
|
||||
// checking IsMarking().
|
||||
#if defined(CPPGC_YOUNG_GENERATION)
|
||||
params.start =
|
||||
reinterpret_cast<uintptr_t>(&heap_base.caged_heap().local_data());
|
||||
params.start = reinterpret_cast<uintptr_t>(heap_base.caged_heap().base());
|
||||
#endif // !CPPGC_YOUNG_GENERATION
|
||||
return false;
|
||||
return is_marking;
|
||||
}
|
||||
|
||||
#endif // CPPGC_CAGED_HEAP
|
||||
|
Loading…
Reference in New Issue
Block a user