Commit 8c0515f5 authored by Chrome Cunningham's avatar Chrome Cunningham Committed by Commit Bot

Revert "[base] Stop including check.h, notreached.h, etc. in logging.h"

This reverts commit f85481f8.

Reason for revert: Suspected as cause for these failures:
https://ci.chromium.org/p/chrome/builders/ci/win64-chrome/3687
https://ci.chromium.org/p/chrome/builders/ci/win64-chrome/3686

Original change's description:
> [base] Stop including check.h, notreached.h, etc. in logging.h
> 
> The CHECK, CHECK_EQ etc., and NOTREACHED macros have moved out
> of logging.h into separate, much cheaper to include, headers.
> 
> Now that the code has been updated to use the new headers, and
> to not rergess on that, stop including them in logging.h.
> 
> Bug: 1031540
> Change-Id: Idfa891b991cbca1dfef93630c0f37b1b022f99df
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264413
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Auto-Submit: Hans Wennborg <hans@chromium.org>
> Commit-Queue: Daniel Cheng <dcheng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#781970}

TBR=dcheng@chromium.org,thakis@chromium.org,hans@chromium.org

Change-Id: I85745947db37577b6a584ec96b00c7409a7a0d7e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1031540
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264631Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781986}
parent c789ae1a
......@@ -1616,7 +1616,7 @@ def _CheckNoDISABLETypoInTests(input_api, output_api):
def _CheckDCHECK_IS_ONHasBraces(input_api, output_api):
"""Checks to make sure DCHECK_IS_ON() does not skip the parentheses."""
errors = []
pattern = input_api.re.compile(r'DCHECK_IS_ON\b(?!\(\))',
pattern = input_api.re.compile(r'DCHECK_IS_ON(?!\(\))',
input_api.re.MULTILINE)
for f in input_api.AffectedSourceFiles(input_api.FilterSourceFile):
if (not f.LocalPath().endswith(('.cc', '.mm', '.h'))):
......
......@@ -232,7 +232,6 @@ jumbo_component("base") {
"cpu.cc",
"cpu.h",
"critical_closure.h",
"dcheck_is_on.h",
"debug/activity_analyzer.cc",
"debug/activity_analyzer.h",
"debug/activity_tracker.cc",
......
......@@ -9,7 +9,6 @@
#include "base/base_export.h"
#include "base/compiler_specific.h"
#include "base/dcheck_is_on.h"
#include "base/immediate_crash.h"
// This header defines the CHECK, DCHECK, and DPCHECK macros.
......@@ -127,6 +126,12 @@ class BASE_EXPORT CheckError {
#endif
#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
#define DCHECK_IS_ON() false
#else
#define DCHECK_IS_ON() true
#endif
#if DCHECK_IS_ON()
#define DCHECK(condition) \
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_DCHECK_IS_ON_H_
#define BASE_DCHECK_IS_ON_H_
#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
#define DCHECK_IS_ON() false
#else
#define DCHECK_IS_ON() true
#endif
#endif // BASE_DCHECK_IS_ON_H_
......@@ -8,13 +8,9 @@
// build time. Try not to raise this limit unless absolutely necessary. See
// https://chromium.googlesource.com/chromium/src/+/HEAD/docs/wmax_tokens.md
#ifndef NACL_TC_REV
#pragma clang max_tokens_here 350000
#pragma clang max_tokens_here 370000
#endif // NACL_TC_REV
#ifdef BASE_CHECK_H_
#error "logging.h should not include check.h"
#endif
#include <limits.h>
#include <stdint.h>
......
......@@ -14,9 +14,11 @@
#include "base/base_export.h"
#include "base/callback_forward.h"
#include "base/check.h"
#include "base/check_op.h"
#include "base/compiler_specific.h"
#include "base/dcheck_is_on.h"
#include "base/macros.h"
#include "base/notreached.h"
#include "base/scoped_clear_last_error.h"
#include "base/strings/string_piece_forward.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment