diff --git a/src/heap/heap-write-barrier-inl.h b/src/heap/heap-write-barrier-inl.h index 7b1438e6a3..8fec301fe7 100644 --- a/src/heap/heap-write-barrier-inl.h +++ b/src/heap/heap-write-barrier-inl.h @@ -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(object.ptr() & ~kPageAlignmentMask); } diff --git a/src/heap/spaces.h b/src/heap/spaces.h index 29a563afbc..f8b1cba5f8 100644 --- a/src/heap/spaces.h +++ b/src/heap/spaces.h @@ -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(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(BaseAddress(o.ptr())); }