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

Issue 2163023002: Unify usage of logging/assert macros in base/ (Closed)

Created:
4 years, 5 months ago by gab
Modified:
4 years, 4 months ago
Reviewers:
danakj, rkaplow, boliu, alokp
CC:
chromium-reviews, asvitkine+watch_chromium.org, sadrul, gavinp+memory_chromium.org, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Unify usage of logging/assert macros in base/ * Enables following checks in Release+DCHECK_ALWAYS_ON build (previous DCHECKs behind !NDEBUG): - icu_util - LazyInstance - CancellationFlag * Unifies ENABLE_DLOG into DCHECK_IS_ON() * Mass replaces (!NDEBUG || DCHECK_ALWAYS_ON) with DCHECK_IS_ON() TBR=rkaplow, alokp, boliu - rkaplow for chrome/browser/metrics/ side-effects - alokp for chromecast/ side-effects - boliu for device/power_save_blocker/ side-effects BUG=622400 (grew tired of DCHECKs behind NDEBUG when writing https://codereview.chromium.org/2135413003/ for https://codereview.chromium.org/2103883004/#msg14) Committed: https://crrev.com/190f7546ebe213c61874ec8885be95c0f98a84d1 Cr-Commit-Position: refs/heads/master@{#409036}

Patch Set 1 #

Total comments: 14

Patch Set 2 : review:danakj #

Patch Set 3 : rebase on r406471 #

Patch Set 4 : fix compile and +singleton.h #

Patch Set 5 : rebase on https://codereview.chromium.org/2162053006/ #

Patch Set 6 : oops commit on wrong branch #

Total comments: 2

Patch Set 7 : undo bad rebase #

Patch Set 8 : comment tweak #

Patch Set 9 : rebase #

Patch Set 10 : merge up to r408965 #

Patch Set 11 : fix base/android/build_info.cc compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -140 lines) Patch
M base/android/build_info.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M base/i18n/icu_util.cc View 1 5 chunks +6 lines, -6 lines 0 comments Download
M base/lazy_instance.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M base/logging.h View 1 2 3 4 5 6 7 8 4 chunks +10 lines, -22 lines 0 comments Download
M base/memory/singleton.h View 1 2 3 4 chunks +4 lines, -3 lines 0 comments Download
M base/message_loop/incoming_task_queue.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M base/numerics/safe_numerics_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -6 lines 0 comments Download
M base/sequence_checker.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -11 lines 0 comments Download
M base/task/cancelable_task_tracker_unittest.cc View 1 1 chunk +1 line, -9 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -3 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M base/threading/non_thread_safe.h View 1 2 chunks +3 lines, -12 lines 0 comments Download
M base/threading/non_thread_safe_unittest.cc View 1 2 3 4 5 chunks +4 lines, -15 lines 0 comments Download
M base/threading/platform_thread_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M base/threading/thread_checker.h View 1 2 chunks +2 lines, -14 lines 0 comments Download
M base/threading/thread_checker_unittest.cc View 1 2 3 4 5 chunks +4 lines, -15 lines 0 comments Download
M base/threading/thread_restrictions.h View 1 3 chunks +3 lines, -9 lines 0 comments Download
M base/threading/thread_restrictions.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/metrics/thread_watcher_android.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chromecast/app/linux/cast_crash_reporter_client_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M device/power_save_blocker/power_save_blocker_mac.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 51 (34 generated)
gab
Dana, PTAL. Grew tired of this pattern all over Chrome (especially DCHECKs hidden behind NDEBUG ...
4 years, 5 months ago (2016-07-19 19:41:37 UTC) #3
danakj
The fact that DLOG doesn't use variables when !DCHECK_IS_ON() but DCHECK does... :| https://codereview.chromium.org/2163023002/diff/1/base/i18n/icu_util.cc File ...
4 years, 5 months ago (2016-07-19 20:17:02 UTC) #4
gab
Thanks, done, PTAL https://codereview.chromium.org/2163023002/diff/1/base/i18n/icu_util.cc File base/i18n/icu_util.cc (right): https://codereview.chromium.org/2163023002/diff/1/base/i18n/icu_util.cc#newcode57 base/i18n/icu_util.cc:57: #endif // !defined(NDEBUG) On 2016/07/19 20:17:01, ...
4 years, 5 months ago (2016-07-20 02:43:58 UTC) #5
gab
Decided to go a notch further cleaning up death tests, extracted to a precursor CL ...
4 years, 5 months ago (2016-07-20 16:15:54 UTC) #20
danakj
I think it'd be nicer if DLOG_IF worked like DCHECK and always referenced the condition ...
4 years, 5 months ago (2016-07-20 20:03:03 UTC) #27
danakj
We should note that this will enable some dchecks on the waterfall that didn't run ...
4 years, 5 months ago (2016-07-20 20:03:30 UTC) #28
gab
On 2016/07/20 20:03:03, danakj wrote: > I think it'd be nicer if DLOG_IF worked like ...
4 years, 5 months ago (2016-07-20 21:01:29 UTC) #29
danakj
On Wed, Jul 20, 2016 at 2:01 PM, <gab@chromium.org> wrote: > On 2016/07/20 20:03:03, danakj ...
4 years, 5 months ago (2016-07-20 21:38:17 UTC) #31
gab
TBRs for side-effects (though this CL is still blocked on pending precursor CL so you ...
4 years, 5 months ago (2016-07-25 15:07:53 UTC) #34
boliu
lgtm
4 years, 5 months ago (2016-07-25 15:35:11 UTC) #35
rkaplow
lgtm
4 years, 5 months ago (2016-07-25 18:38:29 UTC) #37
alokp
chromecast/ lgtm
4 years, 4 months ago (2016-07-28 17:30:28 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2163023002/210001
4 years, 4 months ago (2016-08-01 16:41:37 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/113790)
4 years, 4 months ago (2016-08-01 17:19:27 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2163023002/230001
4 years, 4 months ago (2016-08-01 17:52:40 UTC) #47
commit-bot: I haz the power
Committed patchset #11 (id:230001)
4 years, 4 months ago (2016-08-01 20:04:26 UTC) #49
commit-bot: I haz the power
4 years, 4 months ago (2016-08-01 20:06:58 UTC) #51
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/190f7546ebe213c61874ec8885be95c0f98a84d1
Cr-Commit-Position: refs/heads/master@{#409036}

Powered by Google App Engine
This is Rietveld 408576698