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

[heap] Revise memento check

Use AllocationMemento::kSize instead of HeapObject::kHeaderSize

Bug: v8:12612
Change-Id: Ieae62546f10c96fe5e5bcf98f9235f0c7ef7ff77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3826248Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82431}
parent fe6e6412
......@@ -394,7 +394,7 @@ AllocationMemento Heap::FindAllocationMemento(Map map, HeapObject object) {
// it, so suffices to compare ptr and top here.
top = NewSpaceTop();
DCHECK(memento_address >= new_space()->limit() ||
memento_address + HeapObject::kHeaderSize <= top);
memento_address + AllocationMemento::kSize <= top);
if ((memento_address != top) && memento_candidate.IsValid()) {
return memento_candidate;
}
......
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