diff options
author | Ian Rogers <irogers@google.com> | 2014-12-04 19:53:52 -0800 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-12-04 20:04:45 -0800 |
commit | 015b137efb434528173779bc3ec8d72494456254 (patch) | |
tree | 2ccaba9d7465bd9995082a7251d34cf76b1ab1ea /runtime/thread-inl.h | |
parent | a21fdd0432aa38b63d144ee4b92b6a567aab61d2 (diff) | |
download | art-015b137efb434528173779bc3ec8d72494456254.zip art-015b137efb434528173779bc3ec8d72494456254.tar.gz art-015b137efb434528173779bc3ec8d72494456254.tar.bz2 |
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
Diffstat (limited to 'runtime/thread-inl.h')
-rw-r--r-- | runtime/thread-inl.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/thread-inl.h b/runtime/thread-inl.h index 7aed8b0..49b7be9 100644 --- a/runtime/thread-inl.h +++ b/runtime/thread-inl.h @@ -83,9 +83,7 @@ inline ThreadState Thread::SetState(ThreadState new_state) { inline void Thread::AssertThreadSuspensionIsAllowable(bool check_locks) const { if (kIsDebugBuild) { - if (gAborting == 0) { - CHECK_EQ(0u, tls32_.no_thread_suspension) << tlsPtr_.last_no_thread_suspension_cause; - } + 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) { @@ -99,9 +97,7 @@ inline void Thread::AssertThreadSuspensionIsAllowable(bool check_locks) const { } } } - if (gAborting == 0) { - CHECK(!bad_mutexes_held); - } + CHECK(!bad_mutexes_held); } } } |