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

Side by Side Diff: public/common/WebAssertion.h

Issue 15079005: Create a minimal webkit_common static library for use in browser process (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #ifndef WebAssertion_h
2 #define WebAssertion_h
3
4 #include "WebCommonExport.h"
5
6 namespace WebKit {
7
8 BLINK_COMMON_EXPORT void failedAssertion(const char* file, int line, const char* function, const char* assertion);
9
10 } // namespace WebKit
11
12 // Ideally, only use inside the public directory but outside of WEBKIT_IMPLEMENT ATION blocks. (Otherwise use WTF's ASSERT.)
13 #if defined(NDEBUG)
14 #define WEBKIT_ASSERT(assertion) ((void)0)
15 #else
16 #define WEBKIT_ASSERT(assertion) do { \
17 if (!(assertion)) \
18 failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \
19 } while (0)
20 #endif
21
22 #define WEBKIT_ASSERT_NOT_REACHED() WEBKIT_ASSERT(0)
23
24 #endif // WebAssertion_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698