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

Issue 576073007: base: Add CHECK_IMPLIES and DCHECK_IMPLIES. (Closed)

Created:
6 years, 3 months ago by vmpstr
Modified:
5 years, 2 months ago
Reviewers:
danakj, Nico
CC:
chromium-reviews, erikwright+watch_chromium.org, sky
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

base: Add CHECK_IMPLIES and DCHECK_IMPLIES. This patch adds convenience defines for implies relationship. a implies b is equivalent to !a || b. This allows things like the following: CHECK_IMPLIES(ptr, ptr->is_good); instead of the more cumbersome: CHECK(!ptr || ptr->is_good). Committed: https://crrev.com/0456d13053908dc3929035e4abf8799c6e9627a5 Cr-Commit-Position: refs/heads/master@{#297941}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -0 lines) Patch
M base/logging.h View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (5 generated)
danakj
LGTM +willchan/ajwong for OWNERS
6 years, 3 months ago (2014-09-17 18:13:28 UTC) #2
vmpstr
On 2014/09/17 18:13:28, danakj wrote: > LGTM > > +willchan/ajwong for OWNERS friendly ping for ...
6 years, 3 months ago (2014-09-18 23:30:34 UTC) #3
willchan no longer on Chromium
Haha, bad luck with reviewer choices. Albert just went on leave and I'm going on ...
6 years, 3 months ago (2014-09-18 23:35:40 UTC) #4
danakj
thakis: can you OWNERS review please?
6 years, 3 months ago (2014-09-18 23:40:16 UTC) #6
vmpstr
On 2014/09/18 23:40:16, danakj wrote: > thakis: can you OWNERS review please? ping (although Nico ...
6 years, 3 months ago (2014-09-24 20:53:03 UTC) #8
Nico
Sorry about the delay; this is the first time I see this in my inbox. ...
6 years, 3 months ago (2014-09-24 20:55:59 UTC) #9
danakj
On Wed, Sep 24, 2014 at 4:55 PM, <thakis@chromium.org> wrote: > Sorry about the delay; ...
6 years, 3 months ago (2014-09-24 20:59:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/576073007/1
6 years, 2 months ago (2014-10-02 21:55:25 UTC) #12
danakj
My first official base owner LGTM. I think this is super great and don't want ...
6 years, 2 months ago (2014-10-02 21:56:48 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1) as e980739d7a85e9684736b380748fd39238c2965f
6 years, 2 months ago (2014-10-02 23:09:25 UTC) #14
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/0456d13053908dc3929035e4abf8799c6e9627a5 Cr-Commit-Position: refs/heads/master@{#297941}
6 years, 2 months ago (2014-10-02 23:13:02 UTC) #15
Nico
About a month later, this is still used in only 2 places: https://code.google.com/p/chromium/codesearch#search/&q=dcheck_implies&sq=package:chromium&type=cs Is it ...
6 years, 1 month ago (2014-10-27 21:30:39 UTC) #16
danakj
On Mon, Oct 27, 2014 at 5:30 PM, <thakis@chromium.org> wrote: > About a month later, ...
6 years, 1 month ago (2014-10-27 22:13:23 UTC) #17
Nico
On Mon, Oct 27, 2014 at 3:13 PM, Dana Jansens <danakj@chromium.org> wrote: > On Mon, ...
6 years, 1 month ago (2014-10-27 22:35:08 UTC) #18
Nico
(But I'm happy to wait another N months and see if more than 5 people ...
6 years, 1 month ago (2014-10-27 22:35:43 UTC) #19
danakj
On Mon, Oct 27, 2014 at 6:35 PM, Nico Weber <thakis@chromium.org> wrote: > (But I'm ...
6 years, 1 month ago (2014-10-30 18:11:45 UTC) #20
jam
ping? i just saw this change when Dana asked me to use it. I have ...
5 years, 6 months ago (2015-06-15 20:27:56 UTC) #21
danakj
On 2015/06/15 20:27:56, jam wrote: > ping? i just saw this change when Dana asked ...
5 years, 6 months ago (2015-06-15 20:32:30 UTC) #22
jam
On 2015/06/15 20:32:30, danakj wrote: > On 2015/06/15 20:27:56, jam wrote: > > ping? i ...
5 years, 6 months ago (2015-06-16 03:06:48 UTC) #23
Nico
On 2015/06/16 03:06:48, jam wrote: > On 2015/06/15 20:32:30, danakj wrote: > > On 2015/06/15 ...
5 years, 6 months ago (2015-06-16 03:47:22 UTC) #24
Nico
Another point: When a DCHECK_IMPLIES fails, it prints [8196:7024:0626/170546:826622325:FATAL:data_pack.cc(245)] Check failed: !(GetScaleForScaleFactor(handle->GetScaleFactor()) == resource_scale ) ...
5 years, 6 months ago (2015-06-27 00:09:31 UTC) #25
vmpstr
On 2015/06/27 00:09:31, Nico wrote: > Another point: When a DCHECK_IMPLIES fails, it prints > ...
5 years, 5 months ago (2015-06-29 18:56:38 UTC) #26
ncarter (slow)
On 2015/06/29 18:56:38, vmpstr wrote: > On 2015/06/27 00:09:31, Nico wrote: > > Another point: ...
5 years, 5 months ago (2015-06-29 21:21:58 UTC) #27
danakj
On 2015/06/29 21:21:58, ncarter (gone til aug 24) wrote: > On 2015/06/29 18:56:38, vmpstr wrote: ...
5 years, 4 months ago (2015-08-18 20:44:07 UTC) #28
sky
On 2015/08/18 20:44:07, danakj wrote: > On 2015/06/29 21:21:58, ncarter (gone til aug 24) wrote: ...
5 years, 2 months ago (2015-10-21 22:40:04 UTC) #29
danakj
On 2015/10/21 22:40:04, sky wrote: > On 2015/08/18 20:44:07, danakj wrote: > > On 2015/06/29 ...
5 years, 2 months ago (2015-10-21 22:50:10 UTC) #30
sky
On 2015/10/21 22:50:10, danakj wrote: > On 2015/10/21 22:40:04, sky wrote: > > On 2015/08/18 ...
5 years, 2 months ago (2015-10-21 23:01:57 UTC) #31
danakj
On Wed, Oct 21, 2015 at 4:01 PM, <sky@chromium.org> wrote: > On 2015/10/21 22:50:10, danakj ...
5 years, 2 months ago (2015-10-21 23:07:12 UTC) #32
danakj
On Wed, Oct 21, 2015 at 4:06 PM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
5 years, 2 months ago (2015-10-21 23:18:03 UTC) #33
sky
On 2015/10/21 23:07:12, danakj wrote: > On Wed, Oct 21, 2015 at 4:01 PM, <mailto:sky@chromium.org> ...
5 years, 2 months ago (2015-10-21 23:24:28 UTC) #34
danakj
On 2015/10/21 23:24:28, sky wrote: > > > DCHECK_IMPLIES(a, b) says that a implies b. ...
5 years, 2 months ago (2015-10-21 23:56:22 UTC) #36
Nico
By now, three people (sky, jam, I) have independently and pretty consistently said that they ...
5 years, 2 months ago (2015-10-22 02:01:16 UTC) #37
danakj
5 years, 2 months ago (2015-10-22 18:17:55 UTC) #38
Message was sent while issue was closed.
On 2015/10/22 02:01:16, Nico wrote:
> By now, three people (sky, jam, I) have independently and pretty consistently
> said that they thought this was confusing and not base-worthy.

Though a greater number of people have found it useful and used it and/or
complained when we talked of removing it?

But can you review the CL to remove it then and take a look at the callsites
there?

> (See also https://codereview.chromium.org/1213193003/ for some more comments
in
> that vein.)
> 
> I wasn't really sure if I was correct, but I think the consistent feedback
> paints a fairly clear picture by now. Let's rip this out.
> 
> (Since several folks think it's confusing, the macro being kind of widely used
> isn't necessarily a good thing imho.)

Powered by Google App Engine
This is Rietveld 408576698