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

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: rebaseonenne 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
« no previous file with comments | « cc/proxy.h ('k') | cc/quad_culler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/proxy.cc
diff --git a/cc/proxy.cc b/cc/proxy.cc
index c3c6a11ef2eb00bc76953d2c1253e4ba68c2814a..e9f0d0952f4e9b713c51424ad1d50cc9e308a162 100644
--- a/cc/proxy.cc
+++ b/cc/proxy.cc
@@ -55,35 +55,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;
@@ -92,12 +106,12 @@ void CCProxy::setMainThreadBlocked(bool isMainThreadBlocked)
CCProxy::CCProxy()
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
}
CCProxy::~CCProxy()
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
}
}
« no previous file with comments | « cc/proxy.h ('k') | cc/quad_culler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698