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

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

Issue 796303006: remove COMPILE_ASSERT macro from blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 #define ASSERT_ARG(argName, assertion) do \ 285 #define ASSERT_ARG(argName, assertion) do \
286 if (!(assertion)) { \ 286 if (!(assertion)) { \
287 WTFReportArgumentAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTIO N, #argName, #assertion); \ 287 WTFReportArgumentAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTIO N, #argName, #assertion); \
288 CRASH(); \ 288 CRASH(); \
289 } \ 289 } \
290 while (0) 290 while (0)
291 291
292 #endif 292 #endif
293 293
294 /* COMPILE_ASSERT */
295 #ifndef COMPILE_ASSERT // also defined in base/macros.h
296 #define COMPILE_ASSERT(exp, msg) static_assert((exp), #msg)
297 #endif
298
299 /* FATAL */ 294 /* FATAL */
300 295
301 #if FATAL_DISABLED 296 #if FATAL_DISABLED
302 #define FATAL(...) ((void)0) 297 #define FATAL(...) ((void)0)
303 #else 298 #else
304 #define FATAL(...) do { \ 299 #define FATAL(...) do { \
305 WTFReportFatalError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__); \ 300 WTFReportFatalError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__); \
306 CRASH(); \ 301 CRASH(); \
307 } while (0) 302 } while (0)
308 #endif 303 #endif
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } \ 393 } \
399 inline const thisType& to##thisType(const argumentType& argumentName) \ 394 inline const thisType& to##thisType(const argumentType& argumentName) \
400 { \ 395 { \
401 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ 396 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
402 return static_cast<const thisType&>(argumentName); \ 397 return static_cast<const thisType&>(argumentName); \
403 } \ 398 } \
404 void to##thisType(const thisType*); \ 399 void to##thisType(const thisType*); \
405 void to##thisType(const thisType&) 400 void to##thisType(const thisType&)
406 401
407 #endif /* WTF_Assertions_h */ 402 #endif /* WTF_Assertions_h */
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698