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

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

Issue 1875443002: Revert of Patch to try dump-on-DCHECK. (patchset #13 id:240001 of https://codereview.chromium.org/1… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2702
Patch Set: 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 DCHECK_IS_ON() && !defined(DCHECK_IS_DUMP_WITHOUT_CRASH) 54 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
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
59 /* Disable ASSERT* macros in release mode by default. */ 55 /* Disable ASSERT* macros in release mode by default. */
60 #define ENABLE_ASSERT 0 56 #define ENABLE_ASSERT 0
61 #endif /* DCHECK_IS_ON() */ 57 #else
58 #define ENABLE_ASSERT 1
59 #endif /* defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) */
62 #endif 60 #endif
63 61
64 #ifndef ASSERT_MSG_DISABLED 62 #ifndef ASSERT_MSG_DISABLED
65 #define ASSERT_MSG_DISABLED !ENABLE(ASSERT) 63 #define ASSERT_MSG_DISABLED !ENABLE(ASSERT)
66 #endif 64 #endif
67 65
68 #ifndef LOG_DISABLED 66 #ifndef LOG_DISABLED
69 #define LOG_DISABLED !ENABLE(ASSERT) 67 #define LOG_DISABLED !ENABLE(ASSERT)
70 #endif 68 #endif
71 69
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } \ 320 } \
323 inline const thisType& to##thisType(const argumentType& argumentName) \ 321 inline const thisType& to##thisType(const argumentType& argumentName) \
324 { \ 322 { \
325 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ 323 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
326 return static_cast<const thisType&>(argumentName); \ 324 return static_cast<const thisType&>(argumentName); \
327 } \ 325 } \
328 void to##thisType(const thisType*); \ 326 void to##thisType(const thisType*); \
329 void to##thisType(const thisType&) 327 void to##thisType(const thisType&)
330 328
331 #endif /* WTF_Assertions_h */ 329 #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