Chromium Code Reviews| Index: src/heap-profiler.cc |
| =================================================================== |
| --- src/heap-profiler.cc (revision 10391) |
| +++ src/heap-profiler.cc (working copy) |
| @@ -104,6 +104,18 @@ |
| class_id, Utils::ToLocal(Handle<Object>(wrapper))); |
| } |
| +void HeapProfiler::VisitExternalResources(ExternalResourceVisitor* visitor) { |
| + HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); |
| + AssertNoAllocation no_allocation; |
| + HeapIterator iterator; |
| + for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { |
| + if (!obj->IsString()) |
|
mnaganov (inactive)
2012/01/11 18:50:23
Why not obj->IsExternalString()?
yurys
2012/01/11 19:50:13
Done.
|
| + continue; |
| + String* string= String::cast(obj); |
| + if (StringShape(string).IsExternal()) |
| + visitor->VisitExternalString(string); |
| + } |
| +} |
| HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name, |
| int type, |