[heap] TPH cannot assume chunks
Bug: v8:9533 Change-Id: Ia47af94bd24b3f9a8a3d39f79a8ed61f4f2d53ab Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2047048 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Steve Blackburn <steveblackburn@google.com> Cr-Commit-Position: refs/heads/master@{#66212}
This commit is contained in:
parent
e6e42ec108
commit
3645656b05
@ -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()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user