Fail threads attaching during runtime shutdown.
Introduce counters to indicate that threads are being born. Don't allow
thread birth to occur during runtime shutdown.
Bug: 7000936
Change-Id: Ib0d78f78c0ff126a4b5d3b5a6f1a2ff8f5061ae9
diff --git a/src/jdwp/jdwp_main.cc b/src/jdwp/jdwp_main.cc
index a09c488..0c3a9a0 100644
--- a/src/jdwp/jdwp_main.cc
+++ b/src/jdwp/jdwp_main.cc
@@ -284,7 +284,7 @@
void JdwpState::Run() {
Runtime* runtime = Runtime::Current();
- runtime->AttachCurrentThread("JDWP", true, runtime->GetSystemThreadGroup());
+ CHECK(runtime->AttachCurrentThread("JDWP", true, runtime->GetSystemThreadGroup()));
VLOG(jdwp) << "JDWP: thread running";