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

Unified Diff: webrtc/base/sequenced_task_checker.h

Issue 2384693002: Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (Closed)
Patch Set: Created 4 years, 3 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
Index: webrtc/base/sequenced_task_checker.h
diff --git a/webrtc/base/sequenced_task_checker.h b/webrtc/base/sequenced_task_checker.h
index 9fc3b4a96494a8ef80f4800bf3e47111a04c0d2a..300eee54792691105417b46ae49034a4d39223c7 100644
--- a/webrtc/base/sequenced_task_checker.h
+++ b/webrtc/base/sequenced_task_checker.h
@@ -12,18 +12,9 @@
#define WEBRTC_BASE_SEQUENCED_TASK_CHECKER_H_
// Apart from debug builds, we also enable the sequence checker in
-// builds with DCHECK_ALWAYS_ON so that trybots and waterfall bots
+// builds with RTC_DCHECK_IS_ON so that trybots and waterfall bots
// with this define will get the same level of checking as debug bots.
-//
-// Note that this does not perfectly match situations where RTC_DCHECK is
-// enabled. For example a non-official release build may have
-// DCHECK_ALWAYS_ON undefined (and therefore SequencedTaskChecker would be
-// disabled) but have RTC_DCHECKs enabled at runtime.
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
-#define ENABLE_SEQUENCED_TASK_CHECKER 1
-#else
-#define ENABLE_SEQUENCED_TASK_CHECKER 0
-#endif
+#define ENABLE_SEQUENCED_TASK_CHECKER (!!RTC_DCHECK_IS_ON)
ossu 2016/09/30 09:08:49 Alright, so maybe having separate names for the en
kwiberg-webrtc 2016/09/30 09:14:21 It causes ENABLE_SEQUENCED_TASK_CHECKER to be set
#include "webrtc/base/checks.h"
#include "webrtc/base/constructormagic.h"

Powered by Google App Engine
This is Rietveld 408576698