diff --git a/src/codegen/arm64/assembler-arm64-inl.h b/src/codegen/arm64/assembler-arm64-inl.h index 6f6fdb9271..51b72ceca0 100644 --- a/src/codegen/arm64/assembler-arm64-inl.h +++ b/src/codegen/arm64/assembler-arm64-inl.h @@ -666,7 +666,8 @@ HeapObject RelocInfo::target_object(PtrComprCageBase cage_base) { Object obj(DecompressTaggedPointer(cage_base, compressed)); // Embedding of compressed Code objects must not happen when external code // space is enabled, because CodeDataContainers must be used instead. - DCHECK_IMPLIES(V8_EXTERNAL_CODE_SPACE_BOOL, !obj.IsCode(cage_base)); + DCHECK_IMPLIES(V8_EXTERNAL_CODE_SPACE_BOOL, + !IsCodeSpaceObject(HeapObject::cast(obj))); return HeapObject::cast(obj); } else { return HeapObject::cast( diff --git a/src/codegen/x64/assembler-x64-inl.h b/src/codegen/x64/assembler-x64-inl.h index 7cad2b22d5..dd74e93f10 100644 --- a/src/codegen/x64/assembler-x64-inl.h +++ b/src/codegen/x64/assembler-x64-inl.h @@ -322,7 +322,8 @@ HeapObject RelocInfo::target_object(PtrComprCageBase cage_base) { Object obj(DecompressTaggedPointer(cage_base, compressed)); // Embedding of compressed Code objects must not happen when external code // space is enabled, because CodeDataContainers must be used instead. - DCHECK_IMPLIES(V8_EXTERNAL_CODE_SPACE_BOOL, !obj.IsCode(cage_base)); + DCHECK_IMPLIES(V8_EXTERNAL_CODE_SPACE_BOOL, + !IsCodeSpaceObject(HeapObject::cast(obj))); return HeapObject::cast(obj); } DCHECK(IsFullEmbeddedObject(rmode_) || IsDataEmbeddedObject(rmode_)); diff --git a/src/objects/objects-inl.h b/src/objects/objects-inl.h index 5f8666a660..8996ffb96b 100644 --- a/src/objects/objects-inl.h +++ b/src/objects/objects-inl.h @@ -727,7 +727,7 @@ HeapObject MapWord::ToForwardingAddress() { HeapObject obj = HeapObject::FromAddress(value_); // For objects allocated outside of the main pointer compression cage the // variant with explicit cage base must be used. - DCHECK_IMPLIES(V8_EXTERNAL_CODE_SPACE_BOOL, !obj.IsCode()); + DCHECK_IMPLIES(V8_EXTERNAL_CODE_SPACE_BOOL, !IsCodeSpaceObject(obj)); return obj; }