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

Issue 7834021: Fix build error in release mode. (Closed)

Created:
9 years, 3 months ago by lain Merrick
Modified:
9 years, 3 months ago
Reviewers:
greggman
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Visibility:
Public.

Description

Fix build error in release mode. I used a mix of NDEBUG and DHECK, but I didn't realise that DCHECKs are still compiled in release builds, and that the try bots don't catch this. Updated to use base::NonThreadSafe, which is both simpler and safer. TBR=kbr@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=99650

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -15 lines) Patch
M content/renderer/gpu/renderer_gl_context.h View 3 chunks +3 lines, -6 lines 0 comments Download
M content/renderer/gpu/renderer_gl_context.cc View 5 chunks +4 lines, -9 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
lain Merrick
I couldn't get hold of a sheriff, so I opened the tree myself and submitted ...
9 years, 3 months ago (2011-09-05 13:35:06 UTC) #1
greggman
On 2011/09/05 13:35:06, Iain Merrick wrote: > I couldn't get hold of a sheriff, so ...
9 years, 3 months ago (2011-09-06 16:43:25 UTC) #2
lain Merrick
9 years, 3 months ago (2011-09-06 16:49:37 UTC) #3
On 2011/09/06 16:43:25, greggman wrote:
> On 2011/09/05 13:35:06, Iain Merrick wrote:
> > I couldn't get hold of a sheriff, so I opened the tree myself and submitted
> this
> > TBR on kbr (who is in content/renderer/gpu/OWNER). Hope that's okay.
> 
> Wait, seriously? DCHECK is compiled into release? I have some seriously heavy
> DCHECKS here and there. Like DCHECK(somemap.find(thing) != somemap.end());
> 
> D = DEBUG. Shouldn't that be debug only?

I'm looking at base/logging.h, lines 536-551:

// In order to have optimized code for official builds, remove DLOGs and
// DCHECKs.
#define ENABLE_DLOG 0
#define ENABLE_DCHECK 0

#elif defined(NDEBUG)
// Otherwise, if we're a release build, remove DLOGs but not DCHECKs
// (since those can still be turned on via a command-line flag).
#define ENABLE_DLOG 0
#define ENABLE_DCHECK 1

#else
// Otherwise, we're a debug build so enable DLOGs and DCHECKs.
#define ENABLE_DLOG 1
#define ENABLE_DCHECK 1
#endif

It's even trickier than I thought. DCHECKs are included in normal release
builds, but not official builds.

Powered by Google App Engine
This is Rietveld 408576698