diff options
author | 2018-11-21 14:55:10 -0800 | |
---|---|---|
committer | 2018-11-21 14:55:10 -0800 | |
commit | 4835d21a33b783869820c928bfc0a16f249d65f2 (patch) | |
tree | fe49fa458772f3e43c8a55c51a07a68c360cccf6 /runtime/class_linker-inl.h | |
parent | 5a78e8dbf068c544b84e98f636b30045b09451c4 (diff) |
ART: Fix ResolveType with ArtMethod
ArtMethods may be obsolete. In that case, the dex cache of the
declaring class is not correct. Refactor the code to avoid
issues.
Partially reverts commit 09c5ca40635faee00f40f6ca0581dd475efd545e.
Bug: 119830111
Test: m test-art-host
Change-Id: Ibf89af48e6384569c2abd6d5846cf05c929679d0
Diffstat (limited to 'runtime/class_linker-inl.h')
-rw-r--r-- | runtime/class_linker-inl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/class_linker-inl.h b/runtime/class_linker-inl.h index 7e011371b7..6703205502 100644 --- a/runtime/class_linker-inl.h +++ b/runtime/class_linker-inl.h @@ -135,7 +135,7 @@ inline ObjPtr<mirror::Class> ClassLinker::ResolveType(dex::TypeIndex type_idx, ObjPtr<mirror::Class> resolved_type = referrer->GetDexCache<kWithoutReadBarrier>()->GetResolvedType(type_idx); if (UNLIKELY(resolved_type == nullptr)) { - resolved_type = DoResolveType(type_idx, referrer->GetDeclaringClass()); + resolved_type = DoResolveType(type_idx, referrer); } return resolved_type; } @@ -149,7 +149,7 @@ inline ObjPtr<mirror::Class> ClassLinker::ResolveType(dex::TypeIndex type_idx, ObjPtr<mirror::Class> resolved_type = referrer->GetDexCache<kWithoutReadBarrier>()->GetResolvedType(type_idx); if (UNLIKELY(resolved_type == nullptr)) { - resolved_type = DoResolveType(type_idx, referrer->GetDeclaringClass()); + resolved_type = DoResolveType(type_idx, referrer); } return resolved_type; } |