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

Unified Diff: third_party/WebKit/public/platform/WebCommon.h

Issue 1851293002: Remove BLINK_ASSERT() and BLINK_ASSERT_NOT_REACHED() macros. (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
Index: third_party/WebKit/public/platform/WebCommon.h
diff --git a/third_party/WebKit/public/platform/WebCommon.h b/third_party/WebKit/public/platform/WebCommon.h
index 9d0a40af61826fe6ff035cb73b18b9cb2893a29f..e0cba51b6d65d1021c0a6adb7bce758739bd7663 100644
--- a/third_party/WebKit/public/platform/WebCommon.h
+++ b/third_party/WebKit/public/platform/WebCommon.h
@@ -73,6 +73,11 @@
// -----------------------------------------------------------------------------
+// Assertions
+
+#include "base/logging.h"
tkent 2016/04/03 22:59:06 WebCommon.h shouldn't include base/logging.h. Eac
haraken 2016/04/03 23:53:46 This is a tricky part since core/, modules/ and we
kotenkov 2016/04/04 07:46:34 There already exists such a file: wtf/Assertions.h
tkent 2016/04/04 09:03:17 Right. So, I think using base/logging.h directly
+
+// -----------------------------------------------------------------------------
// Basic types
#include <stddef.h> // For size_t
@@ -93,23 +98,6 @@ typedef unsigned short WebUChar;
// Latin-1 character type
typedef unsigned char WebLChar;
-// -----------------------------------------------------------------------------
-// Assertions
-
-BLINK_COMMON_EXPORT void failedAssertion(const char* file, int line, const char* function, const char* assertion);
tkent 2016/04/03 22:59:06 We should remove failedAssertion() implementation
-
} // namespace blink
-// Ideally, only use inside the public directory but outside of INSIDE_BLINK blocks. (Otherwise use WTF's ASSERT.)
-#if defined(NDEBUG)
-#define BLINK_ASSERT(assertion) ((void)0)
-#else
-#define BLINK_ASSERT(assertion) do { \
- if (!(assertion)) \
- failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \
-} while (0)
-#endif
-
-#define BLINK_ASSERT_NOT_REACHED() BLINK_ASSERT(0)
-
#endif
« no previous file with comments | « third_party/WebKit/public/platform/WebBlobRegistry.h ('k') | third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698