Index: src/heap-profiler.cc |
=================================================================== |
--- src/heap-profiler.cc (revision 11329) |
+++ src/heap-profiler.cc (working copy) |
@@ -189,6 +189,15 @@ |
} |
+SnapshotObjectId HeapProfiler::GetSnapshotObjectId(Handle<Object> obj) { |
+ if (!obj->IsHeapObject()) |
+ return v8::HeapProfiler::kUnknownObjectId; |
+ HeapProfiler* profiler = Isolate::Current()->heap_profiler(); |
+ ASSERT(profiler != NULL); |
+ return profiler->snapshots_->FindObjectId(HeapObject::cast(*obj) ->address()); |
+} |
+ |
+ |
void HeapProfiler::DeleteAllSnapshots() { |
HeapProfiler* profiler = Isolate::Current()->heap_profiler(); |
ASSERT(profiler != NULL); |