Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index fc78a4879bb26214aa9c91ff5025ea6899a97b91..81f3ffc67c7074a623344f179504f92cb8588f4d 100644 |
--- a/runtime/vm/service.cc |
+++ b/runtime/vm/service.cc |
@@ -2217,7 +2217,7 @@ class GetInstancesVisitor : public ObjectGraph::Visitor { |
virtual Direction VisitObject(ObjectGraph::StackIterator* it) { |
RawObject* raw_obj = it->Get(); |
- if (raw_obj->IsFreeListElement()) { |
+ if (raw_obj->IsFreeListElement() || raw_obj->IsForwardingCorpse()) { |
return kProceed; |
} |
Thread* thread = Thread::Current(); |
@@ -3342,7 +3342,7 @@ class ContainsAddressVisitor : public FindObjectVisitor { |
virtual bool FindObject(RawObject* obj) const { |
// Free list elements are not real objects, so skip them. |
- if (obj->IsFreeListElement()) { |
+ if (obj->IsFreeListElement() || obj->IsForwardingCorpse()) { |
Cutch
2016/06/02 14:09:53
I really think a utility method might be helpful:
rmacnak
2016/06/02 17:57:06
Done.
|
return false; |
} |
uword obj_begin = RawObject::ToAddr(obj); |