Index: runtime/vm/thread_interrupter.cc |
diff --git a/runtime/vm/thread_interrupter.cc b/runtime/vm/thread_interrupter.cc |
index 0ad9ead78a78515ad8db21d12bffd6bca09eacf7..b9d583a531f4b491534016938eef56eb12f8fbd9 100644 |
--- a/runtime/vm/thread_interrupter.cc |
+++ b/runtime/vm/thread_interrupter.cc |
@@ -70,6 +70,14 @@ void ThreadInterrupter::InitOnce() { |
void ThreadInterrupter::Startup() { |
ASSERT(initialized_); |
+ if (IsDebuggerAttached()) { |
+ MonitorLocker shutdown_ml(monitor_); |
+ shutdown_ = true; |
+ if (FLAG_trace_thread_interrupter) { |
+ OS::Print("ThreadInterrupter disabled because a debugger is attached.\n"); |
Vyacheslav Egorov (Google)
2017/02/09 17:14:05
OS::PrintErr?
Cutch
2017/02/09 18:34:07
Done here and elsewhere
|
+ } |
+ return; |
+ } |
if (FLAG_trace_thread_interrupter) { |
OS::Print("ThreadInterrupter starting up.\n"); |
} |