diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:20:33 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:28:57 +0000 |
commit | d17ea114e5ef69ad5d5d7413280a13e6428098aa (patch) | |
tree | 2c01a75df69f30d27b1432467cfe7c1467a498da /chromium/base/logging.h | |
parent | 8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (diff) |
BASELINE: Update Chromium to 67.0.3396.47
Change-Id: Idcb1341782e417561a2473eeecc82642dafda5b7
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/base/logging.h')
-rw-r--r-- | chromium/base/logging.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/chromium/base/logging.h b/chromium/base/logging.h index ed9547344b9..1b97a4ab2ba 100644 --- a/chromium/base/logging.h +++ b/chromium/base/logging.h @@ -552,9 +552,26 @@ class CheckOpResult { #define TRAP_SEQUENCE() __builtin_trap() #endif // ARCH_CPU_* +// CHECK() and the trap sequence can be invoked from a constexpr function. +// This could make compilation fail on GCC, as it forbids directly using inline +// asm inside a constexpr function. However, it allows calling a lambda +// expression including the same asm. +// The side effect is that the top of the stacktrace will not point to the +// calling function, but to this anonymous lambda. This is still useful as the +// full name of the lambda will typically include the name of the function that +// calls CHECK() and the debugger will still break at the right line of code. +#if !defined(__clang__) +#define WRAPPED_TRAP_SEQUENCE() \ + do { \ + [] { TRAP_SEQUENCE(); }(); \ + } while (false) +#else +#define WRAPPED_TRAP_SEQUENCE() TRAP_SEQUENCE() +#endif + #define IMMEDIATE_CRASH() \ ({ \ - TRAP_SEQUENCE(); \ + WRAPPED_TRAP_SEQUENCE(); \ __builtin_unreachable(); \ }) @@ -819,7 +836,7 @@ DEFINE_CHECK_OP_IMPL(GT, > ) #if DCHECK_IS_ON() -#if defined(SYZYASAN) +#if DCHECK_IS_CONFIGURABLE BASE_EXPORT extern LogSeverity LOG_DCHECK; #else const LogSeverity LOG_DCHECK = LOG_FATAL; |