Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1745)

Unified Diff: src/profiler/heap-snapshot-generator.cc

Issue 2798923004: Call PersistentHandleVisitor directly instead of using ObjectVisitor. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698