diff options
author | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-26 09:23:23 +0000 |
---|---|---|
committer | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-26 09:23:23 +0000 |
commit | 9737b3637bcdcd39c3a5cdf666380113ffb3a247 (patch) | |
tree | 32a3f3271bd1f73e9e319cc355df6e88dadd89d5 | |
parent | 21bd0d086dab1cc82d2eebe3c7a2a057b0ec3b4c (diff) | |
download | chromium_src-9737b3637bcdcd39c3a5cdf666380113ffb3a247.zip chromium_src-9737b3637bcdcd39c3a5cdf666380113ffb3a247.tar.gz chromium_src-9737b3637bcdcd39c3a5cdf666380113ffb3a247.tar.bz2 |
Verify that no empty flags leak into the command line.
Also make this easier to spot in debug builds.
BUG=262975
TEST=unit_tests still pass.
Review URL: https://chromiumcodereview.appspot.com/21038005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219518 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/about_flags.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 684743d..54bacce 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -1994,6 +1994,7 @@ void FlagsState::ConvertFlagsToSwitches( const std::pair<std::string, std::string>& switch_and_value_pair = name_to_switch_it->second; + CHECK(!switch_and_value_pair.first.empty()); command_line->AppendSwitchASCII(switch_and_value_pair.first, switch_and_value_pair.second); flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; |