summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.cc
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2015-04-08 16:42:38 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-08 16:42:39 +0000
commita2d40be3e64b339c6c39d59655507c597251e506 (patch)
tree011137a2bb46a6bc56e9b47c0e5c9d7978aa8ace /runtime/debugger.cc
parent9d0ab6f0a2f08c3fa9a59e0b8742cf366d7d0feb (diff)
parent4e5b20863898006ec6c9d120cda167d38dda6e60 (diff)
downloadart-a2d40be3e64b339c6c39d59655507c597251e506.zip
art-a2d40be3e64b339c6c39d59655507c597251e506.tar.gz
art-a2d40be3e64b339c6c39d59655507c597251e506.tar.bz2
Merge "Fix JDWP race at runtime shutdown"
Diffstat (limited to 'runtime/debugger.cc')
-rw-r--r--runtime/debugger.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 6759c4d..a909a1a 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -307,7 +307,6 @@ static JDWP::JdwpOptions gJdwpOptions;
// Runtime JDWP state.
static JDWP::JdwpState* gJdwpState = nullptr;
static bool gDebuggerConnected; // debugger or DDMS is connected.
-static bool gDisposed; // debugger called VirtualMachine.Dispose, so we should drop the connection.
static bool gDdmThreadNotification = false;
@@ -319,6 +318,7 @@ static Dbg::HpsgWhen gDdmNhsgWhen = Dbg::HPSG_WHEN_NEVER;
static Dbg::HpsgWhat gDdmNhsgWhat;
bool Dbg::gDebuggerActive = false;
+bool Dbg::gDisposed = false;
ObjectRegistry* Dbg::gRegistry = nullptr;
// Recent allocation tracking.
@@ -551,7 +551,7 @@ void Dbg::StopJdwp() {
gJdwpState->PostVMDeath();
}
// Prevent the JDWP thread from processing JDWP incoming packets after we close the connection.
- Disposed();
+ Dispose();
delete gJdwpState;
gJdwpState = nullptr;
delete gRegistry;
@@ -599,14 +599,6 @@ void Dbg::Connected() {
gDisposed = false;
}
-void Dbg::Disposed() {
- gDisposed = true;
-}
-
-bool Dbg::IsDisposed() {
- return gDisposed;
-}
-
bool Dbg::RequiresDeoptimization() {
// We don't need deoptimization if everything runs with interpreter after
// enabling -Xint mode.