tracing: Fix browser crash on socket connection failure on CrOS
The UnixSocket listener for connecting the producer socket on behalf of child processes crashes when the OnConnect() callback is called but the connection isn't successful. Releasing the socket will cause a crash that the FD is released from file descriptor watcher twice. Check connection status before stealing the socket FD to fix the crash. Bug: 996777 Test: update services_unittests: SystemTracingService.* Change-Id: I2eab7473ce9486d20bc79b0aa925027453b4192a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3141450 Reviewed-by:Stephen Nusko <nuskos@chromium.org> Commit-Queue: Chinglin Yu <chinglinyu@chromium.org> Cr-Commit-Position: refs/heads/main@{#918763}
Loading
Please register or sign in to comment