Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 7b623b50877d80d371dd2d2dad35d9e9faa38fe9..da25cdf4b855349a1cb641e48ba3975ec76d8826 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -1831,6 +1831,20 @@ HValue* HGraphBuilder::BuildCreateAllocationMemento(HValue* previous_object, |
Handle<Map> alloc_memento_map( |
isolate()->heap()->allocation_memento_map()); |
AddStoreMapConstant(alloc_memento, alloc_memento_map); |
+ |
+ // TODO(mvstanton): the code below is turned on to diagnose chromium bug |
+ // 284577. |
+ Handle<Map> alloc_site_map(isolate()->heap()->allocation_site_map()); |
+ IfBuilder builder(this); |
+ // Read the map |
+ HValue* map_field = Add<HLoadNamedField>(alloc_site, |
+ HObjectAccess::ForMap()); |
+ HValue* alloc_site_map_value = Add<HConstant>(alloc_site_map); |
+ builder.IfNot<HCompareObjectEqAndBranch>(map_field, alloc_site_map_value); |
+ builder.Then(); |
+ AddInstruction(new(zone()) HDebugBreak()); |
+ builder.End(); |
+ |
HObjectAccess access = HObjectAccess::ForAllocationMementoSite(); |
Add<HStoreNamedField>(alloc_memento, access, alloc_site); |
return alloc_memento; |