Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: mojo/edk/embedder/platform_channel_utils.cc

Issue 1478503003: EDK: Convert most uses of PlatformHandleVector to std::vector<ScopedPlatformHandle>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/embedder/platform_channel_utils.h ('k') | mojo/edk/system/channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
}
« no previous file with comments | « mojo/edk/embedder/platform_channel_utils.h ('k') | mojo/edk/system/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698