Index: src/heap-snapshot-generator.cc |
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc |
index fb239aa3cf6dd82cc04af83c7be2afdcac8ac470..d073a8d1c2212e7ac2303dd6bcafa706b52da12a 100644 |
--- a/src/heap-snapshot-generator.cc |
+++ b/src/heap-snapshot-generator.cc |
@@ -1943,15 +1943,19 @@ void NativeObjectsExplorer::FillRetainedObjects() { |
List<ObjectGroup*>* groups = isolate->global_handles()->object_groups(); |
for (int i = 0; i < groups->length(); ++i) { |
ObjectGroup* group = groups->at(i); |
- if (group->info_ == NULL) continue; |
- List<HeapObject*>* list = GetListMaybeDisposeInfo(group->info_); |
- for (size_t j = 0; j < group->length_; ++j) { |
- HeapObject* obj = HeapObject::cast(*group->objects_[j]); |
+ if (group->info == NULL) { |
+ delete group; |
+ continue; |
+ } |
+ List<HeapObject*>* list = GetListMaybeDisposeInfo(group->info); |
+ for (int j = 0; j < group->objects.length(); ++j) { |
+ HeapObject* obj = HeapObject::cast(*group->objects[j]); |
list->Add(obj); |
in_groups_.Insert(obj); |
} |
- group->info_ = NULL; // Acquire info object ownership. |
+ delete group; |
} |
+ delete groups; |
isolate->global_handles()->RemoveObjectGroups(); |
isolate->heap()->CallGCEpilogueCallbacks(major_gc_type); |
// Record objects that are not in ObjectGroups, but have class ID. |