OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 } | 1674 } |
1675 | 1675 |
1676 | 1676 |
1677 void V8HeapExplorer::SetWeakReference(HeapObject* parent_obj, | 1677 void V8HeapExplorer::SetWeakReference(HeapObject* parent_obj, |
1678 int parent_entry, | 1678 int parent_entry, |
1679 int index, | 1679 int index, |
1680 Object* child_obj, | 1680 Object* child_obj, |
1681 int field_offset) { | 1681 int field_offset) { |
1682 ASSERT(parent_entry == GetEntry(parent_obj)->index()); | 1682 ASSERT(parent_entry == GetEntry(parent_obj)->index()); |
1683 HeapEntry* child_entry = GetEntry(child_obj); | 1683 HeapEntry* child_entry = GetEntry(child_obj); |
1684 if (child_entry != NULL) { | 1684 if (child_entry == NULL) return; |
| 1685 if (IsEssentialObject(child_obj)) { |
1685 filler_->SetIndexedReference(HeapGraphEdge::kWeak, | 1686 filler_->SetIndexedReference(HeapGraphEdge::kWeak, |
1686 parent_entry, | 1687 parent_entry, |
1687 index, | 1688 index, |
1688 child_entry); | 1689 child_entry); |
1689 IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset); | |
1690 } | 1690 } |
| 1691 IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset); |
1691 } | 1692 } |
1692 | 1693 |
1693 | 1694 |
1694 void V8HeapExplorer::SetPropertyReference(HeapObject* parent_obj, | 1695 void V8HeapExplorer::SetPropertyReference(HeapObject* parent_obj, |
1695 int parent_entry, | 1696 int parent_entry, |
1696 Name* reference_name, | 1697 Name* reference_name, |
1697 Object* child_obj, | 1698 Object* child_obj, |
1698 const char* name_format_string, | 1699 const char* name_format_string, |
1699 int field_offset) { | 1700 int field_offset) { |
1700 ASSERT(parent_entry == GetEntry(parent_obj)->index()); | 1701 ASSERT(parent_entry == GetEntry(parent_obj)->index()); |
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2688 | 2689 |
2689 | 2690 |
2690 void HeapSnapshotJSONSerializer::SortHashMap( | 2691 void HeapSnapshotJSONSerializer::SortHashMap( |
2691 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 2692 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
2692 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 2693 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
2693 sorted_entries->Add(p); | 2694 sorted_entries->Add(p); |
2694 sorted_entries->Sort(SortUsingEntryValue); | 2695 sorted_entries->Sort(SortUsingEntryValue); |
2695 } | 2696 } |
2696 | 2697 |
2697 } } // namespace v8::internal | 2698 } } // namespace v8::internal |
OLD | NEW |