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

Side by Side Diff: Source/wtf/Assertions.h

Issue 348833005: [DO NOT COMMIT] Random hacks to unblock work on replication. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More random hacks, including also dcheng's https://codereview.chromium.org/346403002 Created 6 years, 5 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
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 (void)0) 205 (void)0)
206 206
207 #define ASSERT_AT(assertion, file, line, function) \ 207 #define ASSERT_AT(assertion, file, line, function) \
208 (!(assertion) ? \ 208 (!(assertion) ? \
209 (WTFReportAssertionFailure(file, line, function, #assertion), \ 209 (WTFReportAssertionFailure(file, line, function, #assertion), \
210 CRASH()) : \ 210 CRASH()) : \
211 (void)0) 211 (void)0)
212 212
213 #define ASSERT_NOT_REACHED() do { \ 213 #define ASSERT_NOT_REACHED() do { \
214 WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, 0); \ 214 WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, 0); \
215 CRASH(); \ 215 /*CRASH();*/ \
216 } while (0) 216 } while (0)
217 217
218 #define ASSERT_UNUSED(variable, assertion) ASSERT(assertion) 218 #define ASSERT_UNUSED(variable, assertion) ASSERT(assertion)
219 219
220 #define NO_RETURN_DUE_TO_ASSERT NO_RETURN_DUE_TO_CRASH 220 #define NO_RETURN_DUE_TO_ASSERT NO_RETURN_DUE_TO_CRASH
221 221
222 #else 222 #else
223 223
224 #define ASSERT(assertion) ((void)0) 224 #define ASSERT(assertion) ((void)0)
225 #define ASSERT_AT(assertion, file, line, function) ((void)0) 225 #define ASSERT_AT(assertion, file, line, function) ((void)0)
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } \ 417 } \
418 inline const thisType& to##thisType(const argumentType& argumentName) \ 418 inline const thisType& to##thisType(const argumentType& argumentName) \
419 { \ 419 { \
420 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ 420 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
421 return static_cast<const thisType&>(argumentName); \ 421 return static_cast<const thisType&>(argumentName); \
422 } \ 422 } \
423 void to##thisType(const thisType*); \ 423 void to##thisType(const thisType*); \
424 void to##thisType(const thisType&) 424 void to##thisType(const thisType&)
425 425
426 #endif /* WTF_Assertions_h */ 426 #endif /* WTF_Assertions_h */
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698