| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 31a9681ef663ac2d2ee69af1e55328dabaf8fd04..4e115f515e16ea900ceb5276ebac7db355b35bf6 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -2576,7 +2576,8 @@ AllocationResult Heap::AllocatePartialMap(InstanceType instance_type,
|
| if (!allocation.To(&result)) return allocation;
|
|
|
| // Map::cast cannot be used due to uninitialized map field.
|
| - reinterpret_cast<Map*>(result)->set_map(raw_unchecked_meta_map());
|
| + reinterpret_cast<Map*>(result)->set_map(
|
| + reinterpret_cast<Map*>(root(kMetaMapRootIndex)));
|
| reinterpret_cast<Map*>(result)->set_instance_type(instance_type);
|
| reinterpret_cast<Map*>(result)->set_instance_size(instance_size);
|
| // Initialize to only containing tagged fields.
|
| @@ -3561,11 +3562,14 @@ void Heap::CreateFillerObjectAt(Address addr, int size) {
|
| if (size == 0) return;
|
| HeapObject* filler = HeapObject::FromAddress(addr);
|
| if (size == kPointerSize) {
|
| - filler->set_map_no_write_barrier(raw_unchecked_one_pointer_filler_map());
|
| + filler->set_map_no_write_barrier(
|
| + reinterpret_cast<Map*>(root(kOnePointerFillerMapRootIndex)));
|
| } else if (size == 2 * kPointerSize) {
|
| - filler->set_map_no_write_barrier(raw_unchecked_two_pointer_filler_map());
|
| + filler->set_map_no_write_barrier(
|
| + reinterpret_cast<Map*>(root(kTwoPointerFillerMapRootIndex)));
|
| } else {
|
| - filler->set_map_no_write_barrier(raw_unchecked_free_space_map());
|
| + filler->set_map_no_write_barrier(
|
| + reinterpret_cast<Map*>(root(kFreeSpaceMapRootIndex)));
|
| FreeSpace::cast(filler)->nobarrier_set_size(size);
|
| }
|
| // At this point, we may be deserializing the heap from a snapshot, and
|
| @@ -6266,7 +6270,7 @@ void PathTracer::TracePathFrom(Object** root) {
|
|
|
|
|
| static bool SafeIsNativeContext(HeapObject* obj) {
|
| - return obj->map() == obj->GetHeap()->raw_unchecked_native_context_map();
|
| + return obj->map() == obj->GetHeap()->root(Heap::kNativeContextMapRootIndex);
|
| }
|
|
|
|
|
|
|