diff options
Diffstat (limited to 'runtime/mirror/art_method.cc')
| -rw-r--r-- | runtime/mirror/art_method.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/mirror/art_method.cc b/runtime/mirror/art_method.cc index eef60f7b01..0632a68afa 100644 --- a/runtime/mirror/art_method.cc +++ b/runtime/mirror/art_method.cc @@ -230,14 +230,15 @@ uintptr_t ArtMethod::ToNativePc(const uint32_t dex_pc) { return 0; } -uint32_t ArtMethod::FindCatchBlock(SirtRef<Class>& exception_type, uint32_t dex_pc, +uint32_t ArtMethod::FindCatchBlock(Handle<Class>& exception_type, uint32_t dex_pc, bool* has_no_move_exception) { MethodHelper mh(this); const DexFile::CodeItem* code_item = mh.GetCodeItem(); // Set aside the exception while we resolve its type. Thread* self = Thread::Current(); ThrowLocation throw_location; - SirtRef<mirror::Throwable> exception(self, self->GetException(&throw_location)); + StackHandleScope<1> hs(self); + Handle<mirror::Throwable> exception(hs.NewHandle(self->GetException(&throw_location))); self->ClearException(); // Default to handler not found. uint32_t found_dex_pc = DexFile::kDexNoIndex; @@ -251,11 +252,11 @@ uint32_t ArtMethod::FindCatchBlock(SirtRef<Class>& exception_type, uint32_t dex_ } // Does this catch exception type apply? Class* iter_exception_type = mh.GetClassFromTypeIdx(iter_type_idx); - if (exception_type.get() == nullptr) { + if (exception_type.Get() == nullptr) { self->ClearException(); LOG(WARNING) << "Unresolved exception class when finding catch block: " << mh.GetTypeDescriptorFromTypeIdx(iter_type_idx); - } else if (iter_exception_type->IsAssignableFrom(exception_type.get())) { + } else if (iter_exception_type->IsAssignableFrom(exception_type.Get())) { found_dex_pc = it.GetHandlerAddress(); break; } @@ -266,8 +267,8 @@ uint32_t ArtMethod::FindCatchBlock(SirtRef<Class>& exception_type, uint32_t dex_ *has_no_move_exception = (first_catch_instr->Opcode() != Instruction::MOVE_EXCEPTION); } // Put the exception back. - if (exception.get() != nullptr) { - self->SetException(throw_location, exception.get()); + if (exception.Get() != nullptr) { + self->SetException(throw_location, exception.Get()); } return found_dex_pc; } |