I finally got around to revising the text for this section of the coding
style doc to bring it inline with what I believe to be our prevailing usage.
Please let me know if you have any objections.
-Darin
On Wed, May 27, 2009 at 11:42 AM, Darin Fisher da...@chromium.org wrote:
Thanks for
On Thu, May 28, 2009 at 6:55 PM, Evan Stade est...@chromium.org wrote:
I was hitting a CHECK() today in x11_util::GetSecondaryXConnection()
(or w.e it's called). But that's because X somehow ran out of
available connections, or something, and I couldn't launch any other
programs either. At
I wonder if we were at fault for that? I've never seen that happen otherwise.
I only had like 15 X clients according to xlsclients (max is 255). I
saved the stack trace but it's worthless as it's just a standard
GetScreenInfo ViewHost msg that we attempt to execute with the 2ndary
x
I was hitting a CHECK() today in x11_util::GetSecondaryXConnection()
(or w.e it's called). But that's because X somehow ran out of
available connections, or something, and I couldn't launch any other
programs either. At that point there's probably nothing to do, but a
nice error message might
I attempted to add to
http://sites.google.com/a/chromium.org/dev/developers/coding-style but
!...@#@!...@#! sites in its typically infuriating way made it so I
couldn't add text after the last bit I added -- clicking the
unindent button would move my cursor a paragraph up -- so I will
leave it at
Thanks for trying
I want to amend what you wrote since it doesn't really capture the common
usage of CHECK to help track down crashers, etc.
Also, the statement that we should always recover from a failed DCHECK seems
very wrong to me. I don't think it is a good idea to try to recover from
On Wed, May 27, 2009 at 11:42 AM, Darin Fisher da...@chromium.org wrote:
Also, the statement that we should always recover from a failed DCHECK
seems very wrong to me.
I agree, we should almost never recover from a DCHECK. 90+% of the time,
DCHECK is better than if (condition) {
On Tue, May 26, 2009 at 11:31 PM, Brett Wilson bre...@chromium.org wrote:
Don't bother doing an assertion when the next line will crash anyway:
DCHECK(foo);
foo-DoSomething();
will normally crash pretty obviously dereferencing a NULL pointer
(even though it will be inside DoSomething).
On Wed, May 27, 2009 at 11:56 AM, Amanda Walker ama...@chromium.org wrote:
I'd be much happier if DCHECK exited immediately rather than relying on the
code to crash, or we insisted that code using DCHECK *always* attempt to
recover.
Yeah, it seems that relying on the code to crash by itself
It is a nice idea to try to recover from all DCHECKs, but what happens is
that you end up with excessive and redundant checking at runtime. It leads
to bloat, complexity, and degrades readability (obscuring the code). Those
are not good things for a codebase.
To be clear, I think we should
On Wed, May 27, 2009 at 11:56 AM, Amanda Walker ama...@chromium.org wrote:
On Tue, May 26, 2009 at 11:31 PM, Brett Wilson bre...@chromium.org wrote:
Don't bother doing an assertion when the next line will crash anyway:
DCHECK(foo);
foo-DoSomething();
will normally crash pretty obviously
On Wed, May 27, 2009 at 3:20 PM, Darin Fisher da...@chromium.org wrote:
I think if we require everyone to handle every failed DCHECK, then what we
will really do is compel people to write fewer DCHECKs, which means that we
will lose some of the documentation benefits. That seems undesirable
On Tue, May 26, 2009 at 8:31 PM, Brett Wilson bre...@chromium.org wrote:
Don't bother doing an assertion when the next line will crash anyway:
DCHECK(foo);
foo-DoSomething();
I mostly do what Brett does, but I do sometimes DCHECK in cases like this,
where the DCHECK is placed at the very
On Tue, May 26, 2009 at 8:31 PM, Brett Wilson bre...@chromium.org wrote:
On Tue, May 26, 2009 at 6:22 PM, Aaron Boodman a...@chromium.org wrote:
I get different stories about this all the time from different people.
It would be great to have them as part of the style guide so that I
can
On Tue, May 26, 2009 at 9:13 PM, Peter Kasting pkast...@chromium.orgwrote:
On Tue, May 26, 2009 at 8:31 PM, Brett Wilson bre...@chromium.org wrote:
Don't bother doing an assertion when the next line will crash anyway:
DCHECK(foo);
foo-DoSomething();
I mostly do what Brett does, but I do
15 matches
Mail list logo