Repository navigation
fix: hard crash on invalid command line switches - #46004
Conversation
76b54c1 to
47504b6
Compare
nikwen
left a comment
There was a problem hiding this comment.
Only had a look at the docs changes. I like them. Thanks for including them in the PR!
|
Curious, what is the decision behind not having to auto convert the switch names to lowercase instead of throwing an error given that is what the runtime accepts ? |
|
@deepak1556 i think changing it out from under the user is pretty unintuitive behavior, especially since later when/if they go to fetch it it'll be different than what they passed |
|
Not sure I follow, the flags accepted by these apis are chromium specific and they should be in the format chromium expects. Why would the return value format matter in this case ? If the api accepts custom flags then this fix makes sense. |
|
@deepak1556 fair enough - i can make that change :) |
1fbe37a to
52a3462
Compare
52a3462 to
8a1b6aa
Compare
|
@deepak1556 yep, fixed! |
ckerr
left a comment
There was a problem hiding this comment.
I like this change. It's simpler than the previous iteration and should work fine for most cases.
But if we're just going to silently convert the switches passed in by users, this would break any tool that has case-specific commmand-line arguments like grep's -l and -L arguments.
Even though there's no way to support case-sensitive switches anymore, silently converting them is still a potentially-breaking change. This needs to be documented in breaking-changes.md
|
👍 for documenting as breaking change To clarify,
|
|
LGTM other than updating the breaking changes doc 👍 |
Co-authored-by: Niklas Wenzel <[email protected]>
aeee134 to
4d1e23c
Compare
|
Release Notes Persisted
|
|
I was unable to backport this PR to "36-x-y" cleanly; |
|
I was unable to backport this PR to "35-x-y" cleanly; |
* fix: hard crash on invalid command line switch * Update docs/api/command-line.md Co-authored-by: Niklas Wenzel <[email protected]> * chore: feedback from review * docs: Add breaking change note --------- Co-authored-by: Niklas Wenzel <[email protected]>
* fix: hard crash on invalid command line switch * Update docs/api/command-line.md Co-authored-by: Niklas Wenzel <[email protected]> * chore: feedback from review * docs: Add breaking change note --------- Co-authored-by: Niklas Wenzel <[email protected]>
fix: hard crash on invalid command line switches (#46004) * fix: hard crash on invalid command line switch * Update docs/api/command-line.md * chore: feedback from review * docs: Add breaking change note --------- Co-authored-by: Shelley Vohr <[email protected]> Co-authored-by: Niklas Wenzel <[email protected]>
|
@codebytere has manually backported this PR to "35-x-y", please check out #46631 |
* fix: hard crash on invalid command line switch * Update docs/api/command-line.md Co-authored-by: Niklas Wenzel <[email protected]> * chore: feedback from review * docs: Add breaking change note --------- Co-authored-by: Niklas Wenzel <[email protected]>
Description of Change
Closes #45991.
Addresses an issue where poorly formed switched could cause a hard crash in Chromium since M134 by ensuring the switches are lowercased. Also improve the docs a little.
Checklist
npm testpassesRelease Notes
Notes: Fixed an issue where badly formatted switches could cause crashes in
app.commandLinefunctions.