In bug 1931877, I added MOZ_DIAGNOSTIC_CRASH(), which takes a string
argument. This acts like MOZ_CRASH() in debug and early beta or earlier
builds and does nothing otherwise. This means that you no longer need to
use MOZ_DIAGNOSTIC_ASSERTION(false) to achieve this effect.

Besides being more convenient, my motivation was to discourage people from
using MOZ_ASSERTION(false) without a message, because then we end up with
crash reports where the crash message is just "false", which makes it
difficult to distinguish different instances if you are searching using the
crash reason field. I haven't seen this be a problem yet, but better to fix
it before it is.

I also converted over the 60 or so places that were doing
MOZ_DIAGNOSTIC_ASSERTION(false) with a message to use
MOZ_DIAGNOSTIC_CRASH(), and I'll shortly be putting a patch up in bug
1931874 to convert the dozen or so places that were using
MOZ_DIAGNOSTIC_ASSERTION(false) without a message.

Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAG3OmdNmx4ubUGc3MoLma7G4zLb_GqLpmd-EgiQd_8jM5xsA-g%40mail.gmail.com.

Reply via email to