Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5437)

Unified Diff: base/threading/thread_restrictions.cc

Issue 2213933003: Change EXPECT/ASSERT_DCHECK_DEATH macro to not expose the |regex| parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b2b0_simplethreadJoinable
Patch Set: Disabling a death test which crashed instead of DCHECKing : http://crbug.com/634552 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/threading/simple_thread_unittest.cc ('k') | base/threading/thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_restrictions.cc
diff --git a/base/threading/thread_restrictions.cc b/base/threading/thread_restrictions.cc
index 93a452ff59fc1bea70dc9d31b214bfd35679dcfc..8dd77433325f075e2741086368612ae2c8c6eb3f 100644
--- a/base/threading/thread_restrictions.cc
+++ b/base/threading/thread_restrictions.cc
@@ -35,7 +35,7 @@ bool ThreadRestrictions::SetIOAllowed(bool allowed) {
// static
void ThreadRestrictions::AssertIOAllowed() {
if (g_io_disallowed.Get().Get()) {
- LOG(FATAL) <<
+ NOTREACHED() <<
"Function marked as IO-only was called from a thread that "
"disallows IO! If this thread really should be allowed to "
"make IO calls, adjust the call to "
@@ -54,14 +54,14 @@ bool ThreadRestrictions::SetSingletonAllowed(bool allowed) {
// static
void ThreadRestrictions::AssertSingletonAllowed() {
if (g_singleton_disallowed.Get().Get()) {
- LOG(FATAL) << "LazyInstance/Singleton is not allowed to be used on this "
- << "thread. Most likely it's because this thread is not "
- << "joinable (or the current task is running with "
- << "TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN semantics), so "
- << "AtExitManager may have deleted the object on shutdown, "
- << "leading to a potential shutdown crash. If you need to use "
- << "the object from this context, it'll have to be updated to "
- << "use Leaky traits.";
+ NOTREACHED() << "LazyInstance/Singleton is not allowed to be used on this "
+ << "thread. Most likely it's because this thread is not "
+ << "joinable (or the current task is running with "
+ << "TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN semantics), so "
+ << "AtExitManager may have deleted the object on shutdown, "
+ << "leading to a potential shutdown crash. If you need to use "
+ << "the object from this context, it'll have to be updated to "
+ << "use Leaky traits.";
}
}
@@ -73,8 +73,8 @@ void ThreadRestrictions::DisallowWaiting() {
// static
void ThreadRestrictions::AssertWaitAllowed() {
if (g_wait_disallowed.Get().Get()) {
- LOG(FATAL) << "Waiting is not allowed to be used on this thread to prevent "
- << "jank and deadlock.";
+ NOTREACHED() << "Waiting is not allowed to be used on this thread to "
+ << "prevent jank and deadlock.";
}
}
« no previous file with comments | « base/threading/simple_thread_unittest.cc ('k') | base/threading/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698