From ab2ce84d4995f05c38c5ebfefc6683b244a36260 Mon Sep 17 00:00:00 2001 From: Alexey Grebenkin Date: Thu, 1 Feb 2018 19:09:59 +0300 Subject: Fix dangling SingleImplementations left after class unloading Test: make test-art-host, manual using sample code bug: 73143991 (cherry picked from commit be4c2bd892bd167a50b4dfa7133e70a809197698) Change-Id: I5f4d726334a9ea306d93b967966c58111fd34fd1 --- runtime/class_table-inl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/class_table-inl.h') diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h index 718e93a97d..c59e2e881d 100644 --- a/runtime/class_table-inl.h +++ b/runtime/class_table-inl.h @@ -60,12 +60,12 @@ void ClassTable::VisitRoots(const Visitor& visitor) { } } -template +template bool ClassTable::Visit(Visitor& visitor) { ReaderMutexLock mu(Thread::Current(), lock_); for (ClassSet& class_set : classes_) { for (TableSlot& table_slot : class_set) { - if (!visitor(table_slot.Read())) { + if (!visitor(table_slot.Read())) { return false; } } @@ -73,12 +73,12 @@ bool ClassTable::Visit(Visitor& visitor) { return true; } -template +template bool ClassTable::Visit(const Visitor& visitor) { ReaderMutexLock mu(Thread::Current(), lock_); for (ClassSet& class_set : classes_) { for (TableSlot& table_slot : class_set) { - if (!visitor(table_slot.Read())) { + if (!visitor(table_slot.Read())) { return false; } } -- cgit v1.2.3-59-g8ed1b