Chromium Code Reviews| Index: base/files/file_path_watcher_linux.cc |
| diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc |
| index 87bddd3dea022181d0d4d190fd947e6f740519bf..e3153ef0d2f8d3cf26b0bc2463d77abd0cdafc7f 100644 |
| --- a/base/files/file_path_watcher_linux.cc |
| +++ b/base/files/file_path_watcher_linux.cc |
| @@ -66,7 +66,9 @@ class InotifyReader { |
| typedef std::set<FilePathWatcherImpl*> WatcherSet; |
| InotifyReader(); |
| - ~InotifyReader(); |
| + // There is no destructor because |g_inotify_reader| is a |
| + // base::LazyInstace::Leaky object. Having a destructor causes build |
| + // issues with GCC 6 (http://crbug.com/636346). |
| // We keep track of which delegates want to be notified on which watches. |
| hash_map<Watch, WatcherSet> watchers_; |
| @@ -273,23 +275,6 @@ InotifyReader::InotifyReader() |
| } |
| } |
| -InotifyReader::~InotifyReader() { |
| - if (valid_) { |
| - // Write to the self-pipe so that the select call in InotifyReaderTask |
| - // returns. |
| - ssize_t ret = HANDLE_EINTR(write(shutdown_pipe_[1], "", 1)); |
|
Mattias Nissler (ping if slow)
2016/08/10 14:59:30
Removing this means that the shutdown_pipe will no
|
| - DPCHECK(ret > 0); |
| - DCHECK_EQ(ret, 1); |
| - thread_.Stop(); |
| - } |
| - if (inotify_fd_ >= 0) |
| - close(inotify_fd_); |
| - if (shutdown_pipe_[0] >= 0) |
| - close(shutdown_pipe_[0]); |
| - if (shutdown_pipe_[1] >= 0) |
| - close(shutdown_pipe_[1]); |
| -} |
| - |
| InotifyReader::Watch InotifyReader::AddWatch( |
| const FilePath& path, FilePathWatcherImpl* watcher) { |
| if (!valid_) |