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
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h
index 21eeafa..65bdf0e 100644
--- a/runtime/interpreter/interpreter_common.h
+++ b/runtime/interpreter/interpreter_common.h
@@ -498,7 +498,8 @@
ThrowLocation throw_location;
mirror::Throwable* exception = self->GetException(&throw_location);
bool clear_exception = false;
- uint32_t found_dex_pc = shadow_frame.GetMethod()->FindCatchBlock(exception->GetClass(), dex_pc,
+ SirtRef<mirror::Class> exception_class(self, exception->GetClass());
+ uint32_t found_dex_pc = shadow_frame.GetMethod()->FindCatchBlock(exception_class, dex_pc,
&clear_exception);
if (found_dex_pc == DexFile::kDexNoIndex) {
instrumentation->MethodUnwindEvent(self, this_object,