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

Side by Side Diff: base/logging.h

Issue 1885933002: Ensure that DLOG(FATAL) also asserts in release-with-asserts builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment with installer fix 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 | « no previous file | base/logging_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_LOGGING_H_ 5 #ifndef BASE_LOGGING_H_
6 #define BASE_LOGGING_H_ 6 #define BASE_LOGGING_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <cassert> 10 #include <cassert>
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 DEFINE_CHECK_OP_IMPL(GT, > ) 565 DEFINE_CHECK_OP_IMPL(GT, > )
566 #undef DEFINE_CHECK_OP_IMPL 566 #undef DEFINE_CHECK_OP_IMPL
567 567
568 #define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2) 568 #define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2)
569 #define CHECK_NE(val1, val2) CHECK_OP(NE, !=, val1, val2) 569 #define CHECK_NE(val1, val2) CHECK_OP(NE, !=, val1, val2)
570 #define CHECK_LE(val1, val2) CHECK_OP(LE, <=, val1, val2) 570 #define CHECK_LE(val1, val2) CHECK_OP(LE, <=, val1, val2)
571 #define CHECK_LT(val1, val2) CHECK_OP(LT, < , val1, val2) 571 #define CHECK_LT(val1, val2) CHECK_OP(LT, < , val1, val2)
572 #define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2) 572 #define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2)
573 #define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2) 573 #define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2)
574 574
575 #if defined(NDEBUG) 575 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
576 #define ENABLE_DLOG 0 576 #define ENABLE_DLOG 0
577 #else 577 #else
578 #define ENABLE_DLOG 1 578 #define ENABLE_DLOG 1
579 #endif 579 #endif
580 580
581 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) 581 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
582 #define DCHECK_IS_ON() 0 582 #define DCHECK_IS_ON() 0
583 #else 583 #else
584 #define DCHECK_IS_ON() 1 584 #define DCHECK_IS_ON() 1
585 #endif 585 #endif
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 #elif NOTIMPLEMENTED_POLICY == 5 956 #elif NOTIMPLEMENTED_POLICY == 5
957 #define NOTIMPLEMENTED() do {\ 957 #define NOTIMPLEMENTED() do {\
958 static bool logged_once = false;\ 958 static bool logged_once = false;\
959 LOG_IF(ERROR, !logged_once) << NOTIMPLEMENTED_MSG;\ 959 LOG_IF(ERROR, !logged_once) << NOTIMPLEMENTED_MSG;\
960 logged_once = true;\ 960 logged_once = true;\
961 } while(0);\ 961 } while(0);\
962 EAT_STREAM_PARAMETERS 962 EAT_STREAM_PARAMETERS
963 #endif 963 #endif
964 964
965 #endif // BASE_LOGGING_H_ 965 #endif // BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « no previous file | base/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698