Commit 8a43db15 authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

heap: We should never finalize an in-construction object

Change-Id: Ia475d5bd55bbf621c26c782c25d40b861a9de817
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376821
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: default avatarAnton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801835}
parent ef670148
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
namespace blink { namespace blink {
void HeapObjectHeader::Finalize(Address object, size_t object_size) { void HeapObjectHeader::Finalize(Address object, size_t object_size) {
DCHECK(!IsInConstruction<HeapObjectHeader::AccessMode::kAtomic>());
HeapAllocHooks::FreeHookIfEnabled(object); HeapAllocHooks::FreeHookIfEnabled(object);
const GCInfo& gc_info = GCInfo::From(GcInfoIndex()); const GCInfo& gc_info = GCInfo::From(GcInfoIndex());
if (gc_info.finalize) if (gc_info.finalize)
......
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