Commit 3645656b authored by Steve Blackburn's avatar Steve Blackburn Committed by Commit Bot

[heap] TPH cannot assume chunks

Bug: v8:9533
Change-Id: Ia47af94bd24b3f9a8a3d39f79a8ed61f4f2d53ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2047048Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Steve Blackburn <steveblackburn@google.com>
Cr-Commit-Position: refs/heads/master@{#66212}
parent e6e42ec1
......@@ -61,6 +61,7 @@ struct MemoryChunk {
V8_INLINE static heap_internals::MemoryChunk* FromHeapObject(
HeapObject object) {
DCHECK(!V8_ENABLE_THIRD_PARTY_HEAP_BOOL);
return reinterpret_cast<MemoryChunk*>(object.ptr() & ~kPageAlignmentMask);
}
......
......@@ -641,10 +641,12 @@ class MemoryChunk : public BasicMemoryChunk {
// Only works if the pointer is in the first kPageSize of the MemoryChunk.
static MemoryChunk* FromAddress(Address a) {
DCHECK(!V8_ENABLE_THIRD_PARTY_HEAP_BOOL);
return reinterpret_cast<MemoryChunk*>(BaseAddress(a));
}
// Only works if the object is in the first kPageSize of the MemoryChunk.
static MemoryChunk* FromHeapObject(HeapObject o) {
DCHECK(!V8_ENABLE_THIRD_PARTY_HEAP_BOOL);
return reinterpret_cast<MemoryChunk*>(BaseAddress(o.ptr()));
}
......
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