add some MOZ_DIAGNOSTIC helpers

NEW
Unassigned

Status

()

Core
MFBT
2 years ago
a year ago

People

(Reporter: bkelly, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
So we now have MOZ_DIAGNOSTIC_ASSERT, which is great.  Its a bit difficult to use, though, if you need to conditionally run other code.  As you can see bug 1331949 its easy to break things when they merge to beta.

It would be nice to have:

#define MOZ_DIAGNOSTIC (defined(DEBUG) || !defined(BETA_OR_RELEASE))

And a DiagnosticDebugOnly<> that works like DebugOnly<>, but for the diagnostic build conditions.
(Reporter)

Updated

a year ago
See Also: → bug 1359583
https://hg.mozilla.org/integration/autoland/rev/c174e6090f9e added the first half. This leaves the DebugOnly-like template for this bug.
You need to log in before you can comment on or make changes to this bug.