From 815873ecc312b1d231acce71e1a16f42cdaf09f2 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 13 Feb 2014 18:02:13 -0800 Subject: Change root visitor to use Object**. Simplifies code and improves the performance of root visiting since we usually don't need to check to see if the object moved. Change-Id: Iba998f5a15ae1fa1b53ca5226dd2168a411196cf --- runtime/indirect_reference_table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/indirect_reference_table.cc') diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc index 4a02d74..54c7b6e 100644 --- a/runtime/indirect_reference_table.cc +++ b/runtime/indirect_reference_table.cc @@ -312,7 +312,7 @@ bool IndirectReferenceTable::Remove(uint32_t cookie, IndirectRef iref) { void IndirectReferenceTable::VisitRoots(RootCallback* callback, void* arg, uint32_t tid, RootType root_type) { for (auto ref : *this) { - *ref = callback(const_cast(*ref), arg, tid, root_type); + callback(ref, arg, tid, root_type); DCHECK(*ref != nullptr); } } -- cgit v1.1