summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/portable
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/entrypoints/portable')
-rw-r--r--runtime/entrypoints/portable/portable_trampoline_entrypoints.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc b/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
index 61f7440..2162dcc 100644
--- a/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
@@ -208,8 +208,8 @@ extern "C" uint64_t artPortableToInterpreterBridge(mirror::ArtMethod* method, Th
if (method->IsStatic() && !method->GetDeclaringClass()->IsInitializing()) {
// Ensure static method's class is initialized.
- if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(method->GetDeclaringClass(),
- true, true)) {
+ SirtRef<mirror::Class> sirt_c(self, method->GetDeclaringClass());
+ if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(sirt_c, true, true)) {
DCHECK(Thread::Current()->IsExceptionPending());
self->PopManagedStackFragment(fragment);
return 0;
@@ -390,7 +390,7 @@ extern "C" const void* artPortableResolutionTrampoline(mirror::ArtMethod* called
const void* code = NULL;
if (LIKELY(!thread->IsExceptionPending())) {
// Ensure that the called method's class is initialized.
- mirror::Class* called_class = called->GetDeclaringClass();
+ SirtRef<mirror::Class> called_class(thread, called->GetDeclaringClass());
linker->EnsureInitialized(called_class, true, true);
if (LIKELY(called_class->IsInitialized())) {
code = called->GetEntryPointFromCompiledCode();