Commit 4a0c0055 authored by Anton Bikineev's avatar Anton Bikineev Committed by V8 LUCI CQ

cppgc: young-gen: Remove DCHECK in RememberedSet::AddWeakCallback

The CL gets rid of the assumption that WeakCallbackItem::parameter
always points to an object with a custom callback, which might not be
the case for weak containers. This fixes failures in cppgc-non-default
bot.

Bug: chromium:1029379
Change-Id: I9ab6cb357153801efaa0d902c9eedff07d12ffe7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3490932Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79296}
parent 19ea55f8
......@@ -83,9 +83,9 @@ void OldToNewRememberedSet::AddSourceObject(HeapObjectHeader& hoh) {
}
void OldToNewRememberedSet::AddWeakCallback(WeakCallbackItem item) {
DCHECK(!BasePage::FromInnerAddress(&heap_, item.parameter)
->ObjectHeaderFromInnerAddress(item.parameter)
.IsYoung());
// TODO(1029379): WeakCallbacks are also executed for weak collections.
// Consider splitting weak-callbacks in custom weak callbacks and ones for
// collections.
remembered_weak_callbacks_.insert(item);
}
......
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