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

Unified Diff: cc/CCCompletionEvent.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/CCCheckerboardDrawQuad.cpp ('k') | cc/CCDamageTracker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCCompletionEvent.h
diff --git a/cc/CCCompletionEvent.h b/cc/CCCompletionEvent.h
index 462e4ba12f6885a40c01711e66187a2e795c4d52..b9b244cdb6f8c5eebb6095bbb210dedd489e62d7 100644
--- a/cc/CCCompletionEvent.h
+++ b/cc/CCCompletionEvent.h
@@ -5,6 +5,7 @@
#ifndef CCCompletionEvent_h
#define CCCompletionEvent_h
+#include "base/logging.h"
#include "base/synchronization/waitable_event.h"
namespace cc {
@@ -18,43 +19,35 @@ public:
CCCompletionEvent()
: m_event(false /* manual_reset */, false /* initially_signaled */)
{
-#ifndef NDEBUG
m_waited = false;
m_signaled = false;
-#endif
}
~CCCompletionEvent()
{
- ASSERT(m_waited);
- ASSERT(m_signaled);
+ DCHECK(m_waited);
+ DCHECK(m_signaled);
}
void wait()
{
- ASSERT(!m_waited);
-#ifndef NDEBUG
+ DCHECK(!m_waited);
m_waited = true;
-#endif
m_event.Wait();
}
void signal()
{
- ASSERT(!m_signaled);
-#ifndef NDEBUG
+ DCHECK(!m_signaled);
m_signaled = true;
-#endif
m_event.Signal();
}
private:
base::WaitableEvent m_event;
-#ifndef NDEBUG
slavi 2012/10/12 22:10:13 Maybe change all the #ifndef NDEBUG to #if ENABLE_
danakj 2012/10/12 22:13:20 ENABLE_DCHECK only exists inside base/logging.h Th
// Used to assert that wait() and signal() are each called exactly once.
bool m_waited;
bool m_signaled;
-#endif
};
}
« no previous file with comments | « cc/CCCheckerboardDrawQuad.cpp ('k') | cc/CCDamageTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698