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

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

Issue 1826283004: Revert NotImplemented() changes in r383029 and r383047. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/wtf/Assertions.cpp » ('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 c56caaca7d84896ae9a30fcca788250f9405f174..fa5dcaff0140aac6d80231e4781e1167c7a06f53 100644
--- a/third_party/WebKit/Source/wtf/Assertions.h
+++ b/third_party/WebKit/Source/wtf/Assertions.h
@@ -62,6 +62,10 @@
#define ASSERT_MSG_DISABLED !ENABLE(ASSERT)
#endif
+#ifndef ASSERT_ARG_DISABLED
+#define ASSERT_ARG_DISABLED !ENABLE(ASSERT)
+#endif
+
#ifndef LOG_DISABLED
#define LOG_DISABLED !ENABLE(ASSERT)
#endif
@@ -81,7 +85,9 @@ typedef struct {
} WTFLogChannel;
WTF_EXPORT void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion);
+WTF_EXPORT void WTFReportArgumentAssertionFailure(const char* file, int line, const char* function, const char* argName, const char* assertion);
WTF_EXPORT void WTFLog(WTFLogChannel*, const char* format, ...) WTF_ATTRIBUTE_PRINTF(2, 3);
+WTF_EXPORT void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChannel*, const char* format, ...) WTF_ATTRIBUTE_PRINTF(5, 6);
WTF_EXPORT void WTFLogAlways(const char* format, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
WTF_EXPORT void WTFGetBacktrace(void** stack, int* size);
@@ -195,6 +201,23 @@ WTF_EXPORT void WTFPrintBacktrace(void** stack, int size);
#define ENABLE_SECURITY_ASSERT 0
#endif
+/* ASSERT_ARG */
+
+#if ASSERT_ARG_DISABLED
+
+#define ASSERT_ARG(argName, assertion) ((void)0)
+
+#else
+
+#define ASSERT_ARG(argName, assertion) do \
+ if (!(assertion)) { \
+ WTFReportArgumentAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #argName, #assertion); \
+ CRASH(); \
+ } \
+while (0)
+
+#endif
+
// WTF_LOG
// This is deprecated. Should be replaced with DVLOG(verboselevel), which works
// only in debug build, or VLOG(verboselevel), which works in release build too.
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/wtf/Assertions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698