OSDN Git Service

JDWP: assert no pending exception when using JNI
authorSebastien Hertz <shertz@google.com>
Wed, 29 Oct 2014 11:06:51 +0000 (12:06 +0100)
committerSebastien Hertz <shertz@google.com>
Tue, 24 Feb 2015 17:00:29 +0000 (18:00 +0100)
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

runtime/jdwp/object_registry.cc

index e415c3d..99a005d 100644 (file)
@@ -49,6 +49,8 @@ JDWP::ObjectId ObjectRegistry::InternalAdd(mirror::Object* o) {
   }
 
   Thread* const self = Thread::Current();
+  self->AssertNoPendingException();
+
   StackHandleScope<1> hs(self);
   Handle<mirror::Object> obj_h(hs.NewHandle(o));