Chromium Code Reviews| Index: runtime/vm/object_graph.cc |
| diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc |
| index bbecac73b11bfdaf1717a3bf6a33c81fb8769b9e..ff20ef810dafe5dd8ccf01c5a6893868b75bc28a 100644 |
| --- a/runtime/vm/object_graph.cc |
| +++ b/runtime/vm/object_graph.cc |
| @@ -328,13 +328,21 @@ class RetainingPathVisitor : public ObjectGraph::Visitor { |
| } |
| } else { |
| HANDLESCOPE(thread_); |
| + RawObject* object; |
|
Cutch
2016/08/11 13:23:21
It is generally unsafe to use a RawObject* you sho
cbernaschina
2016/08/11 22:03:31
Done.
|
| Object& current = Object::Handle(); |
| Smi& offset_from_parent = Smi::Handle(); |
| + bool isLastDartInstance = true; |
| do { |
| + object = it->Get(); |
| + if (!isLastDartInstance && object->IsArray()) { |
|
Cutch
2016/08/11 13:23:21
please document what this is testing for and why i
cbernaschina
2016/08/11 22:03:31
Done.
|
| + isLastDartInstance = true; |
| + continue; |
| + } |
| + isLastDartInstance = object->IsDartInstance(); |
| intptr_t obj_index = length_ * 2; |
| intptr_t offset_index = obj_index + 1; |
| if (!path_.IsNull() && offset_index < path_.Length()) { |
| - current = it->Get(); |
| + current = object; |
| path_.SetAt(obj_index, current); |
| offset_from_parent = Smi::New(it->OffsetFromParentInWords()); |
| path_.SetAt(offset_index, offset_from_parent); |