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

Issue 573963007: DCHECK written counts from fwrite to fix unused return result. (Closed)

Created:
6 years, 3 months ago by flackr
Modified:
6 years, 3 months ago
Reviewers:
caseq, pkotwicz, dsinclair
CC:
chromium-reviews, darin-cc_chromium.org, dsinclair+watch_chromium.org, jam, wfh+watch_chromium.org, mkwst+moarreviews-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

DCHECK written counts from fwrite to fix unused return result. These checks were lost in refs/heads/master@{#294801}: https://codereview.chromium.org/541763002. BUG=382975 TEST=Compiling does not warn about an unused result. Committed: https://crrev.com/230430abd55cab91d2d5e2c7a4b843ae0b89472b Cr-Commit-Position: refs/heads/master@{#295195}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -4 lines) Patch
M content/browser/tracing/tracing_controller_impl.cc View 3 chunks +11 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
flackr
PTAL, adds back DCHECK's that the return from fwrite is used which were lost when ...
6 years, 3 months ago (2014-09-16 21:19:56 UTC) #2
pkotwicz
LGTM. You may want to use BUG=382975
6 years, 3 months ago (2014-09-16 21:30:30 UTC) #3
flackr
+dsinclair for OWNER approval.
6 years, 3 months ago (2014-09-16 22:29:23 UTC) #5
dsinclair
lgtm
6 years, 3 months ago (2014-09-16 23:05:27 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/573963007/1
6 years, 3 months ago (2014-09-16 23:07:32 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1) as ec0df5f6c910b0946b5dd845e664d1a4440df71e
6 years, 3 months ago (2014-09-17 00:52:13 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/230430abd55cab91d2d5e2c7a4b843ae0b89472b Cr-Commit-Position: refs/heads/master@{#295195}
6 years, 3 months ago (2014-09-17 00:52:29 UTC) #10
caseq
6 years, 3 months ago (2014-09-17 07:35:21 UTC) #11
Message was sent while issue was closed.
Please note I omitted DCHECKs on purpose -- these are meant to state invariants.
The success of an I/O operation is not an invariant. The style guide is pretty
explicit on that:
http://www.chromium.org/developers/coding-style#TOC-CHECK-DCHECK-and-NOTREACHED-

Use DCHECK() or NOTREACHED() as assertions, e.g. to document pre- and
post-conditions. A DCHECK() means "this condition must always be true", not
"this condition is normally true, but perhaps not in exceptional cases." Things
like disk corruption or strange network errors are examples of exceptional
circumstances that nevertheless should NOT result in DCHECK() failure.

Powered by Google App Engine
This is Rietveld 408576698