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

Unified Diff: third_party/WebKit/Source/wtf/Assertions.h

Issue 2240233002: Print additional message for RELEASE_ASSERT in builds used for fuzzing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: #define RELEASE_ASSERT(condition) SECURITY_CHECK(condition) for our case. Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/StringConcatenate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Assertions.h
diff --git a/third_party/WebKit/Source/wtf/Assertions.h b/third_party/WebKit/Source/wtf/Assertions.h
index 750ee7e3c975f9a027b64fe41070093370714ea1..c69fc6246e9a7f1e0abae58e3c879b330c3372fd 100644
--- a/third_party/WebKit/Source/wtf/Assertions.h
+++ b/third_party/WebKit/Source/wtf/Assertions.h
@@ -246,10 +246,9 @@ private:
// failures using the security template:
// https://bugs.chromium.org/p/chromium/issues/entry?template=Security%20Bug
#if ENABLE_SECURITY_ASSERT
-#define SECURITY_DCHECK(condition) LOG_IF(FATAL, !(condition)) << "Security check failed: " #condition ". "
-// TODO(tkent): Should we make SECURITY_CHECK different from SECURITY_DCHECK?
+#define SECURITY_DCHECK(condition) LOG_IF(FATAL, !(condition)) << "Security DCHECK failed: " #condition ". "
// A SECURITY_CHECK failure is actually not vulnerable.
-#define SECURITY_CHECK(condition) SECURITY_DCHECK(condition)
+#define SECURITY_CHECK(condition) LOG_IF(FATAL, !(condition)) << "Security CHECK failed: " #condition ". "
#else
#define SECURITY_DCHECK(condition) ((void)0)
#define SECURITY_CHECK(condition) CHECK(condition)
@@ -263,6 +262,8 @@ private:
// RELEASE_ASSERT is deprecated. We should use CHECK() instead.
#if ENABLE(ASSERT)
#define RELEASE_ASSERT(assertion) ASSERT(assertion)
+#elif defined(ADDRESS_SANITIZER)
+#define RELEASE_ASSERT(condition) SECURITY_CHECK(condition)
#else
#define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH()) : (void)0)
#endif
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/StringConcatenate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698