Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
serial: Check that port is open before reading or writing
This change adds checks to the platform-specific implementations of Read() and Write() to make sure that the file descriptor is valid before. This makes the assumptions validated by later DCHECK correct. This cannot be done in the platform-independent layer because test code depends on being able to call some SerialIoHandler methods without an actual file descriptor. (cherry picked from commit adc731d) (cherry picked from commit e07e479) Bug: 1121836 Change-Id: If182404cf10a2f3b445b9c80b75fed5df6b5ab4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2393001 Reviewed-by: James Hollyer <jameshollyer@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Original-Original-Commit-Position: refs/heads/master@{#805016} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406664 Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Original-Commit-Position: refs/branch-heads/4240@{#632} Cr-Original-Branched-From: f297677-refs/heads/master@{#800218} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406151 Cr-Commit-Position: refs/branch-heads/4183@{#1813} Cr-Branched-From: 740e9e8-refs/heads/master@{#782793}
- Loading branch information
Showing
3 changed files
with
76 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters