diff options
Diffstat (limited to 'runtime/thread-inl.h')
-rw-r--r-- | runtime/thread-inl.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/thread-inl.h b/runtime/thread-inl.h index e1b5b91c31..94f7585bea 100644 --- a/runtime/thread-inl.h +++ b/runtime/thread-inl.h @@ -78,7 +78,9 @@ inline ThreadState Thread::SetState(ThreadState new_state) { inline void Thread::AssertThreadSuspensionIsAllowable(bool check_locks) const { if (kIsDebugBuild) { - CHECK_EQ(0u, tls32_.no_thread_suspension) << tlsPtr_.last_no_thread_suspension_cause; + if (gAborting == 0) { + CHECK_EQ(0u, tls32_.no_thread_suspension) << tlsPtr_.last_no_thread_suspension_cause; + } if (check_locks) { bool bad_mutexes_held = false; for (int i = kLockLevelCount - 1; i >= 0; --i) { @@ -92,7 +94,9 @@ inline void Thread::AssertThreadSuspensionIsAllowable(bool check_locks) const { } } } - CHECK(!bad_mutexes_held); + if (gAborting == 0) { + CHECK(!bad_mutexes_held); + } } } } |