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

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

Issue 728553002: 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 45d93e86867985e2f46e910a1c18a63d4fb9ac10..71ec02f7489b42a474835ee8b21174262860e389 100644
--- a/mojo/edk/system/raw_channel_posix.cc
+++ b/mojo/edk/system/raw_channel_posix.cc
@@ -135,8 +135,7 @@ void RawChannelPosix::EnqueueMessageNoLock(
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(
@@ -253,8 +252,8 @@ RawChannel::IOResult RawChannelPosix::WriteNoLock(
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];
@@ -302,11 +301,8 @@ RawChannel::IOResult RawChannelPosix::ScheduleWriteNoLock() {
}
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;
}
@@ -323,11 +319,8 @@ bool RawChannelPosix::OnInit() {
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).
@@ -421,7 +414,7 @@ RawChannel::IOResult RawChannelPosix::ReadImpl(size_t* bytes_read) {
// 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::kMaxPlatformHandles +
+ (TransportData::GetMaxPlatformHandles() +
embedder::kPlatformChannelMaxNumHandles)) {
LOG(ERROR) << "Received too many platform handles";
embedder::CloseAllPlatformHandles(&read_platform_handles_);
@@ -455,11 +448,8 @@ void RawChannelPosix::WaitToWrite() {
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