From 208f67072283be64da231b51f9c195aff403dceb Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 8 Dec 2017 12:00:50 +0000 Subject: 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 --- runtime/mirror/object.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/mirror/object.cc') diff --git a/runtime/mirror/object.cc b/runtime/mirror/object.cc index 87cc620309..97fb793530 100644 --- a/runtime/mirror/object.cc +++ b/runtime/mirror/object.cc @@ -240,7 +240,7 @@ void Object::CheckFieldAssignmentImpl(MemberOffset field_offset, ObjPtr CHECK_NE(field.GetTypeAsPrimitiveType(), Primitive::kPrimNot); // TODO: resolve the field type for moving GC. ObjPtr field_type = - kMovingCollector ? field.LookupType() : field.ResolveType(); + kMovingCollector ? field.LookupResolvedType() : field.ResolveType(); if (field_type != nullptr) { CHECK(field_type->IsAssignableFrom(new_value->GetClass())); } @@ -258,7 +258,7 @@ void Object::CheckFieldAssignmentImpl(MemberOffset field_offset, ObjPtr CHECK_NE(field.GetTypeAsPrimitiveType(), Primitive::kPrimNot); // TODO: resolve the field type for moving GC. ObjPtr field_type = - kMovingCollector ? field.LookupType() : field.ResolveType(); + kMovingCollector ? field.LookupResolvedType() : field.ResolveType(); if (field_type != nullptr) { CHECK(field_type->IsAssignableFrom(new_value->GetClass())); } -- cgit v1.2.3-59-g8ed1b