Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 43c83e40a5aecfd74ed46f00ec678dde9d9436cb..2c631b5c2d15229bd16b33796828ef15c7c38c1f 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2830,8 +2830,14 @@ MaybeObject* Heap::AllocatePropertyCell(Object* value) { |
} |
HeapObject::cast(result)->set_map_no_write_barrier( |
global_property_cell_map()); |
- PropertyCell::cast(result)->set_value(value); |
- PropertyCell::cast(result)->set_type(Type::None()); |
+ PropertyCell* cell = PropertyCell::cast(result); |
+ cell->set_value(value); |
+ Isolate* isolate = cell->GetIsolate(); |
+ Handle<Object> value_handle(value, isolate); |
+ PropertyCell::cast(result)->set_type(Type::Constant(value_handle, |
+ isolate)); |
+ cell->set_dependent_code(DependentCode::cast(empty_fixed_array()), |
+ SKIP_WRITE_BARRIER); |
return result; |
} |