Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 24e4039422cc8ae010b17c9f700f32061d2cd204..108cfb373e71674f0a976e49d981a959e1be6051 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4310,6 +4310,10 @@ MaybeObject* Heap::AllocateWithAllocationSite(Map* map, AllocationSpace space, |
AllocationMemento* alloc_memento = reinterpret_cast<AllocationMemento*>( |
reinterpret_cast<Address>(result) + map->instance_size()); |
alloc_memento->set_map_no_write_barrier(allocation_memento_map()); |
+ |
+ // TODO(mvstanton): To diagnose bug 284577, some extra checks |
+ CHECK(allocation_site->map() == allocation_site_map()); |
+ |
alloc_memento->set_allocation_site(*allocation_site, SKIP_WRITE_BARRIER); |
return result; |
} |
@@ -5053,6 +5057,10 @@ MaybeObject* Heap::CopyJSObjectWithAllocationSite( |
AllocationMemento* alloc_memento; |
if (maybe_alloc_memento->To(&alloc_memento)) { |
alloc_memento->set_map_no_write_barrier(allocation_memento_map()); |
+ |
+ // TODO(mvstanton): To diagnose bug 284577, some extra checks |
+ CHECK(site->map() == allocation_site_map()); |
+ |
alloc_memento->set_allocation_site(site, SKIP_WRITE_BARRIER); |
} |
} |
@@ -5075,6 +5083,10 @@ MaybeObject* Heap::CopyJSObjectWithAllocationSite( |
AllocationMemento* alloc_memento = reinterpret_cast<AllocationMemento*>( |
reinterpret_cast<Address>(clone) + object_size); |
alloc_memento->set_map_no_write_barrier(allocation_memento_map()); |
+ |
+ // TODO(mvstanton): To diagnose bug 284577, some extra checks |
+ CHECK(site->map() == allocation_site_map()); |
+ |
alloc_memento->set_allocation_site(site, SKIP_WRITE_BARRIER); |
} |