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

Issue 12221152: Fix compile breakage when using stream operators when NOTIMPLEMENTED_POLICY=5. (Closed)

Created:
7 years, 10 months ago by miu
Modified:
7 years, 10 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Fix compile breakage when using stream operators when NOTIMPLEMENTED_POLICY=5. In logging.h, the NOTIMPLEMENTED_POLICY macro defines the behavior of the NOTIMPLEMENTED() macro. For case 5 (log only once per call-site), code that uses stream output operators would fail to compile. For example, in ui/aura/root_window_host_linux.cc:747: NOTIMPLEMENTED() << "Unsupported bits-per-pixel " << image->bits_per_pixel; The solution is to add EAT_STREAM_PARAMETERS to the end of the definition in base/logging.h. This will log call sites as "not implemented" but will not log the additional custom messages. TEST=Compiled chrome with compiler define set to NOTIMPLEMENTED_POLICY=5 and ran to confirm desired NOTIMPLEMENTED() behaviors. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=182167

Patch Set 1 #

Total comments: 1

Patch Set 2 : Use bool instead of counter to detect 'run once.' #

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

Messages

Total messages: 5 (0 generated)
miu
jar: Need you to review one-liner base/logging.h change. Thanks, Yuri
7 years, 10 months ago (2013-02-12 22:04:29 UTC) #1
jar (doing other things)
LGTM (with nit below) https://codereview.chromium.org/12221152/diff/1/base/logging.h File base/logging.h (right): https://codereview.chromium.org/12221152/diff/1/base/logging.h#newcode983 base/logging.h:983: static int count = 0;\ ...
7 years, 10 months ago (2013-02-13 01:49:40 UTC) #2
miu
On 2013/02/13 01:49:40, jar wrote: > nit: how about changing this to: > > static ...
7 years, 10 months ago (2013-02-13 03:50:23 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miu@chromium.org/12221152/5001
7 years, 10 months ago (2013-02-13 03:52:39 UTC) #4
commit-bot: I haz the power
7 years, 10 months ago (2013-02-13 08:32:15 UTC) #5
Message was sent while issue was closed.
Change committed as 182167

Powered by Google App Engine
This is Rietveld 408576698