Index: ppapi/cpp/logging.h |
diff --git a/ppapi/cpp/logging.h b/ppapi/cpp/logging.h |
index d0a4f5b29a5635973571a9638900251379c56a41..098cb652a77a6b33d0043aed6463ed1f24dc990f 100644 |
--- a/ppapi/cpp/logging.h |
+++ b/ppapi/cpp/logging.h |
@@ -13,7 +13,11 @@ |
/// This macro asserts that 'a' evaluates to true. In debug mode, this macro |
/// will crash the program if the assertion evaluates to false. It (typically) |
/// has no effect in release mode. |
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
#define PP_DCHECK(a) assert(a) |
+#else // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
+#define PP_DCHECK(a) |
+#endif // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
/// This macro asserts false in debug builds. It's used in code paths that you |
/// don't expect to execute. |
@@ -29,6 +33,10 @@ |
/// // Do stuff to the pointer, since you know it's valid. |
/// pointer->DoSomething(); |
/// @endcode |
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
#define PP_NOTREACHED() assert(false) |
+#else // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
+#define PP_NOTREACHED() |
+#endif // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
#endif // PPAPI_CPP_LOGGING_H_ |