summaryrefslogtreecommitdiff
path: root/runtime/art_method-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/art_method-inl.h')
-rw-r--r--runtime/art_method-inl.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index 1e809d5d1b..730a9c32fd 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -399,7 +399,11 @@ inline mirror::ClassLoader* ArtMethod::GetClassLoader() {
inline mirror::DexCache* ArtMethod::GetDexCache() {
DCHECK(!IsProxyMethod());
- return GetDeclaringClass()->GetDexCache();
+ if (UNLIKELY(IsObsolete())) {
+ return GetObsoleteDexCache();
+ } else {
+ return GetDeclaringClass()->GetDexCache();
+ }
}
template<ReadBarrierOption kReadBarrierOption>