summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/portable
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-07-31 10:59:55 -0700
committerIan Rogers <irogers@google.com>2013-07-31 10:59:55 -0700
commitf417117a633bb058268981bd04e11906c85f158b (patch)
tree5a40743de1e364fb97e3350408e5688cec7a9bfe /runtime/entrypoints/portable
parent1b8b2e49fdfee50cafafe01d73346af6dfcf231d (diff)
downloadart-f417117a633bb058268981bd04e11906c85f158b.zip
art-f417117a633bb058268981bd04e11906c85f158b.tar.gz
art-f417117a633bb058268981bd04e11906c85f158b.tar.bz2
Clear exception when no move-exception on portable.
Change-Id: I36c523e479c7dc6f752b7240f4334e1e5e417190
Diffstat (limited to 'runtime/entrypoints/portable')
-rw-r--r--runtime/entrypoints/portable/portable_throw_entrypoints.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/entrypoints/portable/portable_throw_entrypoints.cc b/runtime/entrypoints/portable/portable_throw_entrypoints.cc
index 4b2b46b..64a67eb 100644
--- a/runtime/entrypoints/portable/portable_throw_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_throw_entrypoints.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "dex_instruction.h"
#include "entrypoints/entrypoint_utils.h"
#include "mirror/abstract_method-inl.h"
#include "mirror/object-inl.h"
@@ -116,6 +117,11 @@ extern "C" int32_t art_portable_find_catch_block_from_code(mirror::AbstractMetho
current_method,
catch_dex_pc,
exception);
+ // If the catch block has no move-exception then clear the exception for it.
+ const Instruction* first_catch_instr = Instruction::At(&mh.GetCodeItem()->insns_[catch_dex_pc]);
+ if (first_catch_instr->Opcode() != Instruction::MOVE_EXCEPTION) {
+ self->ClearException();
+ }
}
return result;
}