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 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 bindings->get(i)); | 1302 bindings->get(i)); |
1303 } | 1303 } |
1304 } | 1304 } |
1305 } | 1305 } |
1306 | 1306 |
1307 | 1307 |
1308 void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, int entry) { | 1308 void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, int entry) { |
1309 if (js_obj->HasFastProperties()) { | 1309 if (js_obj->HasFastProperties()) { |
1310 DescriptorArray* descs = js_obj->map()->instance_descriptors(); | 1310 DescriptorArray* descs = js_obj->map()->instance_descriptors(); |
1311 int real_size = js_obj->map()->NumberOfOwnDescriptors(); | 1311 int real_size = js_obj->map()->NumberOfOwnDescriptors(); |
1312 for (int i = 0; i < descs->number_of_descriptors(); i++) { | 1312 for (int i = 0; i < real_size; i++) { |
1313 if (descs->GetDetails(i).descriptor_index() > real_size) continue; | |
1314 switch (descs->GetType(i)) { | 1313 switch (descs->GetType(i)) { |
1315 case FIELD: { | 1314 case FIELD: { |
1316 int index = descs->GetFieldIndex(i); | 1315 int index = descs->GetFieldIndex(i); |
1317 | 1316 |
1318 Name* k = descs->GetKey(i); | 1317 Name* k = descs->GetKey(i); |
1319 if (index < js_obj->map()->inobject_properties()) { | 1318 if (index < js_obj->map()->inobject_properties()) { |
1320 Object* value = js_obj->InObjectPropertyAt(index); | 1319 Object* value = js_obj->InObjectPropertyAt(index); |
1321 if (k != heap_->hidden_string()) { | 1320 if (k != heap_->hidden_string()) { |
1322 SetPropertyReference( | 1321 SetPropertyReference( |
1323 js_obj, entry, | 1322 js_obj, entry, |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 | 2658 |
2660 | 2659 |
2661 void HeapSnapshotJSONSerializer::SortHashMap( | 2660 void HeapSnapshotJSONSerializer::SortHashMap( |
2662 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 2661 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
2663 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 2662 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
2664 sorted_entries->Add(p); | 2663 sorted_entries->Add(p); |
2665 sorted_entries->Sort(SortUsingEntryValue); | 2664 sorted_entries->Sort(SortUsingEntryValue); |
2666 } | 2665 } |
2667 | 2666 |
2668 } } // namespace v8::internal | 2667 } } // namespace v8::internal |
OLD | NEW |