From be4c2bd892bd167a50b4dfa7133e70a809197698 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 Change-Id: I4d56b39c69d4ed60266a8b90b9e9d18fba7b8227 --- 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