Chromium Code Reviews
Description[Android] Fix port leak in the forwarder.
The forwarder has been using a CommandLine object to run its
`adb -s <serial> forward --remove <port>` command since October.
CommandLine::AppendSwitchesAndArguments mangles that adb command
into `adb -s --remove <serial> forward <port>` in its attempt to
keep switches before arguments. That mangled command is not valid,
and adb never unmaps the port as a result. The host forwarder
recognized this as a failure, though not a fatal one, and removed
the port from its serial->port map regardless of whether the unmap
command succeeded.
This patch adds a variant of base::GetAppOutputAndError that takes
a vector<string> s.t. arguments are not reordered. (A similar variant
already exists for base::GetAppOutput.) It also switches all uses of
base::GetAppOutputWithExitCode to this new variant.
BUG=691654
Review-Url: https://codereview.chromium.org/2736053003
Cr-Commit-Position: refs/heads/master@{#460440}
Committed: https://chromium.googlesource.com/chromium/src/+/86c756ccdc4ea1293fe6bea1c09b5a627baa0989
Patch Set 1 #
Total comments: 2
Patch Set 2 : tedchoc comments #Patch Set 3 : tests #Patch Set 4 : gn check fixes #Patch Set 5 : use callback for exit notifier fd #
Total comments: 8
Patch Set 6 : tedchoc comments #
Messages
Total messages: 23 (10 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||