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

Unified Diff: cc/completion_event.h

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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/checkerboard_draw_quad.cc ('k') | cc/damage_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/completion_event.h
diff --git a/cc/completion_event.h b/cc/completion_event.h
index 795b0303323fb9db75f2444346e860107ecf2944..a0be8e6292da1c08d5c2e9737a33cc9ace45f134 100644
--- a/cc/completion_event.h
+++ b/cc/completion_event.h
@@ -7,6 +7,7 @@
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread_restrictions.h"
+#include "cc/dcheck.h"
namespace cc {
@@ -19,7 +20,7 @@ public:
CCCompletionEvent()
: m_event(false /* manual_reset */, false /* initially_signaled */)
{
-#ifndef NDEBUG
+#if CC_DCHECK_ENABLED()
m_waited = false;
m_signaled = false;
#endif
@@ -27,14 +28,14 @@ public:
~CCCompletionEvent()
{
- ASSERT(m_waited);
- ASSERT(m_signaled);
+ CC_DCHECK(m_waited);
+ CC_DCHECK(m_signaled);
}
void wait()
{
- ASSERT(!m_waited);
-#ifndef NDEBUG
+ CC_DCHECK(!m_waited);
+#if CC_DCHECK_ENABLED()
m_waited = true;
#endif
base::ThreadRestrictions::ScopedAllowWait allow_wait;
@@ -43,8 +44,8 @@ public:
void signal()
{
- ASSERT(!m_signaled);
-#ifndef NDEBUG
+ CC_DCHECK(!m_signaled);
+#if CC_DCHECK_ENABLED()
m_signaled = true;
#endif
m_event.Signal();
@@ -52,7 +53,7 @@ public:
private:
base::WaitableEvent m_event;
-#ifndef NDEBUG
+#if CC_DCHECK_ENABLED()
// Used to assert that wait() and signal() are each called exactly once.
bool m_waited;
bool m_signaled;
« no previous file with comments | « cc/checkerboard_draw_quad.cc ('k') | cc/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698