summaryrefslogtreecommitdiff
path: root/runtime/mirror/dex_cache-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/dex_cache-inl.h')
-rw-r--r--runtime/mirror/dex_cache-inl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h
index 220979a152..30bf390d38 100644
--- a/runtime/mirror/dex_cache-inl.h
+++ b/runtime/mirror/dex_cache-inl.h
@@ -25,6 +25,7 @@
#include "base/enums.h"
#include "base/logging.h"
#include "mirror/class.h"
+#include "oat_file.h"
#include "runtime.h"
#include <atomic>
@@ -167,6 +168,11 @@ inline void DexCache::VisitReferences(mirror::Class* klass, const Visitor& visit
for (size_t i = 0, num_types = NumResolvedTypes(); i != num_types; ++i) {
visitor.VisitRootIfNonNull(resolved_types[i].AddressWithoutBarrier());
}
+ if (GetDexFile() != nullptr && GetDexFile()->GetOatDexFile() != nullptr) {
+ for (GcRoot<Object>& root : OatFile::GetBssRoots(GetDexFile()->GetOatDexFile())) {
+ visitor.VisitRootIfNonNull(root.AddressWithoutBarrier());
+ }
+ }
}
}