summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/entrypoints/quick/quick_trampoline_entrypoints.cc')
-rw-r--r--runtime/entrypoints/quick/quick_trampoline_entrypoints.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index 4d7c2a1acb..a4a8c349a3 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -961,9 +961,13 @@ extern "C" uint64_t artQuickProxyInvokeHandler(
self->EndAssertNoThreadSuspension(old_cause);
DCHECK_EQ(Runtime::Current()->GetClassLinker()->GetImagePointerSize(), kRuntimePointerSize);
DCHECK(!Runtime::Current()->IsActiveTransaction());
- jobject interface_method_jobj = soa.AddLocalReference<jobject>(
- mirror::Method::CreateFromArtMethod<kRuntimePointerSize, false>(soa.Self(),
- interface_method));
+ ObjPtr<mirror::Method> interface_reflect_method =
+ mirror::Method::CreateFromArtMethod<kRuntimePointerSize, false>(soa.Self(), interface_method);
+ if (interface_reflect_method == nullptr) {
+ soa.Self()->AssertPendingOOMException();
+ return 0;
+ }
+ jobject interface_method_jobj = soa.AddLocalReference<jobject>(interface_reflect_method);
// All naked Object*s should now be in jobjects, so its safe to go into the main invoke code
// that performs allocations.