summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
-rw-r--r--runtime/interpreter/interpreter_common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h
index 7f6303ab9a..f88d56a30a 100644
--- a/runtime/interpreter/interpreter_common.h
+++ b/runtime/interpreter/interpreter_common.h
@@ -201,10 +201,11 @@ static inline String* ResolveString(Thread* self, ShadowFrame& shadow_frame, uin
}
}
mirror::ArtMethod* method = shadow_frame.GetMethod();
- mirror::String* s = method->GetDexCacheStrings()->Get(string_idx);
+ mirror::Class* declaring_class = method->GetDeclaringClass();
+ mirror::String* s = declaring_class->GetDexCacheStrings()->Get(string_idx);
if (UNLIKELY(s == nullptr)) {
StackHandleScope<1> hs(self);
- Handle<mirror::DexCache> dex_cache(hs.NewHandle(method->GetDexCache()));
+ Handle<mirror::DexCache> dex_cache(hs.NewHandle(declaring_class->GetDexCache()));
s = Runtime::Current()->GetClassLinker()->ResolveString(*method->GetDexFile(), string_idx,
dex_cache);
}