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

Side by Side Diff: sky/engine/wtf/Assertions.h

Issue 714393002: Remove support for MSVC (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (!(assertion)) { \ 275 if (!(assertion)) { \
276 WTFReportArgumentAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTIO N, #argName, #assertion); \ 276 WTFReportArgumentAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTIO N, #argName, #assertion); \
277 CRASH(); \ 277 CRASH(); \
278 } \ 278 } \
279 while (0) 279 while (0)
280 280
281 #endif 281 #endif
282 282
283 /* COMPILE_ASSERT */ 283 /* COMPILE_ASSERT */
284 #ifndef COMPILE_ASSERT 284 #ifndef COMPILE_ASSERT
285 #if COMPILER_SUPPORTS(C_STATIC_ASSERT)
286 /* Unlike static_assert below, this also works in plain C code. */ 285 /* Unlike static_assert below, this also works in plain C code. */
287 #define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name) 286 #define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name)
288 #elif COMPILER_SUPPORTS(CXX_STATIC_ASSERT)
eseidel 2014/11/12 00:20:34 This isn't needed because both are always supporte
289 #define COMPILE_ASSERT(exp, name) static_assert((exp), #name)
290 #else
291 #define COMPILE_ASSERT(exp, name) typedef int dummy##name [(exp) ? 1 : -1]
292 #endif
293 #endif 287 #endif
294 288
295 /* FATAL */ 289 /* FATAL */
296 290
297 #if FATAL_DISABLED 291 #if FATAL_DISABLED
298 #define FATAL(...) ((void)0) 292 #define FATAL(...) ((void)0)
299 #else 293 #else
300 #define FATAL(...) do { \ 294 #define FATAL(...) do { \
301 WTFReportFatalError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__); \ 295 WTFReportFatalError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__); \
302 CRASH(); \ 296 CRASH(); \
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } \ 388 } \
395 inline const thisType& to##thisType(const argumentType& argumentName) \ 389 inline const thisType& to##thisType(const argumentType& argumentName) \
396 { \ 390 { \
397 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ 391 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
398 return static_cast<const thisType&>(argumentName); \ 392 return static_cast<const thisType&>(argumentName); \
399 } \ 393 } \
400 void to##thisType(const thisType*); \ 394 void to##thisType(const thisType*); \
401 void to##thisType(const thisType&) 395 void to##thisType(const thisType&)
402 396
403 #endif /* WTF_Assertions_h */ 397 #endif /* WTF_Assertions_h */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698