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

Unified Diff: mojo/edk/system/raw_channel_posix.cc

Issue 728043002: Revert of Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/system/raw_channel.cc ('k') | mojo/edk/system/raw_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/raw_channel_posix.cc
diff --git a/mojo/edk/system/raw_channel_posix.cc b/mojo/edk/system/raw_channel_posix.cc
index 71ec02f7489b42a474835ee8b21174262860e389..45d93e86867985e2f46e910a1c18a63d4fb9ac10 100644
--- a/mojo/edk/system/raw_channel_posix.cc
+++ b/mojo/edk/system/raw_channel_posix.cc
@@ -135,7 +135,8 @@
i += embedder::kPlatformChannelMaxNumHandles) {
scoped_ptr<MessageInTransit> fd_message(new MessageInTransit(
MessageInTransit::kTypeRawChannel,
- MessageInTransit::kSubtypeRawChannelPosixExtraPlatformHandles, 0,
+ MessageInTransit::kSubtypeRawChannelPosixExtraPlatformHandles,
+ 0,
nullptr));
embedder::ScopedPlatformHandleVectorPtr fds(
new embedder::PlatformHandleVector(
@@ -252,8 +253,8 @@
DCHECK(!buffers.empty());
if (buffers.size() == 1) {
- write_result = embedder::PlatformChannelWrite(fd_.get(), buffers[0].addr,
- buffers[0].size);
+ write_result = embedder::PlatformChannelWrite(
+ fd_.get(), buffers[0].addr, buffers[0].size);
} else {
const size_t kMaxBufferCount = 10;
iovec iov[kMaxBufferCount];
@@ -301,8 +302,11 @@
}
if (message_loop_for_io()->WatchFileDescriptor(
- fd_.get().fd, false, base::MessageLoopForIO::WATCH_WRITE,
- write_watcher_.get(), this)) {
+ fd_.get().fd,
+ false,
+ base::MessageLoopForIO::WATCH_WRITE,
+ write_watcher_.get(),
+ this)) {
pending_write_ = true;
return IO_PENDING;
}
@@ -319,8 +323,11 @@
write_watcher_.reset(new base::MessageLoopForIO::FileDescriptorWatcher());
if (!message_loop_for_io()->WatchFileDescriptor(
- fd_.get().fd, true, base::MessageLoopForIO::WATCH_READ,
- read_watcher_.get(), this)) {
+ fd_.get().fd,
+ true,
+ base::MessageLoopForIO::WATCH_READ,
+ read_watcher_.get(),
+ this)) {
// TODO(vtl): I'm not sure |WatchFileDescriptor()| actually fails cleanly
// (in the sense of returning the message loop's state to what it was before
// it was called).
@@ -414,7 +421,7 @@
// then received the message data plus the first set of handles for the next
// message in the subsequent |recvmsg()|.)
if (read_platform_handles_.size() >
- (TransportData::GetMaxPlatformHandles() +
+ (TransportData::kMaxPlatformHandles +
embedder::kPlatformChannelMaxNumHandles)) {
LOG(ERROR) << "Received too many platform handles";
embedder::CloseAllPlatformHandles(&read_platform_handles_);
@@ -448,8 +455,11 @@
DCHECK(write_watcher_);
if (!message_loop_for_io()->WatchFileDescriptor(
- fd_.get().fd, false, base::MessageLoopForIO::WATCH_WRITE,
- write_watcher_.get(), this)) {
+ fd_.get().fd,
+ false,
+ base::MessageLoopForIO::WATCH_WRITE,
+ write_watcher_.get(),
+ this)) {
{
base::AutoLock locker(write_lock());
« no previous file with comments | « mojo/edk/system/raw_channel.cc ('k') | mojo/edk/system/raw_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698