summaryrefslogtreecommitdiffstats
path: root/runtime/indirect_reference_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/indirect_reference_table.cc')
-rw-r--r--runtime/indirect_reference_table.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc
index 1a3f1074e6..a3aa1de108 100644
--- a/runtime/indirect_reference_table.cc
+++ b/runtime/indirect_reference_table.cc
@@ -242,16 +242,10 @@ void IndirectReferenceTable::Trim() {
madvise(release_start, release_end - release_start, MADV_DONTNEED);
}
-void IndirectReferenceTable::VisitRoots(RootCallback* callback, void* arg,
- const RootInfo& root_info) {
+void IndirectReferenceTable::VisitRoots(RootVisitor* visitor, const RootInfo& root_info) {
+ BufferedRootVisitor<128> root_visitor(visitor, root_info);
for (auto ref : *this) {
- if (*ref == nullptr) {
- // Need to skip null entries to make it possible to do the
- // non-null check after the call back.
- continue;
- }
- callback(ref, arg, root_info);
- DCHECK(*ref != nullptr);
+ root_visitor.VisitRootIfNonNull(*ref);
}
}