Index: cc/completion_event.h |
diff --git a/cc/completion_event.h b/cc/completion_event.h |
index 462e4ba12f6885a40c01711e66187a2e795c4d52..6bf46552800c2c9618f6589e9f085649ea2ffb64 100644 |
--- a/cc/completion_event.h |
+++ b/cc/completion_event.h |
@@ -6,6 +6,7 @@ |
#define CCCompletionEvent_h |
#include "base/synchronization/waitable_event.h" |
+#include "cc/dcheck.h" |
namespace cc { |
@@ -18,7 +19,7 @@ public: |
CCCompletionEvent() |
: m_event(false /* manual_reset */, false /* initially_signaled */) |
{ |
-#ifndef NDEBUG |
+#if CC_DCHECK_ENABLED |
m_waited = false; |
m_signaled = false; |
#endif |
@@ -26,14 +27,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 |
m_event.Wait(); |
@@ -41,8 +42,8 @@ public: |
void signal() |
{ |
- ASSERT(!m_signaled); |
-#ifndef NDEBUG |
+ CC_DCHECK(!m_signaled); |
+#if CC_DCHECK_ENABLED |
m_signaled = true; |
#endif |
m_event.Signal(); |
@@ -50,7 +51,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; |