diff --git a/shell/common/switches.cc b/shell/common/switches.cc index 8b831b650e672..491ca931979d8 100644 --- a/shell/common/switches.cc +++ b/shell/common/switches.cc @@ -168,7 +168,10 @@ static std::vector ParseCommaDelimited(const std::string& input) { static bool IsAllowedDartVMFlag(const std::string& flag) { for (uint32_t i = 0; i < fml::size(gAllowedDartFlags); ++i) { const std::string& allowed = gAllowedDartFlags[i]; - // Check that the prefix of the flag matches one of the allowed flags. + // Check that the prefix of the flag matches one of the allowed flags. This + // is to handle cases where flags take arguments, such as in + // "--max_profile_depth 1". + // // We don't need to worry about cases like "--safe --sneaky_dangerous" as // the VM will discard these as a single unrecognized flag. if (flag.length() >= allowed.length() &&