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

Side by Side 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: Check the |callbacks| for nullptr and use explicit delete. Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // UTF-16 character type 86 // UTF-16 character type
87 #if defined(WIN32) 87 #if defined(WIN32)
88 typedef wchar_t WebUChar; 88 typedef wchar_t WebUChar;
89 #else 89 #else
90 typedef unsigned short WebUChar; 90 typedef unsigned short WebUChar;
91 #endif 91 #endif
92 92
93 // Latin-1 character type 93 // Latin-1 character type
94 typedef unsigned char WebLChar; 94 typedef unsigned char WebLChar;
95 95
96 // -----------------------------------------------------------------------------
97 // Assertions
98
99 BLINK_COMMON_EXPORT void failedAssertion(const char* file, int line, const char* function, const char* assertion);
100
101 } // namespace blink 96 } // namespace blink
102 97
103 // Ideally, only use inside the public directory but outside of INSIDE_BLINK blo cks. (Otherwise use WTF's ASSERT.)
104 #if defined(NDEBUG)
105 #define BLINK_ASSERT(assertion) ((void)0)
106 #else
107 #define BLINK_ASSERT(assertion) do { \
108 if (!(assertion)) \
109 failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \
110 } while (0)
111 #endif 98 #endif
112
113 #define BLINK_ASSERT_NOT_REACHED() BLINK_ASSERT(0)
114
115 #endif
OLDNEW
« 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