summaryrefslogtreecommitdiff
path: root/runtime/class_table-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_table-inl.h')
-rw-r--r--runtime/class_table-inl.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h
index d52365df6d..3e54a647dc 100644
--- a/runtime/class_table-inl.h
+++ b/runtime/class_table-inl.h
@@ -18,6 +18,7 @@
#define ART_RUNTIME_CLASS_TABLE_INL_H_
#include "class_table.h"
+#include "oat_file.h"
namespace art {
@@ -32,6 +33,11 @@ void ClassTable::VisitRoots(Visitor& visitor) {
for (GcRoot<mirror::Object>& root : strong_roots_) {
visitor.VisitRoot(root.AddressWithoutBarrier());
}
+ for (const OatFile* oat_file : oat_files_) {
+ for (GcRoot<mirror::Object>& root : oat_file->GetBssGcRoots()) {
+ visitor.VisitRootIfNonNull(root.AddressWithoutBarrier());
+ }
+ }
}
template<class Visitor>
@@ -45,6 +51,11 @@ void ClassTable::VisitRoots(const Visitor& visitor) {
for (GcRoot<mirror::Object>& root : strong_roots_) {
visitor.VisitRoot(root.AddressWithoutBarrier());
}
+ for (const OatFile* oat_file : oat_files_) {
+ for (GcRoot<mirror::Object>& root : oat_file->GetBssGcRoots()) {
+ visitor.VisitRootIfNonNull(root.AddressWithoutBarrier());
+ }
+ }
}
template <typename Visitor>