| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 85c59696a77357d3ebf565298bc1b270abb57190..5e515337c832457284d19aded7d254e77f0b5105 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -3731,6 +3731,7 @@ AllocationResult Heap::AllocateCode(int object_size, bool immovable) {
|
|
|
| result->set_map_no_write_barrier(code_map());
|
| Code* code = Code::cast(result);
|
| + DCHECK(IsAligned(bit_cast<intptr_t>(code->address()), kCodeAlignment));
|
| DCHECK(isolate_->code_range() == NULL || !isolate_->code_range()->valid() ||
|
| isolate_->code_range()->contains(code->address()));
|
| code->set_gc_metadata(Smi::FromInt(0));
|
| @@ -3768,6 +3769,7 @@ AllocationResult Heap::CopyCode(Code* code) {
|
| new_code->set_constant_pool(new_constant_pool);
|
|
|
| // Relocate the copy.
|
| + DCHECK(IsAligned(bit_cast<intptr_t>(new_code->address()), kCodeAlignment));
|
| DCHECK(isolate_->code_range() == NULL || !isolate_->code_range()->valid() ||
|
| isolate_->code_range()->contains(code->address()));
|
| new_code->Relocate(new_addr - old_addr);
|
| @@ -3826,6 +3828,7 @@ AllocationResult Heap::CopyCode(Code* code, Vector<byte> reloc_info) {
|
| static_cast<size_t>(reloc_info.length()));
|
|
|
| // Relocate the copy.
|
| + DCHECK(IsAligned(bit_cast<intptr_t>(new_code->address()), kCodeAlignment));
|
| DCHECK(isolate_->code_range() == NULL || !isolate_->code_range()->valid() ||
|
| isolate_->code_range()->contains(code->address()));
|
| new_code->Relocate(new_addr - old_addr);
|
|
|