Make sure the referring class is in the dex cache.
The method CanAccessResolvedMethod expects the referring class
in the dex file is already in the dex cache, which is true during AOT,
but not necessarilly during JIT.
bug:28295348
(cherry picked from commit 393fdb8b4822d80bbbd6347b088e28c03a72289e)
Change-Id: I9665d377070278639eb4b5a6eeced85d656e6cb6
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index 8155ac6..2743921 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -310,9 +310,9 @@
// This returns the class referred to by GetMethodId(method_idx).class_idx_. This might be
// different then the declaring class of the resolved method due to copied
// miranda/default/conflict methods.
- mirror::Class* ResolveReferencedClassOfMethod(Thread* self,
- uint32_t method_idx,
- ArtMethod* referrer)
+ mirror::Class* ResolveReferencedClassOfMethod(uint32_t method_idx,
+ Handle<mirror::DexCache> dex_cache,
+ Handle<mirror::ClassLoader> class_loader)
SHARED_REQUIRES(Locks::mutator_lock_)
REQUIRES(!dex_lock_, !Roles::uninterruptible_);
template <ResolveMode kResolveMode>