Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 39099fca1a69be01824c8aa961992875edfa6142..80eb5620a811dace8718ba2c876ada7b9cd7377f 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3102,7 +3102,7 @@ |
} |
result->set_map_no_write_barrier(weak_cell_map()); |
WeakCell::cast(result)->initialize(value); |
- WeakCell::cast(result)->set_next(the_hole_value(), SKIP_WRITE_BARRIER); |
+ WeakCell::cast(result)->set_next(undefined_value(), SKIP_WRITE_BARRIER); |
return result; |
} |
@@ -3706,18 +3706,19 @@ |
void Heap::CreateFillerObjectAt(Address addr, int size) { |
if (size == 0) return; |
HeapObject* filler = HeapObject::FromAddress(addr); |
+ // At this point, we may be deserializing the heap from a snapshot, and |
+ // none of the maps have been created yet and are NULL. |
if (size == kPointerSize) { |
filler->set_map_no_write_barrier(raw_unchecked_one_pointer_filler_map()); |
+ DCHECK(filler->map() == NULL || filler->map() == one_pointer_filler_map()); |
} else if (size == 2 * kPointerSize) { |
filler->set_map_no_write_barrier(raw_unchecked_two_pointer_filler_map()); |
+ DCHECK(filler->map() == NULL || filler->map() == two_pointer_filler_map()); |
} else { |
filler->set_map_no_write_barrier(raw_unchecked_free_space_map()); |
+ DCHECK(filler->map() == NULL || filler->map() == free_space_map()); |
FreeSpace::cast(filler)->nobarrier_set_size(size); |
} |
- // At this point, we may be deserializing the heap from a snapshot, and |
- // none of the maps have been created yet and are NULL. |
- DCHECK(filler->map() == NULL && !deserialization_complete_ || |
- filler->map()->IsMap()); |
} |