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

cppgc: Objects with prefinalizers should not reside on compactable

spaces.

Change-Id: I454c719519452f1c33a7a8b0b6393ed61c8f819d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497742
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79330}
parent 65667531
......@@ -19,10 +19,9 @@ namespace internal {
// static
void PreFinalizerRegistrationDispatcher::RegisterPrefinalizer(
PreFinalizer pre_finalizer) {
BasePage::FromPayload(pre_finalizer.object)
->heap()
.prefinalizer_handler()
->RegisterPrefinalizer(pre_finalizer);
auto* page = BasePage::FromPayload(pre_finalizer.object);
DCHECK(!page->space().is_compactable());
page->heap().prefinalizer_handler()->RegisterPrefinalizer(pre_finalizer);
}
bool PreFinalizerRegistrationDispatcher::PreFinalizer::operator==(
......
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