Commit cb7c529e authored by danakj's avatar danakj Committed by Commit bot

Wrap the conditional in CHECK with UNLIKELY since it is.

This matches what was done in RELEASE_ASSERT in blink. No perf
bots noticed this being missing (it does nothing on windows which
is where perf bots noticed anything) but it won't hurt right.

R=dcheng@chromium.org
BUG=672699

Review-Url: https://codereview.chromium.org/2589943002
Cr-Commit-Position: refs/heads/master@{#439860}
parent c344e579
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <utility> #include <utility>
#include "base/base_export.h" #include "base/base_export.h"
#include "base/compiler_specific.h"
#include "base/debug/debugger.h" #include "base/debug/debugger.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/template_util.h" #include "base/template_util.h"
...@@ -482,7 +483,7 @@ class CheckOpResult { ...@@ -482,7 +483,7 @@ class CheckOpResult {
// calling an out-of-line function instead of a noreturn inline macro prevents // calling an out-of-line function instead of a noreturn inline macro prevents
// compiler optimizations. // compiler optimizations.
#define CHECK(condition) \ #define CHECK(condition) \
!(condition) ? IMMEDIATE_CRASH() : EAT_STREAM_PARAMETERS UNLIKELY(!(condition)) ? IMMEDIATE_CRASH() : EAT_STREAM_PARAMETERS
#define PCHECK(condition) CHECK(condition) #define PCHECK(condition) CHECK(condition)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment