diff options
Diffstat (limited to 'chromium/ipc')
-rw-r--r-- | chromium/ipc/file_descriptor_set_posix.cc | 8 | ||||
-rw-r--r-- | chromium/ipc/file_descriptor_set_posix.h | 2 | ||||
-rw-r--r-- | chromium/ipc/ipc_message.cc | 2 | ||||
-rw-r--r-- | chromium/ipc/ipc_message_start.h | 4 | ||||
-rw-r--r-- | chromium/ipc/ipc_perftests.cc | 6 | ||||
-rw-r--r-- | chromium/ipc/ipc_test_base.cc | 7 | ||||
-rw-r--r-- | chromium/ipc/ipc_untrusted.gyp | 2 |
7 files changed, 21 insertions, 10 deletions
diff --git a/chromium/ipc/file_descriptor_set_posix.cc b/chromium/ipc/file_descriptor_set_posix.cc index 3cb58803704..584efec14ae 100644 --- a/chromium/ipc/file_descriptor_set_posix.cc +++ b/chromium/ipc/file_descriptor_set_posix.cc @@ -37,8 +37,10 @@ FileDescriptorSet::~FileDescriptorSet() { } bool FileDescriptorSet::Add(int fd) { - if (descriptors_.size() == kMaxDescriptorsPerMessage) + if (descriptors_.size() == kMaxDescriptorsPerMessage) { + DLOG(WARNING) << "Cannot add file descriptor. FileDescriptorSet full."; return false; + } struct base::FileDescriptor sd; sd.fd = fd; @@ -48,8 +50,10 @@ bool FileDescriptorSet::Add(int fd) { } bool FileDescriptorSet::AddAndAutoClose(int fd) { - if (descriptors_.size() == kMaxDescriptorsPerMessage) + if (descriptors_.size() == kMaxDescriptorsPerMessage) { + DLOG(WARNING) << "Cannot add file descriptor. FileDescriptorSet full."; return false; + } struct base::FileDescriptor sd; sd.fd = fd; diff --git a/chromium/ipc/file_descriptor_set_posix.h b/chromium/ipc/file_descriptor_set_posix.h index de4c5c62329..f9c6033c2a6 100644 --- a/chromium/ipc/file_descriptor_set_posix.h +++ b/chromium/ipc/file_descriptor_set_posix.h @@ -30,7 +30,7 @@ class IPC_EXPORT FileDescriptorSet // // In debugging mode, it's a fatal error to try and add more than this number // of descriptors to a FileDescriptorSet. - static const size_t kMaxDescriptorsPerMessage = 5; + static const size_t kMaxDescriptorsPerMessage = 7; // --------------------------------------------------------------------------- // Interfaces for building during message serialisation... diff --git a/chromium/ipc/ipc_message.cc b/chromium/ipc/ipc_message.cc index 2fb909773f1..cf3a65e077f 100644 --- a/chromium/ipc/ipc_message.cc +++ b/chromium/ipc/ipc_message.cc @@ -27,7 +27,7 @@ inline uint32 GetRefNumUpper24() { // Process ID. With the current trace event buffer cap, the 14-bit count did // not appear to wrap during a trace. Note that it is not a big deal if // collisions occur, as this is only used for debugging and trace analysis. - return ((pid << 22) | (count & 0x3fff)) << 8; + return ((pid << 14) | (count & 0x3fff)) << 8; } } // namespace diff --git a/chromium/ipc/ipc_message_start.h b/chromium/ipc/ipc_message_start.h index f5833017f91..a8cca5353f1 100644 --- a/chromium/ipc/ipc_message_start.h +++ b/chromium/ipc/ipc_message_start.h @@ -88,7 +88,9 @@ enum IPCMessageStart { WebRTCIdentityMsgStart, LocalDiscoveryMsgStart, PowerMonitorMsgStart, - LastIPCMsgStart // Must come last. + EncryptedMediaMsgStart, + ServiceWorkerMsgStart, + LastIPCMsgStart // Must come last. }; #endif // IPC_IPC_MESSAGE_START_H_ diff --git a/chromium/ipc/ipc_perftests.cc b/chromium/ipc/ipc_perftests.cc index 81adde81136..e7eeab9d8ea 100644 --- a/chromium/ipc/ipc_perftests.cc +++ b/chromium/ipc/ipc_perftests.cc @@ -10,9 +10,9 @@ #include "base/basictypes.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" -#include "base/perftimer.h" #include "base/pickle.h" #include "base/strings/stringprintf.h" +#include "base/test/perf_time_logger.h" #include "base/threading/thread.h" #include "base/time/time.h" #include "ipc/ipc_channel.h" @@ -184,7 +184,7 @@ class PerformanceChannelListener : public IPC::Listener { DCHECK(!perf_logger_.get()); std::string test_name = base::StringPrintf( "IPC_Perf_%dx_%u", msg_count_, static_cast<unsigned>(msg_size_)); - perf_logger_.reset(new PerfTimeLogger(test_name.c_str())); + perf_logger_.reset(new base::PerfTimeLogger(test_name.c_str())); } else { DCHECK_EQ(payload_.size(), reflected_payload.size()); @@ -217,7 +217,7 @@ class PerformanceChannelListener : public IPC::Listener { int count_down_; std::string payload_; EventTimeTracker latency_tracker_; - scoped_ptr<PerfTimeLogger> perf_logger_; + scoped_ptr<base::PerfTimeLogger> perf_logger_; }; TEST_F(IPCChannelPerfTest, Performance) { diff --git a/chromium/ipc/ipc_test_base.cc b/chromium/ipc/ipc_test_base.cc index 5e16e42cd8d..ef050a7151f 100644 --- a/chromium/ipc/ipc_test_base.cc +++ b/chromium/ipc/ipc_test_base.cc @@ -14,6 +14,10 @@ #include "ipc/ipc_descriptors.h" #include "ipc/ipc_switches.h" +#if defined(OS_POSIX) +#include "base/posix/global_descriptors.h" +#endif + // static std::string IPCTestBase::GetChannelName(const std::string& test_client_name) { DCHECK(!test_client_name.empty()); @@ -102,7 +106,8 @@ bool IPCTestBase::StartClient() { const int ipcfd = channel_.get() ? channel_->GetClientFileDescriptor() : channel_proxy_->GetClientFileDescriptor(); if (ipcfd > -1) - fds_to_map.push_back(std::pair<int, int>(ipcfd, kPrimaryIPCChannel + 3)); + fds_to_map.push_back(std::pair<int, int>(ipcfd, + kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor)); client_process_ = MultiProcessTest::SpawnChild(test_main, fds_to_map, diff --git a/chromium/ipc/ipc_untrusted.gyp b/chromium/ipc/ipc_untrusted.gyp index a502548e873..7b0c5483faf 100644 --- a/chromium/ipc/ipc_untrusted.gyp +++ b/chromium/ipc/ipc_untrusted.gyp @@ -21,7 +21,7 @@ 'nacl_untrusted_build': 1, 'nlib_target': 'libipc_untrusted.a', 'build_glibc': 0, - 'build_newlib': 1, + 'build_newlib': 0, 'build_irt': 1, }, 'dependencies': [ |