Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 0f92780f6193f7d76e23801edb9fff08d0f4e572..bacf422dcddddd9f15abcfbaa795206860473ccd 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -663,19 +663,21 @@ void Code::CodeVerify() { |
void Code::VerifyEmbeddedObjectsDependency() { |
+ if (!CanContainWeakObjects()) return; |
int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
Object* obj = it.rinfo()->target_object(); |
if (IsWeakObject(obj)) { |
if (obj->IsMap()) { |
Map* map = Map::cast(obj); |
- CHECK(map->dependent_code()->Contains( |
- DependentCode::kWeaklyEmbeddedGroup, this)); |
+ DependentCode::DependencyGroup group = is_optimized_code() ? |
+ DependentCode::kWeakCodeGroup : DependentCode::kWeakICGroup; |
+ CHECK(map->dependent_code()->Contains(group, this)); |
} else if (obj->IsJSObject()) { |
Object* raw_table = GetIsolate()->heap()->weak_object_to_code_table(); |
WeakHashTable* table = WeakHashTable::cast(raw_table); |
CHECK(DependentCode::cast(table->Lookup(obj))->Contains( |
- DependentCode::kWeaklyEmbeddedGroup, this)); |
+ DependentCode::kWeakCodeGroup, this)); |
} |
} |
} |