Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion shell/common/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ static std::vector<std::string> 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() &&
Expand Down