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}
CrOS-Libchrome-Original-Commit: eaa3c5bf9ad0ac1730eec0bfe1f166f29fe20fc2
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 @@
//
// 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 @@
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)