diff options
author | 2015-01-08 16:26:04 +0000 | |
---|---|---|
committer | 2015-01-08 16:26:06 +0000 | |
commit | 97d091d0a1667592e15bac44e21dc94f9fc032fc (patch) | |
tree | ed82813915125c9efbac692acb9be297d8ed541e | |
parent | 4270e74152d8a7cd979ab5a92fe2a8f84adb8a42 (diff) | |
parent | 107e757bfd32cc27750955e6f392986414bebe75 (diff) |
Merge "JDWP: do not report start/end events for thread without peer"
-rw-r--r-- | runtime/jdwp/jdwp_event.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/jdwp/jdwp_event.cc b/runtime/jdwp/jdwp_event.cc index 1bf16b285c..cb28ff0647 100644 --- a/runtime/jdwp/jdwp_event.cc +++ b/runtime/jdwp/jdwp_event.cc @@ -1015,6 +1015,14 @@ void JdwpState::PostThreadChange(Thread* thread, bool start) { return; } + // We need the java.lang.Thread object associated to the starting/ending + // thread to get its JDWP id. Therefore we can't report event if there + // is no Java peer. This happens when the runtime shuts down and re-attaches + // the current thread without creating a Java peer. + if (thread->GetPeer() == nullptr) { + return; + } + ModBasket basket; basket.thread = thread; |