summaryrefslogtreecommitdiff
path: root/runtime/class_table-inl.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2018-03-16 10:58:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-03-16 10:58:24 +0000
commite54c8ce806677cee48dcf9e33bb9f2d09ad70206 (patch)
treefac3614dbca1a10ecb334f5442620f8af3601e1b /runtime/class_table-inl.h
parentbabfd0d4bd974aa23c8b6bb6b4698572e2e36d97 (diff)
parentab2ce84d4995f05c38c5ebfefc6683b244a36260 (diff)
Merge "Fix dangling SingleImplementations left after class unloading" into pi-dev
Diffstat (limited to 'runtime/class_table-inl.h')
-rw-r--r--runtime/class_table-inl.h8
1 files changed, 4 insertions, 4 deletions
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 <typename Visitor>
+template <typename Visitor, ReadBarrierOption kReadBarrierOption>
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<kReadBarrierOption>())) {
return false;
}
}
@@ -73,12 +73,12 @@ bool ClassTable::Visit(Visitor& visitor) {
return true;
}
-template <typename Visitor>
+template <typename Visitor, ReadBarrierOption kReadBarrierOption>
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<kReadBarrierOption>())) {
return false;
}
}