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

Issue 985723003: base: Use more specific CHECK macros for comparisons. (Closed)

Created:
5 years, 9 months ago by danakj
Modified:
5 years, 9 months ago
Reviewers:
Nico
CC:
chromium-reviews, sadrul, wfh+watch_chromium.org, gavinp+memory_chromium.org, grt+watch_chromium.org, tracing+reviews_chromium.org, erikwright+watch_chromium.org, jshin+watch_chromium.org, piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base: Use more specific CHECK macros for comparisons. Prefer DCHECK_EQ(a, b) over DCHECK(a == b) when possible as this provides more data on a failure. Similar for other operators such as >=, <, !=, etc. This also applies to CHECK, EXPECT, and ASSERT macros. R=Nico BUG=464816 Committed: https://crrev.com/94219a212c616eac1914ca851c55256c4bbd9e36 Cr-Commit-Position: refs/heads/master@{#319751}

Patch Set 1 #

Patch Set 2 : basechecks: . #

Total comments: 2

Patch Set 3 : basechecks: ios #

Patch Set 4 : basechecks: . #

Patch Set 5 : basechecks: . #

Patch Set 6 : basechecks: . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -66 lines) Patch
M base/barrier_closure.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/command_line.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/mac/scoped_mach_vm.h View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M base/mac/scoped_mach_vm.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M base/memory/discardable_memory_ashmem_allocator_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M base/memory/shared_memory_posix.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/message_loop/message_pump_win.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M base/posix/unix_domain_socket_linux.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M base/process/kill_mac.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/process/process_linux.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M base/process/process_metrics_unittest.cc View 2 chunks +26 lines, -26 lines 0 comments Download
M base/strings/string_piece_unittest.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M base/strings/string_split.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M base/sys_info_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/test/test_file_util_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/threading/sequenced_worker_pool_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M base/time/time_win.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M base/trace_event/process_memory_maps_dump_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/trace_event/trace_event_impl.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M base/win/registry.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M base/win/scoped_comptr_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/win/win_util_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
danakj
5 years, 9 months ago (2015-03-06 23:02:44 UTC) #1
Nico
lgtm https://codereview.chromium.org/985723003/diff/20001/base/posix/unix_domain_socket_linux.cc File base/posix/unix_domain_socket_linux.cc (right): https://codereview.chromium.org/985723003/diff/20001/base/posix/unix_domain_socket_linux.cc#newcode140 base/posix/unix_domain_socket_linux.cc:140: DCHECK_EQ(wire_fds, static_cast<void*>(nullptr)); wot? isn't nullptr supposed to work ...
5 years, 9 months ago (2015-03-06 23:08:47 UTC) #2
danakj
https://codereview.chromium.org/985723003/diff/20001/base/posix/unix_domain_socket_linux.cc File base/posix/unix_domain_socket_linux.cc (right): https://codereview.chromium.org/985723003/diff/20001/base/posix/unix_domain_socket_linux.cc#newcode140 base/posix/unix_domain_socket_linux.cc:140: DCHECK_EQ(wire_fds, static_cast<void*>(nullptr)); On 2015/03/06 23:08:47, Nico wrote: > wot? ...
5 years, 9 months ago (2015-03-06 23:10:14 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985723003/100001
5 years, 9 months ago (2015-03-07 00:59:52 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/3175) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 9 months ago (2015-03-07 01:05:39 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985723003/150001
5 years, 9 months ago (2015-03-09 22:23:22 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:150001)
5 years, 9 months ago (2015-03-09 22:27:49 UTC) #16
commit-bot: I haz the power
5 years, 9 months ago (2015-03-09 22:29:44 UTC) #17
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/94219a212c616eac1914ca851c55256c4bbd9e36
Cr-Commit-Position: refs/heads/master@{#319751}

Powered by Google App Engine
This is Rietveld 408576698