Commit 3507c2ca authored by David Van Cleve's avatar David Van Cleve Committed by Commit Bot

Trust Tokens: LOG(ERROR), not FATAL, on bad command-line key commitments

Right now we LOG(FATAL) when a user provides bad Trust Tokens key
commitments through the command line (for local debugging). This was
intended to crash Chrome entirely when it's provided a syntactically
invalid command line flag during local testing, with the thought that
the user would want to know immediately that there was a problem with
their testing setup. Sadly, LOG(FATAL)ling from the network service
unfortunately just crashes the network service, not Chrome as a whole;
this network service crash is not directly user-visible and can lead to
confusing behavior like no pages loading.

This change alters the log line to a LOG(ERROR) so that the failure
remains consistently visible in the command line console without leading
to hard-to-diagnose behavior like pages failing to load.

Bug: None

Change-Id: I70a40b1057140f17754f4c8b479f64256d1bc54c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285466
Commit-Queue: Steven Valdez <svaldez@chromium.org>
Reviewed-by: default avatarSteven Valdez <svaldez@chromium.org>
Auto-Submit: David Van Cleve <davidvc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786280}
parent 4963f793
......@@ -36,10 +36,10 @@ ParseCommitmentsFromCommandLine() {
raw_commitments)) {
return std::move(*parsed);
} else {
// Crash loudly here because the user presumably only provides key
// Complain loudly here because the user presumably only provides key
// commitments through the command line out of a desire to _use_ the key
// commitments.
LOG(FATAL)
LOG(ERROR)
<< "Couldn't parse Trust Tokens key commitments from the command line: "
<< raw_commitments;
}
......
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