Index: mojo/edk/embedder/platform_channel_utils.cc |
diff --git a/mojo/edk/embedder/platform_channel_utils.cc b/mojo/edk/embedder/platform_channel_utils.cc |
index 71c115976099eb2bf7f59a458ff215e9f1dcdf8f..85af2e4b88662a809d67be512c09dd56a5c2c94e 100644 |
--- a/mojo/edk/embedder/platform_channel_utils.cc |
+++ b/mojo/edk/embedder/platform_channel_utils.cc |
@@ -139,10 +139,11 @@ bool PlatformChannelSendHandles(PlatformHandle h, |
return true; |
} |
-ssize_t PlatformChannelRecvmsg(PlatformHandle h, |
- void* buf, |
- size_t num_bytes, |
- std::deque<PlatformHandle>* platform_handles) { |
+ssize_t PlatformChannelRecvmsg( |
+ PlatformHandle h, |
+ void* buf, |
+ size_t num_bytes, |
+ std::deque<ScopedPlatformHandle>* platform_handles) { |
DCHECK(buf); |
DCHECK_GT(num_bytes, 0u); |
DCHECK(platform_handles); |
@@ -173,7 +174,8 @@ ssize_t PlatformChannelRecvmsg(PlatformHandle h, |
size_t num_fds = payload_length / sizeof(int); |
const int* fds = reinterpret_cast<int*>(CMSG_DATA(cmsg)); |
for (size_t i = 0; i < num_fds; i++) { |
- platform_handles->push_back(PlatformHandle(fds[i])); |
+ platform_handles->push_back( |
+ ScopedPlatformHandle(PlatformHandle(fds[i]))); |
DCHECK(platform_handles->back().is_valid()); |
} |
} |