Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index ad13d7f5a56a54c9a315a23ee52310835caa7e9d..caf0bafd70c490165637ce89782853d961fe95cf 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -665,16 +665,20 @@ void Code::CodeVerify() { |
} |
-void Code::VerifyEmbeddedMapsDependency() { |
+void Code::VerifyEmbeddedObjectsDependency() { |
int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
- RelocInfo::Mode mode = it.rinfo()->rmode(); |
- if (mode == RelocInfo::EMBEDDED_OBJECT && |
- it.rinfo()->target_object()->IsMap()) { |
- Map* map = Map::cast(it.rinfo()->target_object()); |
- if (map->CanTransition()) { |
+ Object* obj = it.rinfo()->target_object(); |
+ if (IsWeakEmbeddedObject(kind(), obj)) { |
+ if (obj->IsMap()) { |
+ Map* map = Map::cast(obj); |
CHECK(map->dependent_code()->Contains( |
DependentCode::kWeaklyEmbeddedGroup, 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)); |
} |
} |
} |