Bug 1516325. r=glandium
authorJed Davis <jld@mozilla.com>
Sat, 23 Mar 2019 10:25:18 +0000
changeset 467587 b4e4c1cb485de23dcf46c551be73d3900e3802d3
parent 467586 813b970cd40b3669725c8711a181b3c4a5ebfb31
child 467588 090b1c91856135afd1e063d42a39b424e4414217
push id35804
push userrgurzau@mozilla.com
push dateTue, 02 Apr 2019 21:49:08 +0000
treeherdermozilla-central@48ae682107da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1516325
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1516325. r=glandium Differential Revision: https://phabricator.services.mozilla.com/D22638
config/external/nspr/pr/moz.build
toolkit/xre/nsAppRunner.cpp
--- a/config/external/nspr/pr/moz.build
+++ b/config/external/nspr/pr/moz.build
@@ -35,16 +35,19 @@ elif CONFIG['OS_TARGET'] in ('FreeBSD', 
         HAVE_BSD_FLOCK=True,
         HAVE_SOCKLEN_T=True,
         HAVE_POINTER_LOCALTIME_R=True,
     )
     DEFINES[CONFIG['OS_TARGET'].upper()] = True
     SOURCES += ['/nsprpub/pr/src/md/unix/%s.c' % CONFIG['OS_TARGET'].lower()]
 elif CONFIG['OS_TARGET'] == 'Darwin':
     OS_LIBS += ['-framework CoreServices']
+    # See also IncreaseDescriptorLimits in toolkit/xre/nsAppRunner.cpp
+    DEFINES['FD_SETSIZE'] = 4096
+    DEFINES['_DARWIN_UNLIMITED_SELECT'] = True
     if not CONFIG['HOST_MAJOR_VERSION']:
         DEFINES.update(
             HAS_CONNECTX=True,
         )
     elif CONFIG['HOST_MAJOR_VERSION'] >= '15':
         DEFINES.update(
             HAS_CONNECTX=True,
         )
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -2899,16 +2899,17 @@ static bool CheckForUserMismatch() {
 }
 #else  // !XP_UNIX || ANDROID
 static bool CheckForUserMismatch() { return false; }
 #endif
 
 static void IncreaseDescriptorLimits() {
 #ifdef XP_UNIX
   // Increase the fd limit to accomodate IPC resources like shared memory.
+  // See also the Darwin case in config/external/nspr/pr/moz.build
   static const rlim_t kFDs = 4096;
   struct rlimit rlim;
 
   if (getrlimit(RLIMIT_NOFILE, &rlim) != 0) {
     Output(false, "getrlimit: %s\n", strerror(errno));
     return;
   }
   // Don't decrease the limit if it's already high enough, but don't