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

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

Issue 1814423002: Patch to try dump-on-DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comment 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
« no previous file with comments | « build/config/BUILD.gn ('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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "base/logging.h" 44 #include "base/logging.h"
45 #include "wtf/Compiler.h" 45 #include "wtf/Compiler.h"
46 #include "wtf/Noncopyable.h" 46 #include "wtf/Noncopyable.h"
47 #include "wtf/WTFExport.h" 47 #include "wtf/WTFExport.h"
48 #include "wtf/build_config.h" 48 #include "wtf/build_config.h"
49 #include <stdarg.h> 49 #include <stdarg.h>
50 50
51 // Users must test "#if ENABLE(ASSERT)", which helps ensure that code 51 // Users must test "#if ENABLE(ASSERT)", which helps ensure that code
52 // testing this macro has included this header. 52 // testing this macro has included this header.
53 #ifndef ENABLE_ASSERT 53 #ifndef ENABLE_ASSERT
54 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) 54 #if DCHECK_IS_ON() && !defined(DCHECK_IS_DUMP_WITHOUT_CRASH)
55 /* ASSERT* will currently crash the process if enabled, so which is not
56 the desired behaviour if DCHECK_IS_DUMP_WITHOUT_CRASH. */
57 #define ENABLE_ASSERT 1
58 #else
55 /* Disable ASSERT* macros in release mode by default. */ 59 /* Disable ASSERT* macros in release mode by default. */
56 #define ENABLE_ASSERT 0 60 #define ENABLE_ASSERT 0
57 #else 61 #endif /* DCHECK_IS_ON() */
58 #define ENABLE_ASSERT 1
59 #endif /* defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) */
60 #endif 62 #endif
61 63
62 #ifndef ASSERT_MSG_DISABLED 64 #ifndef ASSERT_MSG_DISABLED
63 #define ASSERT_MSG_DISABLED !ENABLE(ASSERT) 65 #define ASSERT_MSG_DISABLED !ENABLE(ASSERT)
64 #endif 66 #endif
65 67
66 #ifndef LOG_DISABLED 68 #ifndef LOG_DISABLED
67 #define LOG_DISABLED !ENABLE(ASSERT) 69 #define LOG_DISABLED !ENABLE(ASSERT)
68 #endif 70 #endif
69 71
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } \ 324 } \
323 inline const thisType& to##thisType(const argumentType& argumentName) \ 325 inline const thisType& to##thisType(const argumentType& argumentName) \
324 { \ 326 { \
325 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ 327 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
326 return static_cast<const thisType&>(argumentName); \ 328 return static_cast<const thisType&>(argumentName); \
327 } \ 329 } \
328 void to##thisType(const thisType*); \ 330 void to##thisType(const thisType*); \
329 void to##thisType(const thisType&) 331 void to##thisType(const thisType&)
330 332
331 #endif /* WTF_Assertions_h */ 333 #endif /* WTF_Assertions_h */
OLDNEW
« no previous file with comments | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698