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

Unified Diff: cc/proxy.cc

Issue 11192030: cc: Switch to Chromium DCHECKs LOGs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcheck and ndebug Created 8 years, 2 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
Index: cc/proxy.cc
diff --git a/cc/proxy.cc b/cc/proxy.cc
index bc5ae69a57b362022d0022cc5c4a2b7e4d7e8ef3..df340bb94645d1b95c23900ee480eb37282e8f06 100644
--- a/cc/proxy.cc
+++ b/cc/proxy.cc
@@ -57,35 +57,49 @@ CCThread* CCProxy::currentThread()
return 0;
}
-#ifndef NDEBUG
bool CCProxy::isMainThread()
{
- ASSERT(s_mainThread);
+#ifndef NDEBUG
+ DCHECK(s_mainThread);
if (implThreadIsOverridden && base::PlatformThread::CurrentId() == threadIDOverridenToBeImplThread)
return false;
return base::PlatformThread::CurrentId() == s_mainThread->threadID();
+#else
+ return true;
+#endif
}
bool CCProxy::isImplThread()
{
+#ifndef NDEBUG
base::PlatformThreadId implThreadID = s_implThread ? s_implThread->threadID() : 0;
if (implThreadIsOverridden && base::PlatformThread::CurrentId() == threadIDOverridenToBeImplThread)
return true;
return base::PlatformThread::CurrentId() == implThreadID;
+#else
+ return true;
+#endif
}
+#ifndef NDEBUG
void CCProxy::setCurrentThreadIsImplThread(bool isImplThread)
{
implThreadIsOverridden = isImplThread;
if (isImplThread)
threadIDOverridenToBeImplThread = base::PlatformThread::CurrentId();
}
+#endif
bool CCProxy::isMainThreadBlocked()
{
+#ifndef NDEBUG
return s_isMainThreadBlocked;
+#else
+ return true;
+#endif
}
+#ifndef NDEBUG
void CCProxy::setMainThreadBlocked(bool isMainThreadBlocked)
{
s_isMainThreadBlocked = isMainThreadBlocked;
@@ -94,12 +108,12 @@ void CCProxy::setMainThreadBlocked(bool isMainThreadBlocked)
CCProxy::CCProxy()
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
}
CCProxy::~CCProxy()
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
}
}
« cc/checkerboard_draw_quad.cc ('K') | « cc/proxy.h ('k') | cc/quad_culler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698