Change ArtField::ProxyFindSystemClass() to lookup the class.
As the function is called from ArtField::LookupType(),
we should avoid calls that appear to allow type resolution
rather than plain lookup. The lookup should always succeed.
Also rename ArtField::LookupType() to LookupResolvedType()
to align with naming used in ClassLinker and ArtMethod.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I0a87347b5341575e47e0fdba6d58ade2543387c8
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index e5bb786..71b6378 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -8659,10 +8659,10 @@
DCHECK_EQ(h_dex_element_class.Get(), element_file_field->GetDeclaringClass());
ArtField* cookie_field = jni::DecodeArtField(WellKnownClasses::dalvik_system_DexFile_cookie);
- DCHECK_EQ(cookie_field->GetDeclaringClass(), element_file_field->LookupType());
+ DCHECK_EQ(cookie_field->GetDeclaringClass(), element_file_field->LookupResolvedType());
ArtField* file_name_field = jni::DecodeArtField(WellKnownClasses::dalvik_system_DexFile_fileName);
- DCHECK_EQ(file_name_field->GetDeclaringClass(), element_file_field->LookupType());
+ DCHECK_EQ(file_name_field->GetDeclaringClass(), element_file_field->LookupResolvedType());
// Fill the elements array.
int32_t index = 0;