Tidy gAborting.
Reduce scope to Runtime::Abort and short-cut recursive case earlier. gAborting
remains global to avoid two fatal errors in thread and the verifier.
Change-Id: Ibc893f891ffee9a763c65cde9507d99083d47b3f
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index beafcda..71325a5 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -168,9 +168,7 @@
const uint32_t kWaitTimeoutMs = 10000;
bool timed_out = barrier_.Increment(self, threads_running_checkpoint, kWaitTimeoutMs);
if (timed_out) {
- // Avoid a recursive abort.
- LOG((kIsDebugBuild && (gAborting == 0)) ? FATAL : ERROR)
- << "Unexpected time out during dump checkpoint.";
+ LOG(kIsDebugBuild ? FATAL : ERROR) << "Unexpected time out during dump checkpoint.";
}
}
@@ -243,7 +241,7 @@
Locks::mutator_lock_->AssertNotExclusiveHeld(self);
Locks::thread_list_lock_->AssertNotHeld(self);
Locks::thread_suspend_count_lock_->AssertNotHeld(self);
- if (kDebugLocking && gAborting == 0) {
+ if (kDebugLocking) {
CHECK_NE(self->GetState(), kRunnable);
}