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

Unified Diff: src/heap/object-stats.cc

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase 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/heap/mark-compact.cc ('k') | src/heap/scavenger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/object-stats.cc
diff --git a/src/heap/object-stats.cc b/src/heap/object-stats.cc
index e9067937aaffb541a01c302e8ed4c3404b2aa6ba..6a8dd26b70a1807b0d8f5d33dca11e0e33a037ee 100644
--- a/src/heap/object-stats.cc
+++ b/src/heap/object-stats.cc
@@ -271,13 +271,12 @@ void ObjectStatsCollector::CollectStatistics(HeapObject* obj) {
if (obj->IsScript()) RecordScriptDetails(Script::cast(obj));
}
-class ObjectStatsCollector::CompilationCacheTableVisitor
- : public ObjectVisitor {
+class ObjectStatsCollector::CompilationCacheTableVisitor : public RootVisitor {
public:
explicit CompilationCacheTableVisitor(ObjectStatsCollector* parent)
: parent_(parent) {}
- void VisitPointers(Object** start, Object** end) override {
+ void VisitRootPointers(Root root, Object** start, Object** end) override {
for (Object** current = start; current < end; current++) {
HeapObject* obj = HeapObject::cast(*current);
if (obj->IsUndefined(parent_->heap_->isolate())) continue;
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698