Commit 154980e7 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

ui: compile formatted message placeholder DCHECKs into DCHECK builds

There are some extremely useful DCHECKs that placeholders are used,
but they are behind NDEBUG right now, so the normal CQ bots (which
build with release + DCHECK_ALWAYS_ON) do not run them, and instead
bugs of this type are caught on the waterfall by debug bots.

To avoid that, enable these DCHECKs on builds with DCHECK_ALWAYS_ON.

Bug: None
Change-Id: I87d2d73dda42e9ba4235bd2c80cd10bbb80e5c40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2492303Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820043}
parent 4321a006
......@@ -722,7 +722,7 @@ base::string16 GetStringFUTF16(int message_id,
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
const base::string16& format_string = rb.GetLocalizedString(message_id);
#ifndef NDEBUG
#if DCHECK_IS_ON()
// Make sure every replacement string is being used, so we don't just
// silently fail to insert one. If |offsets| is non-NULL, then don't do this
// check as the code may simply want to find the placeholders rather than
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment