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

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

Issue 1555273002: [mojo] Add CreateSharedBuffer method to Broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 11 months 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_posix.h ('k') | mojo/edk/system/broker.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_posix.cc
diff --git a/mojo/edk/embedder/platform_channel_utils_posix.cc b/mojo/edk/embedder/platform_channel_utils_posix.cc
index ef718d5bcc17627c81b7a2c08007f359a79f3442..90bfdf041673cb5e55e71c7dac569b1b697a4d03 100644
--- a/mojo/edk/embedder/platform_channel_utils_posix.cc
+++ b/mojo/edk/embedder/platform_channel_utils_posix.cc
@@ -147,7 +147,8 @@ bool PlatformChannelSendHandles(PlatformHandle h,
ssize_t PlatformChannelRecvmsg(PlatformHandle h,
void* buf,
size_t num_bytes,
- std::deque<PlatformHandle>* platform_handles) {
+ std::deque<PlatformHandle>* platform_handles,
+ bool should_block) {
DCHECK(buf);
DCHECK_GT(num_bytes, 0u);
DCHECK(platform_handles);
@@ -166,7 +167,8 @@ ssize_t PlatformChannelRecvmsg(PlatformHandle h,
int id = 0;
socklen_t peek_off_size = sizeof(id);
getsockopt(h.handle, SOL_SOCKET, SO_PEEK_OFF, &id, &peek_off_size);
- ssize_t result = HANDLE_EINTR(recvmsg(h.handle, &msg, MSG_DONTWAIT));
+ ssize_t result =
+ HANDLE_EINTR(recvmsg(h.handle, &msg, should_block ? 0 : MSG_DONTWAIT));
if (result < 0)
return result;
« no previous file with comments | « mojo/edk/embedder/platform_channel_utils_posix.h ('k') | mojo/edk/system/broker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698