Skip to content

Commit

Permalink
[url] Highlight common error case in DCHECK message
Browse files Browse the repository at this point in the history
This can be a confusing error message on its own, and requires some
code spelunking to read the comment that really highlights the likely
issue.

Change-Id: I3b4dd2dafdf5b52e8ec6df9252d80ce446e6b088
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2750484
Auto-Submit: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#861856}
  • Loading branch information
csharrison authored and Chromium LUCI CQ committed Mar 11, 2021
1 parent a4c9ab6 commit eaad276
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions url/url_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,10 @@ void DoSchemeModificationPreamble() {
// the SchemeRegistry has been used.
//
// This normally means you're trying to set up a new scheme too late or using
// the SchemeRegistry too early in your application's init process. Make sure
// that you haven't added any static GURL initializers in tests.
// the SchemeRegistry too early in your application's init process.
DCHECK(!g_scheme_registries_used.load())
<< "Trying to add a scheme after the lists have been used.";
<< "Trying to add a scheme after the lists have been used. "
"Make sure that you haven't added any static GURL initializers in tests.";

// If this assert triggers, it means you've called Add*Scheme after
// LockSchemeRegistries has been called (see the header file for
Expand Down

0 comments on commit eaad276

Please sign in to comment.