Commit 446a8163 authored by Yury Semikhatsky's avatar Yury Semikhatsky Committed by Commit Bot

[DevTools] Do not print pipe I/O errors when shutting down

When browser shutdown started pipe file descriptors are closed
on the UI thread while there may be outstanding reads and writes
on parallel threads. If such read/write operations fail error
messages will only be written to the console if pipe shutdown
has not begun yet.

Bug: none
Change-Id: I57e9b6c7f2921335cc2bb1f5289bd9347bba1f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108825Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Yury Semikhatsky <yurys@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751605}
parent 9dbabf15
...@@ -10,13 +10,10 @@ ...@@ -10,13 +10,10 @@
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "content/public/browser/devtools_agent_host_client.h" #include "content/public/browser/devtools_agent_host_client.h"
namespace base {
class Thread;
}
namespace content { namespace content {
class PipeReaderBase; class PipeReaderBase;
class PipeWriterBase;
class DevToolsPipeHandler : public DevToolsAgentHostClient { class DevToolsPipeHandler : public DevToolsAgentHostClient {
public: public:
...@@ -45,8 +42,7 @@ class DevToolsPipeHandler : public DevToolsAgentHostClient { ...@@ -45,8 +42,7 @@ class DevToolsPipeHandler : public DevToolsAgentHostClient {
ProtocolMode mode_; ProtocolMode mode_;
std::unique_ptr<PipeReaderBase> pipe_reader_; std::unique_ptr<PipeReaderBase> pipe_reader_;
std::unique_ptr<base::Thread> read_thread_; std::unique_ptr<PipeWriterBase> pipe_writer_;
std::unique_ptr<base::Thread> write_thread_;
scoped_refptr<DevToolsAgentHost> browser_target_; scoped_refptr<DevToolsAgentHost> browser_target_;
int read_fd_; int read_fd_;
int write_fd_; int write_fd_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment