From b45528c1f1b83ca8c970f439b54fbfcfda6908ea Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 27 Jul 2017 14:14:28 +0100 Subject: ART: Refactor retrieval of types through ArtMethod. Split Get*() functions that take a "bool resolve" argument into Lookup*() and Resolve*() functions. Test: m test-art-host-gtest Test: testrunner.py --host Change-Id: I0b7eaa1fadc2ffa8c0168203790467f91a126963 --- runtime/entrypoints/entrypoint_utils.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/entrypoints/entrypoint_utils.cc') diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc index 01fc9ce668..2bf4372b1f 100644 --- a/runtime/entrypoints/entrypoint_utils.cc +++ b/runtime/entrypoints/entrypoint_utils.cc @@ -45,7 +45,7 @@ void CheckReferenceResult(Handle o, Thread* self) { } // Make sure that the result is an instance of the type this method was expected to return. ArtMethod* method = self->GetCurrentMethod(nullptr); - mirror::Class* return_type = method->GetReturnType(true /* resolve */); + ObjPtr return_type = method->ResolveReturnType(); if (!o->InstanceOf(return_type)) { Runtime::Current()->GetJavaVM()->JniAbortF(nullptr, @@ -108,7 +108,7 @@ JValue InvokeProxyInvocationHandler(ScopedObjectAccessAlreadyRunnable& soa, cons ArtMethod* interface_method = soa.Decode(interface_method_jobj)->GetArtMethod(); // This can cause thread suspension. - mirror::Class* result_type = interface_method->GetReturnType(true /* resolve */); + ObjPtr result_type = interface_method->ResolveReturnType(); ObjPtr result_ref = soa.Decode(result); JValue result_unboxed; if (!UnboxPrimitiveForResult(result_ref.Ptr(), result_type, &result_unboxed)) { -- cgit v1.2.3-59-g8ed1b