summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authoryusukes <yusukes@chromium.org>2015-05-06 12:45:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 19:46:25 +0000
commitc986c543f807c5bca25872c929ca29a6ff982506 (patch)
tree8ec33a37ea51bf91d1bb0933061acee1dbc8097e /components
parent281b59f8d52b765ed94003e9d9a04fe34b36b8b7 (diff)
downloadchromium_src-c986c543f807c5bca25872c929ca29a6ff982506.zip
chromium_src-c986c543f807c5bca25872c929ca29a6ff982506.tar.gz
chromium_src-c986c543f807c5bca25872c929ca29a6ff982506.tar.bz2
Change kMaxDescriptorsPerMessage back to 7
This is a partial revert of crrev.com/320831 which increased Chrome's memory usage by 106KB per IPC::Channel. BUG=484154 TEST=git cl try Review URL: https://codereview.chromium.org/1127913002 Cr-Commit-Position: refs/heads/master@{#328587}
Diffstat (limited to 'components')
-rw-r--r--components/nacl/browser/nacl_host_message_filter.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/nacl/browser/nacl_host_message_filter.cc b/components/nacl/browser/nacl_host_message_filter.cc
index b55eddcf..2090e10 100644
--- a/components/nacl/browser/nacl_host_message_filter.cc
+++ b/components/nacl/browser/nacl_host_message_filter.cc
@@ -27,8 +27,10 @@ namespace {
// The maximum number of resource file handles NaClProcessMsg_Start message
// can have. Currently IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage
-// is 128 and NaCl sends 5 handles for other purposes, hence 123.
-const size_t kMaxPreOpenResourceFiles = 123;
+// is 7 and NaCl sends 5 handles for other purposes, hence 2.
+// TODO(yusukes): Remove |kMaxPreOpenResourceFiles|. Instead, send an arbitrary
+// number of FDs to the NaCl loader process with separate IPC messages.
+const size_t kMaxPreOpenResourceFiles = 2;
#if defined(OS_POSIX)
static_assert(kMaxPreOpenResourceFiles ==