diff options
author | Jeff Hao <jeffhao@google.com> | 2014-04-22 13:54:32 -0700 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2014-04-22 17:03:21 -0700 |
commit | aa961918da5142220029da2809287e0dd537a5d7 (patch) | |
tree | 93cdad41650f353e1c7d82aaa8894037b12bb2a0 /runtime/catch_block_stack_visitor.cc | |
parent | 82b1a81890970a8b07f9132aeae537a6c43df6b0 (diff) | |
download | art-aa961918da5142220029da2809287e0dd537a5d7.zip art-aa961918da5142220029da2809287e0dd537a5d7.tar.gz art-aa961918da5142220029da2809287e0dd537a5d7.tar.bz2 |
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
Diffstat (limited to 'runtime/catch_block_stack_visitor.cc')
-rw-r--r-- | runtime/catch_block_stack_visitor.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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<mirror::Class> 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); |