summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2017-07-27 14:14:28 +0100
committer Vladimir Marko <vmarko@google.com> 2017-07-27 15:30:47 +0100
commitb45528c1f1b83ca8c970f439b54fbfcfda6908ea (patch)
treee8f493a7b21064d353d112ea1378d7819db385aa /runtime/entrypoints/entrypoint_utils.cc
parent2c2e13ec24bff70db6e49270b9d4d787add9925e (diff)
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
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
-rw-r--r--runtime/entrypoints/entrypoint_utils.cc4
1 files changed, 2 insertions, 2 deletions
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<mirror::Object> 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<mirror::Class> 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<mirror::Method>(interface_method_jobj)->GetArtMethod();
// This can cause thread suspension.
- mirror::Class* result_type = interface_method->GetReturnType(true /* resolve */);
+ ObjPtr<mirror::Class> result_type = interface_method->ResolveReturnType();
ObjPtr<mirror::Object> result_ref = soa.Decode<mirror::Object>(result);
JValue result_unboxed;
if (!UnboxPrimitiveForResult(result_ref.Ptr(), result_type, &result_unboxed)) {