| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 748406a41313364193bd1cec63a8a67318d6b4ff..5e6e32c7945ab08435876923fa8d0526cf6358c2 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -5306,8 +5306,16 @@ void Map::UpdateDescriptors(DescriptorArray* descriptors,
|
| if (layout_descriptor()->IsSlowLayout()) {
|
| set_layout_descriptor(layout_desc);
|
| }
|
| +#ifdef VERIFY_HEAP
|
| + // TODO(ishell): remove these checks from VERIFY_HEAP mode.
|
| + if (FLAG_verify_heap) {
|
| + CHECK(layout_descriptor()->IsConsistentWithMap(this));
|
| + CHECK(visitor_id() == StaticVisitorBase::GetVisitorId(this));
|
| + }
|
| +#else
|
| SLOW_DCHECK(layout_descriptor()->IsConsistentWithMap(this));
|
| DCHECK(visitor_id() == StaticVisitorBase::GetVisitorId(this));
|
| +#endif
|
| }
|
| }
|
|
|
| @@ -5320,7 +5328,14 @@ void Map::InitializeDescriptors(DescriptorArray* descriptors,
|
|
|
| if (FLAG_unbox_double_fields) {
|
| set_layout_descriptor(layout_desc);
|
| +#ifdef VERIFY_HEAP
|
| + // TODO(ishell): remove these checks from VERIFY_HEAP mode.
|
| + if (FLAG_verify_heap) {
|
| + CHECK(layout_descriptor()->IsConsistentWithMap(this));
|
| + }
|
| +#else
|
| SLOW_DCHECK(layout_descriptor()->IsConsistentWithMap(this));
|
| +#endif
|
| set_visitor_id(StaticVisitorBase::GetVisitorId(this));
|
| }
|
| }
|
|
|