summaryrefslogtreecommitdiff
path: root/src/stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stack.h')
-rw-r--r--src/stack.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stack.h b/src/stack.h
index 70d6f9d0f7..bceadc3cd2 100644
--- a/src/stack.h
+++ b/src/stack.h
@@ -90,12 +90,13 @@ class ShadowFrame {
(shadow_frame_entry <= (&references_[number_of_references_ - 1])));
}
- void VisitRoots(Heap::RootVisitor* visitor, void* arg) {
+ template <typename Visitor>
+ void VisitRoots(const Visitor& visitor) {
size_t num_refs = NumberOfReferences();
for (size_t j = 0; j < num_refs; j++) {
Object* object = GetReference(j);
if (object != NULL) {
- visitor(object, arg);
+ visitor(object, j);
}
}
}