summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authoryusukes <yusukes@chromium.org>2015-03-16 17:34:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-17 00:34:37 +0000
commiteaa3c5bf9ad0ac1730eec0bfe1f166f29fe20fc2 (patch)
tree72d6a78c1893966b976bd5d8f8418cd9024723d7 /ipc
parentc97047888c9e13602ee390c99fd78b05efe7bc26 (diff)
downloadchromium_src-eaa3c5bf9ad0ac1730eec0bfe1f166f29fe20fc2.zip
chromium_src-eaa3c5bf9ad0ac1730eec0bfe1f166f29fe20fc2.tar.gz
chromium_src-eaa3c5bf9ad0ac1730eec0bfe1f166f29fe20fc2.tar.bz2
Increase MessageAttachmentSet::kMaxDescriptorsPerMessage to 128
so that dynamically linked NaCl applications like ARC (App Runtime for Chrome) start faster. ARC is a dynamically linked NaCl application which lists more than 70 DSO files in its nmf file. crrev.com/319931 allowed Chrome to pre-open up to 2 DSO files when it spawns a NaCl plugin process so that the plugin process can open/read/map the DSO files without issuing any Chrome IPC. This CL increase the number of DSO files Chrome can pre-open from 2 to 120+. BUG=348232 BUG=nativeclient:3802 TEST=ipc_tests, browser_tests (*PackagedAppTest.SuccessfulLoad) TEST=manually tested non-SFI ARC apps Review URL: https://codereview.chromium.org/998833002 Cr-Commit-Position: refs/heads/master@{#320831}
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_channel_nacl.cc2
-rw-r--r--ipc/ipc_message_attachment_set.h2
-rw-r--r--ipc/ipc_send_fds_test.cc4
3 files changed, 4 insertions, 4 deletions
diff --git a/ipc/ipc_channel_nacl.cc b/ipc/ipc_channel_nacl.cc
index 53397f4..49ac139 100644
--- a/ipc/ipc_channel_nacl.cc
+++ b/ipc/ipc_channel_nacl.cc
@@ -37,7 +37,7 @@ bool ReadDataOnReaderThread(int pipe, MessageContents* contents) {
return false;
contents->data.resize(Channel::kReadBufferSize);
- contents->fds.resize(MessageAttachmentSet::kMaxDescriptorsPerMessage);
+ contents->fds.resize(NACL_ABI_IMC_DESC_MAX);
NaClAbiNaClImcMsgIoVec iov = { &contents->data[0], contents->data.size() };
NaClAbiNaClImcMsgHdr msg = {
diff --git a/ipc/ipc_message_attachment_set.h b/ipc/ipc_message_attachment_set.h
index 7e848bd..b3cc607 100644
--- a/ipc/ipc_message_attachment_set.h
+++ b/ipc/ipc_message_attachment_set.h
@@ -65,7 +65,7 @@ class IPC_EXPORT MessageAttachmentSet
//
// In debugging mode, it's a fatal error to try and add more than this number
// of descriptors to a MessageAttachmentSet.
- static const size_t kMaxDescriptorsPerMessage = 7;
+ static const size_t kMaxDescriptorsPerMessage = 128;
// ---------------------------------------------------------------------------
// Interfaces for transmission...
diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc
index 2e05e03..c681672 100644
--- a/ipc/ipc_send_fds_test.cc
+++ b/ipc/ipc_send_fds_test.cc
@@ -33,8 +33,8 @@ extern "C" {
namespace {
-const unsigned kNumFDsToSend = 7; // per message
-const unsigned kNumMessages = 20;
+const unsigned kNumFDsToSend = 128; // per message
+const unsigned kNumMessages = 3;
const char* kDevZeroPath = "/dev/zero";
#if defined(OS_POSIX)