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

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: Disable Blink ASSERT in dump-without-DCHECK builds 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 /* Enable ASSERT* macros if DCHECK is on, unless it dumps-without-crashing. */
Nico 2016/03/31 22:11:17 nit: use // comments also, don't repeat the line a
56 #define ENABLE_ASSERT 1
57 #else
55 /* Disable ASSERT* macros in release mode by default. */ 58 /* Disable ASSERT* macros in release mode by default. */
56 #define ENABLE_ASSERT 0 59 #define ENABLE_ASSERT 0
57 #else 60 #endif /* DCHECK_IS_ON() */
58 #define ENABLE_ASSERT 1
59 #endif /* defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) */
60 #endif 61 #endif
61 62
62 #ifndef ASSERT_MSG_DISABLED 63 #ifndef ASSERT_MSG_DISABLED
63 #define ASSERT_MSG_DISABLED !ENABLE(ASSERT) 64 #define ASSERT_MSG_DISABLED !ENABLE(ASSERT)
64 #endif 65 #endif
65 66
66 #ifndef LOG_DISABLED 67 #ifndef LOG_DISABLED
67 #define LOG_DISABLED !ENABLE(ASSERT) 68 #define LOG_DISABLED !ENABLE(ASSERT)
68 #endif 69 #endif
69 70
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } \ 323 } \
323 inline const thisType& to##thisType(const argumentType& argumentName) \ 324 inline const thisType& to##thisType(const argumentType& argumentName) \
324 { \ 325 { \
325 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ 326 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
326 return static_cast<const thisType&>(argumentName); \ 327 return static_cast<const thisType&>(argumentName); \
327 } \ 328 } \
328 void to##thisType(const thisType*); \ 329 void to##thisType(const thisType*); \
329 void to##thisType(const thisType&) 330 void to##thisType(const thisType&)
330 331
331 #endif /* WTF_Assertions_h */ 332 #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