Index: src/compiler/js-global-object-specialization.cc |
diff --git a/src/compiler/js-global-object-specialization.cc b/src/compiler/js-global-object-specialization.cc |
index a06704a8419be9f25ec5b31b4a516d2ef0383d68..b38aed43e40098b67381d0ca01036b35eff55368 100644 |
--- a/src/compiler/js-global-object-specialization.cc |
+++ b/src/compiler/js-global-object-specialization.cc |
@@ -196,13 +196,18 @@ Reduction JSGlobalObjectSpecialization::ReduceJSStoreGlobal(Node* node) { |
Type* property_cell_value_type; |
MachineRepresentation representation = MachineRepresentation::kTagged; |
if (property_cell_value->IsHeapObject()) { |
+ // We cannot do anything if the {property_cell_value}s map is no |
+ // longer stable. |
+ Handle<Map> property_cell_value_map( |
+ Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); |
+ if (!property_cell_value_map->is_stable()) return NoChange(); |
+ dependencies()->AssumeMapStable(property_cell_value_map); |
+ |
// Check that the {value} is a HeapObject. |
value = effect = graph()->NewNode(simplified()->CheckHeapObject(), |
value, effect, control); |
// Check {value} map agains the {property_cell} map. |
- Handle<Map> property_cell_value_map( |
- Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); |
effect = graph()->NewNode( |
simplified()->CheckMaps(1), value, |
jsgraph()->HeapConstant(property_cell_value_map), effect, control); |