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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 ExtractScriptReferences(entry, Script::cast(obj)); | 974 ExtractScriptReferences(entry, Script::cast(obj)); |
975 } else if (obj->IsCodeCache()) { | 975 } else if (obj->IsCodeCache()) { |
976 ExtractCodeCacheReferences(entry, CodeCache::cast(obj)); | 976 ExtractCodeCacheReferences(entry, CodeCache::cast(obj)); |
977 } else if (obj->IsCode()) { | 977 } else if (obj->IsCode()) { |
978 ExtractCodeReferences(entry, Code::cast(obj)); | 978 ExtractCodeReferences(entry, Code::cast(obj)); |
979 } else if (obj->IsJSGlobalPropertyCell()) { | 979 } else if (obj->IsJSGlobalPropertyCell()) { |
980 ExtractJSGlobalPropertyCellReferences( | 980 ExtractJSGlobalPropertyCellReferences( |
981 entry, JSGlobalPropertyCell::cast(obj)); | 981 entry, JSGlobalPropertyCell::cast(obj)); |
982 extract_indexed_refs = false; | 982 extract_indexed_refs = false; |
983 } | 983 } |
| 984 |
984 if (extract_indexed_refs) { | 985 if (extract_indexed_refs) { |
985 SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset); | 986 SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset); |
986 IndexedReferencesExtractor refs_extractor(this, obj, entry); | 987 IndexedReferencesExtractor refs_extractor(this, obj, entry); |
987 obj->Iterate(&refs_extractor); | 988 obj->Iterate(&refs_extractor); |
988 } | 989 } |
989 } | 990 } |
990 | 991 |
991 | 992 |
992 void V8HeapExplorer::ExtractJSGlobalProxyReferences(JSGlobalProxy* proxy) { | 993 void V8HeapExplorer::ExtractJSGlobalProxyReferences(JSGlobalProxy* proxy) { |
993 // We need to reference JS global objects from snapshot's root. | 994 // We need to reference JS global objects from snapshot's root. |
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 | 2655 |
2655 | 2656 |
2656 void HeapSnapshotJSONSerializer::SortHashMap( | 2657 void HeapSnapshotJSONSerializer::SortHashMap( |
2657 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 2658 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
2658 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 2659 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
2659 sorted_entries->Add(p); | 2660 sorted_entries->Add(p); |
2660 sorted_entries->Sort(SortUsingEntryValue); | 2661 sorted_entries->Sort(SortUsingEntryValue); |
2661 } | 2662 } |
2662 | 2663 |
2663 } } // namespace v8::internal | 2664 } } // namespace v8::internal |
OLD | NEW |