From aa961918da5142220029da2809287e0dd537a5d7 Mon Sep 17 00:00:00 2001 From: Jeff Hao Date: Tue, 22 Apr 2014 13:54:32 -0700 Subject: Fix FindCatchBlock to work in -Xverify:none mode. FindCatchBlock now uses ResolveType to get the exception type, since it might not be able to find it in the dex cache. Bug: 13948502 Change-Id: Ia6f1c7dc743206ae1c8551bf6239f48ee4d3a784 --- runtime/catch_block_stack_visitor.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/catch_block_stack_visitor.cc') diff --git a/runtime/catch_block_stack_visitor.cc b/runtime/catch_block_stack_visitor.cc index f9acffb..410fff9 100644 --- a/runtime/catch_block_stack_visitor.cc +++ b/runtime/catch_block_stack_visitor.cc @@ -53,7 +53,9 @@ bool CatchBlockStackVisitor::HandleTryItems(mirror::ArtMethod* method) { } if (dex_pc != DexFile::kDexNoIndex) { bool clear_exception = false; - uint32_t found_dex_pc = method->FindCatchBlock(to_find_, dex_pc, &clear_exception); + SirtRef sirt_method_to_find(Thread::Current(), to_find_); + uint32_t found_dex_pc = method->FindCatchBlock(sirt_method_to_find, dex_pc, &clear_exception); + to_find_ = sirt_method_to_find.get(); catch_finder_->SetClearException(clear_exception); if (found_dex_pc != DexFile::kDexNoIndex) { catch_finder_->SetHandlerDexPc(found_dex_pc); -- cgit v1.1