Index: src/profiler/heap-snapshot-generator.cc |
diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc |
index c60efdc7e12324a3f069a8a1933d55382b382aac..b360fccdfe3e6a5f588fc8af6c4ac21d7e56ae2f 100644 |
--- a/src/profiler/heap-snapshot-generator.cc |
+++ b/src/profiler/heap-snapshot-generator.cc |
@@ -2197,16 +2197,17 @@ void V8HeapExplorer::TagGlobalObjects() { |
DeleteArray(urls); |
} |
- |
-class GlobalHandlesExtractor : public ObjectVisitor { |
+class GlobalHandlesExtractor : public PersistentHandleVisitor { |
public: |
explicit GlobalHandlesExtractor(NativeObjectsExplorer* explorer) |
: explorer_(explorer) {} |
~GlobalHandlesExtractor() override {} |
- void VisitPointers(Object** start, Object** end) override { UNREACHABLE(); } |
- void VisitEmbedderReference(Object** p, uint16_t class_id) override { |
- explorer_->VisitSubtreeWrapper(p, class_id); |
+ void VisitPersistentHandle(Persistent<Value>* value, |
+ uint16_t class_id) override { |
+ Handle<Object> object = Utils::OpenPersistent(value); |
+ explorer_->VisitSubtreeWrapper(object.location(), class_id); |
} |
+ |
private: |
NativeObjectsExplorer* explorer_; |
}; |