| Index: base/debug/proc_maps_linux.cc
|
| diff --git a/base/debug/proc_maps_linux.cc b/base/debug/proc_maps_linux.cc
|
| index a956961b7a5a147f4757b09eb898edb260888edd..b7a5862f7472aceb3c8cece84b4e9578641fe19a 100644
|
| --- a/base/debug/proc_maps_linux.cc
|
| +++ b/base/debug/proc_maps_linux.cc
|
| @@ -11,7 +11,6 @@
|
| #endif
|
|
|
| #include "base/file_util.h"
|
| -#include "base/files/scoped_file.h"
|
| #include "base/strings/string_split.h"
|
|
|
| #if defined(OS_ANDROID)
|
| @@ -46,11 +45,12 @@
|
| // file for details.
|
| const long kReadSize = sysconf(_SC_PAGESIZE);
|
|
|
| - base::ScopedFD fd(HANDLE_EINTR(open("/proc/self/maps", O_RDONLY)));
|
| - if (!fd.is_valid()) {
|
| + int fd = HANDLE_EINTR(open("/proc/self/maps", O_RDONLY));
|
| + if (fd == -1) {
|
| DPLOG(ERROR) << "Couldn't open /proc/self/maps";
|
| return false;
|
| }
|
| + file_util::ScopedFD fd_closer(&fd);
|
| proc_maps->clear();
|
|
|
| while (true) {
|
| @@ -60,7 +60,7 @@
|
| proc_maps->resize(pos + kReadSize);
|
| void* buffer = &(*proc_maps)[pos];
|
|
|
| - ssize_t bytes_read = HANDLE_EINTR(read(fd.get(), buffer, kReadSize));
|
| + ssize_t bytes_read = HANDLE_EINTR(read(fd, buffer, kReadSize));
|
| if (bytes_read < 0) {
|
| DPLOG(ERROR) << "Couldn't read /proc/self/maps";
|
| proc_maps->clear();
|
|
|