JDWP: assert no pending exception when using JNI
Checks there is no pending exception when creating new JDWP ids using
JNI routines. We can create JDWP ids when executing code and report
an event like a breakpoint.
Bug: 17491155
Change-Id: I4e5851bf2261510b7776a709a2388e7ff586a77c
diff --git a/runtime/jdwp/object_registry.cc b/runtime/jdwp/object_registry.cc
index e415c3d..99a005d 100644
--- a/runtime/jdwp/object_registry.cc
+++ b/runtime/jdwp/object_registry.cc
@@ -49,6 +49,8 @@
}
Thread* const self = Thread::Current();
+ self->AssertNoPendingException();
+
StackHandleScope<1> hs(self);
Handle<mirror::Object> obj_h(hs.NewHandle(o));