| Index: src/base/logging.h
|
| diff --git a/src/base/logging.h b/src/base/logging.h
|
| index 83c1bb60136c1ec9d626c0230db452f3dbb2bf96..9bfa74427942aebc26c78c92b3b8a53e6aaa6285 100644
|
| --- a/src/base/logging.h
|
| +++ b/src/base/logging.h
|
| @@ -12,10 +12,16 @@
|
|
|
| extern "C" void V8_Fatal(const char* file, int line, const char* format, ...);
|
|
|
| +#if defined(DEBUG) || defined(DCHECK_ALWAYS_ON)
|
| +#define DCHECK_IS_ON 1
|
| +#else
|
| +#define DCHECK_IS_ON 0
|
| +#endif
|
| +
|
|
|
| // The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during
|
| // development, but they should not be relied on in the final product.
|
| -#ifdef DEBUG
|
| +#if DCHECK_IS_ON
|
| #define FATAL(msg) \
|
| V8_Fatal(__FILE__, __LINE__, "%s", (msg))
|
| #define UNIMPLEMENTED() \
|
| @@ -191,8 +197,8 @@ void DumpBacktrace();
|
|
|
|
|
| // The DCHECK macro is equivalent to CHECK except that it only
|
| -// generates code in debug builds.
|
| -#ifdef DEBUG
|
| +// generates code in debug builds or if DCHECK_ALWAYS_ON is defined.
|
| +#if DCHECK_IS_ON
|
| #define DCHECK_RESULT(expr) CHECK(expr)
|
| #define DCHECK(condition) CHECK(condition)
|
| #define DCHECK_EQ(v1, v2) CHECK_EQ(v1, v2)
|
|
|