summaryrefslogtreecommitdiffstats
path: root/cc/scoped_thread_proxy.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 18:15:04 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 18:15:04 +0000
commit1d99317a73040007668b1cdf134334f45d45600e (patch)
tree0da28120111aa69a339ec90ff05d7cac8b21cf77 /cc/scoped_thread_proxy.h
parent52f1a7e63128f2a4f644e1a28a6744b916585999 (diff)
downloadchromium_src-1d99317a73040007668b1cdf134334f45d45600e.zip
chromium_src-1d99317a73040007668b1cdf134334f45d45600e.tar.gz
chromium_src-1d99317a73040007668b1cdf134334f45d45600e.tar.bz2
cc: Switch to Chromium DCHECKs LOGs
We can't compile-guard code and use DCHECK since it can be enabled at runtime. So we guard the DCHECKs that we want to rely on conditionally-compiled code in !NDEBUG compile guards. This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo"; This was previously discussed and committed as https://codereview.chromium.org/11048044/ using a guard based on LOGGING_IS_OFFICIAL_BUILD, however this was not sufficient since there are build configurations that are official builds but have dchecks compiled. R=enne Review URL: https://codereview.chromium.org/11192030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/scoped_thread_proxy.h')
-rw-r--r--cc/scoped_thread_proxy.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/cc/scoped_thread_proxy.h b/cc/scoped_thread_proxy.h
index 802046d..c6ac440 100644
--- a/cc/scoped_thread_proxy.h
+++ b/cc/scoped_thread_proxy.h
@@ -6,6 +6,7 @@
#define CCScopedThreadProxy_h
#include "CCThreadTask.h"
+#include "base/logging.h"
#include "base/threading/platform_thread.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -27,7 +28,7 @@ class CCScopedThreadProxy : public ThreadSafeRefCounted<CCScopedThreadProxy> {
public:
static PassRefPtr<CCScopedThreadProxy> create(CCThread* targetThread)
{
- ASSERT(base::PlatformThread::CurrentId() == targetThread->threadID());
+ DCHECK(base::PlatformThread::CurrentId() == targetThread->threadID());
return adoptRef(new CCScopedThreadProxy(targetThread));
}
@@ -43,8 +44,8 @@ public:
void shutdown()
{
- ASSERT(base::PlatformThread::CurrentId() == m_targetThread->threadID());
- ASSERT(!m_shutdown);
+ DCHECK(base::PlatformThread::CurrentId() == m_targetThread->threadID());
+ DCHECK(!m_shutdown);
m_shutdown = true;
}
@@ -60,7 +61,7 @@ private:
deref();
return;
}
- ASSERT(base::PlatformThread::CurrentId() == m_targetThread->threadID());
+ DCHECK(base::PlatformThread::CurrentId() == m_targetThread->threadID());
task->performTask();
deref();
}