Граф коммитов

1199 Коммитов

Автор SHA1 Сообщение Дата
Andreea Pavel 74cd2bf73e Backed out 8 changesets (bug 1446161, bug 1487287, bug 1488993, bug 1474991, bug 1496608) for very frequent automation.py crashes on a CLOSED TREE
Backed out changeset 8b1f88d7bfeb (bug 1487287)
Backed out changeset 8fa5e81ad801 (bug 1487287)
Backed out changeset 7a480161fa0f (bug 1474991)
Backed out changeset 80116391b7fe (bug 1446161)
Backed out changeset 1bdf64b29121 (bug 1446161)
Backed out changeset 37bf52f0e9cf (bug 1446161)
Backed out changeset 8ede2ebe6b7a (bug 1496608)
Backed out changeset cea43bc88c7a (bug 1488993)
2018-11-27 08:53:18 +02:00
Jed Davis dececcae11 Bug 1446161 - Asynchronously launch preallocated content processes using MozPromise. r=mccr8
There are several layers to this patch:

1. GeckoChildProcessHost now exposes a promise that's resolved when
the process handle is available (or rejected if launch failed), as a
nonblocking alternative to LaunchAndWaitForProcessHandle.

2. ContentParent builds on this with the private method
LaunchSubprocessAsync and the public method PreallocateProcessAsync;
synchronous launch continues to exist for the regular on-demand launch
path, for the time being.

3. PreallocatedProcessManager now uses async launch, and handles the new
"launch in progress" state appropriately.

Depends on D8942

Differential Revision: https://phabricator.services.mozilla.com/D8943

--HG--
extra : moz-landing-system : lando
2018-11-22 00:35:53 +00:00
Jed Davis 05b62c7dad Bug 1501895 - Fix Snap integration for IPC shared memory to work with parallel instances. r=froydnj
snapd 2.36 introduces a new experimental feature to allow creating
multiple instances of a package, which are isolated from each other; see
https://forum.snapcraft.io/t/parallel-installs/7679 for details.

This changes the prefix we need to use to access /dev/shm, because it's
now the instance name rather than the snap name.

Differential Revision: https://phabricator.services.mozilla.com/D11835

--HG--
extra : moz-landing-system : lando
2018-11-14 02:19:42 +00:00
Brian Hackett e6cc6030db Bug 1506246 - Don't log unconsumed file descriptor sets in middleman processes, r=froydnj.
--HG--
extra : rebase_source : 7dadfe8dbced92b1022184fc05a6d61940398316
2018-11-09 10:54:48 -10:00
David Major 758232a8e7 No bug - fix nonunified include bustage in ipc_message.cc 2018-11-08 14:28:03 -05:00
Brian Hackett ab63c78ed5 Bug 1503639 Part 2 - Remove NotifyUnrecordedWait use in MessagePumpDefault, r=mccr8.
--HG--
extra : rebase_source : eabb1b757fdb122ea1ca989fdd3d9ef3fbcaed77
2018-10-31 10:18:20 -10:00
Gerald Squelart 1d2a9c227e Bug 1503468 - Add more AUTO_PROFILER_THREAD_SLEEP's - r=mstange
These are around wait functions that already had an IDLE marker.

Differential Revision: https://phabricator.services.mozilla.com/D10671

--HG--
extra : moz-landing-system : lando
2018-11-02 16:26:50 +00:00
Brian Hackett 3c4231fd5b Bug 1488808 Part 10 - Notify the record/replay system when a message pump thread blocks after diverging from the recording, r=froydnj.
--HG--
extra : rebase_source : c82088f0903b618caee3b0366a8c681ff6f445a1
2018-10-17 10:05:02 -06:00
Jan Beich 1b90794ae0 Bug 1497169 - Unbreak bundled libevent on FreeBSD 12. r=froydnj 2018-10-08 05:12:00 +03:00
Nathan Froyd 2975d8ecc6 Bug 1495871 - remove chromium atomics code; r=jld
The only consumer of this code was Singleton, which we previously
removed, and everything that this code accomplished can be done more
simply and more foolproof-y by standard constructs these days.
2018-10-05 13:43:46 -04:00
Nathan Froyd 68a6731334 Bug 1495871 - remove singleton headers from ipc/; r=jld
These headers are no longer used.
2018-10-05 13:43:46 -04:00
Nathan Froyd 04abc48f2b Bug 1495871 - use C++11 statics in time_win.cc; r=jld
C++11 provides guaranteed thread-safe static initialization, so we can
use that instead of ipc's baroque Singleton class.
2018-10-05 13:43:47 -04:00
Nathan Froyd e2d2f91d22 Bug 1495871 - use C++11 statics for Faulty instance; r=decoder
C++11 provides guaranteed thread-safe static initialization, so we can
use that instead of ipc's baroque Singleton class.
2018-10-05 13:43:47 -04:00
Nathan Froyd ab6a71a3de Bug 1495871 - use C++11 statics in ipc_channel_posix.cc; r=jld
C++11 provides guaranteed thread-safe static initialization, so we can
use that instead of ipc's baroque Singleton class.
2018-10-05 13:43:47 -04:00
Nathan Froyd 582b05b7b7 Bug 1495871 - remove ipc/'s copies of *AtomicSequenceNum classes; r=jld
Their uses are easily replaced with simpler classes.
2018-10-05 13:43:47 -04:00
Nathan Froyd 7ed849f7d2 Bug 1494712 - fix incorrect preprocessor define for aarch64 in atomicops.h; r=jld 2018-09-27 19:44:16 -04:00
Kris Maglione 74481e8af4 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : source : a03a61d6d724503c3b7c5e31fe32ced1f5d1c219
extra : intermediate-source : 5152af6ab3e399216ef6db8f060c257b2ffbd330
extra : histedit_source : ef06000344416e0919f536d5720fa979d2d29c66%2C4671676b613dc3e3ec762edf5d72a2ffbe6fca3f
2018-07-27 15:13:12 -07:00
Narcis Beleuzu 72f96acd7b Backed out 2 changesets (bug 1479035) for assertion failure: mEvents. CLOSED TREE
Backed out changeset 89a0c0874d40 (bug 1479035)
Backed out changeset 5152af6ab3e3 (bug 1479035)
2018-09-26 23:40:13 +03:00
Kris Maglione 81eb50cf31 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : rebase_source : fcf8fa50e748c4b54c3bb1997575d9ffd4cbaae1
extra : source : a03a61d6d724503c3b7c5e31fe32ced1f5d1c219
2018-07-27 15:13:12 -07:00
Noemi Erli 36cc0e5fa7 Backed out 2 changesets (bug 1479035) for build bustages bustages netwerk/cache2/target on CLOSED TREE
Backed out changeset 5f8706213610 (bug 1479035)
Backed out changeset a03a61d6d724 (bug 1479035)
2018-09-26 08:54:03 +03:00
Kris Maglione a6edc4f204 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : rebase_source : 02c5572b92ee48c11697d90941336e10c03d49cf
2018-07-27 15:13:12 -07:00
Markus Stange c37151f2e9 Bug 1493275 - Annotate idle stacks in the chromium event loop on Windows. r=froydnj
Depends on D6533

Differential Revision: https://phabricator.services.mozilla.com/D6534

--HG--
extra : moz-landing-system : lando
2018-09-21 21:22:58 +00:00
Jed Davis 8724a9004a Bug 1400042 - Remove SetAllFDsToCloseOnExec r=mccr8
As the comments indicate, it has unavoidable race conditions in a
multithreaded program, and its call sites have all been removed.

Differential Revision: https://phabricator.services.mozilla.com/D6561

--HG--
extra : moz-landing-system : lando
2018-09-22 02:31:24 +00:00
Jed Davis f2f934dc7e Bug 1400051 - IPC: use process_util_linux on BSD and remove process_util_bsd. r=glandium
This change is mainly to avoid the use of SetAllFDsToCloseOnExec, which
has an unavoidable race condition that can leak file descriptors into
child processes.  The "Linux" implementation of child process creation,
now that B2G support has been removed, is essentially a generic Unix
fork+dup2+execve which works on BSD (and is already used on Solaris).
2018-09-20 19:53:31 -06:00
Bob Owen 81d8e5c8da Bug 1490234: Make permissions specific for Windows shared memory handle. r=jld 2018-09-18 11:50:18 +01:00
Tom Ritter 7e0fefeaa0 Bug 1475566 Disable #pragma comments for MinGW Builds r=glandium
In the MinGW browser build job, we're going to use -fms-extensions,
which will tell clang to start processing these comments. Clang
cannot process them correctly (it's an upstream bug) but it doesn't
need to, because we include the libs we need in moz.build files.

So we exclude them for MinGW builds. mingw-clang gets them wrong and
mingw-gcc (which doesn't even work anymore on -central) ignored them.

In the future, with a llvm fix, we could clean up the moz.build
files and re-enable these comments.

Differential Revision: https://phabricator.services.mozilla.com/D3527

--HG--
extra : moz-landing-system : lando
2018-08-29 03:50:39 +00:00
Nathan Froyd 3eab353d3f Bug 1480732 - make ipc/'s atomicops.h work on aarch64 windows; r=jld
I'm not entirely sure how this works on x86-64 Windows, which also uses
a #define for MemoryBarrier...I think something about intrinsics.
2018-08-27 09:31:28 -04:00
Nathan Froyd 29a5f5b36b Bug 1485696 - add aarch64 windows support to ipc's build_config.h; r=jld 2018-08-23 13:27:57 -04:00
Jed Davis 5e630f7ccf Bug 1481978 - Change IPC CloseSuperfluousFds to prevent accidentally heap-allocating closures. r=glandium
Closures are nice but -- as pointed out in bug 1481978 comment #2 --
it's a footgun to take a std::function argument in a context where heap
allocation isn't safe.

Fortunately, non-capturing closures convert to C function pointers,
so a C-style interface with a void* context can still be relatively
ergonomic.
2018-08-15 19:08:40 -06:00
Gabriele Svelto 15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Jed Davis 18e4e4ce63 Bug 1480401 - Avoid heap-allocated closures in async signal safe part of LaunchApp. r=froydnj
MozReview-Commit-ID: 4LYtBGbqtVh

--HG--
extra : rebase_source : 4bf706d0b5bd61fdffc0f727cd72591c512ca20c
2018-08-02 14:18:01 -06:00
Kris Maglione 6bde5d95f3 Bug 1476405: Part 2b - Use default thread size from nsIThreadManager in Linux PlatformThreads. r=jld
MozReview-Commit-ID: 4Mod1IdzJBw

--HG--
extra : rebase_source : 9d0c21427bc34115d5a07269c1ecc4f7acfaa3ae
extra : intermediate-source : 0b0c243a1827e193d045d6b3566c87ca87035c48
extra : source : 6c154f4d9dd93e3dac6045c3b8ead22702071fda
2018-07-20 13:20:42 -07:00
Kris Maglione 94acb9ea0e Bug 1476405: Part 2a - Create nsThread wrappers/set names for chromium threads. r=erahm,jld
MozReview-Commit-ID: FvGhq6nhIde

--HG--
extra : rebase_source : aa7ce229cd37763a3af2061b38d41b675118773f
extra : intermediate-source : 236b366fdf3731ef95e0ba75b8f24f03181343ee
extra : source : d0ebb3aa8e0f0946eafc2e7cac4d5cbcf1694e2f
2018-07-18 22:31:30 -07:00
dvarga d8ac8507c9 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
extra : amend_source : 25781a5ccee21a19f5c6ccacc2c96ab7eb4ed6b5
2018-07-28 01:32:38 +03:00
Cosmin Sabou 778ca4f84f Backed out 8 changesets (bug 1476405) for causing frequent failures in bug 1479022. a=backout
Backed out changeset ad1674e9152d (bug 1476405)
Backed out changeset e0a021b27d2c (bug 1476405)
Backed out changeset 771288dbf852 (bug 1476405)
Backed out changeset aeebad4f2dc3 (bug 1476405)
Backed out changeset 4831cbfd03de (bug 1476405)
Backed out changeset 0b0c243a1827 (bug 1476405)
Backed out changeset 236b366fdf37 (bug 1476405)
Backed out changeset c767b1b618fb (bug 1476405)
2018-07-28 01:25:25 +03:00
Jed Davis 652dac8690 Bug 1447867 - Replace base::SharedMemory POSIX backend with shm_open and ashmem. r=froydnj
This replaces using file_util to open and unlink temporary files
(/dev/shm on Linux, $TMPDIR or /tmp otherwise) with the POSIX shm_open
API, or ashmem on Android (which doesn't implement shm_open).

glibc maps shm_open/shm_unlink to open and unlink in /dev/shm (as does
musl libc), so the Linux situation is mostly unchanged except we aren't
duplicating code from system libraries.  Other OSes may (and some do)
use more efficient implementations than temporary files.

FreeBSD's SHM_ANON extension is used if available.  Sadly, it's not
standard; it would make this patch much simpler if it were.

This patch changes the shm file names; they now start with "org.mozilla"
instead of "org.chromium" because the original Chromium code is mostly
gone at this point.  When running as a Snap package, the required
filename prefix is added; other container/sandbox environments using
AppArmor to restrict the allowed filenames may need to be adjusted.

The shm names now include the creating process's pid, to allow
using sandboxing to prevent interfering with shm belonging to other
applications or other processes within the same browser instance.

MozReview-Commit-ID: 7PirIlcblh4
2018-07-27 10:10:25 -06:00
Kris Maglione 6254e72cae Bug 1476405: Part 2b - Use default thread size from nsIThreadManager in Linux PlatformThreads. r=jld
MozReview-Commit-ID: 4Mod1IdzJBw

--HG--
extra : source : 6c154f4d9dd93e3dac6045c3b8ead22702071fda
extra : histedit_source : fc05365522a7bc8c3b6acd0281a537879d27fee9
2018-07-20 13:20:42 -07:00
Kris Maglione ed4f3e5b05 Bug 1476405: Part 2a - Create nsThread wrappers/set names for chromium threads. r=erahm,jld
MozReview-Commit-ID: FvGhq6nhIde

--HG--
extra : source : d0ebb3aa8e0f0946eafc2e7cac4d5cbcf1694e2f
extra : histedit_source : 4c5ef4a166af4c54244003fa5f66dc13da9024f6%2Ca0400aab477c90f08683773186b7a64e88b64b7e
2018-07-18 22:31:30 -07:00
Coroiu Cristina 6d037d0cba Backed out 9 changesets (bug 1476405) for causing leaks
Backed out changeset 4113d6fb3c1c (bug 1476405)
Backed out changeset cb7f7cc32687 (bug 1476405)
Backed out changeset 6d18a8bd5ee3 (bug 1476405)
Backed out changeset b2a99f50e642 (bug 1476405)
Backed out changeset b5b9d295545d (bug 1476405)
Backed out changeset f092a32a3639 (bug 1476405)
Backed out changeset 6c154f4d9dd9 (bug 1476405)
Backed out changeset d0ebb3aa8e0f (bug 1476405)
Backed out changeset 06b8093ddc6a (bug 1476405)
2018-07-27 08:56:36 +03:00
Kris Maglione 9b189d0e9f Bug 1476405: Part 2b - Use default thread size from nsIThreadManager in Linux PlatformThreads. r=jld
MozReview-Commit-ID: 4Mod1IdzJBw

--HG--
extra : rebase_source : 89d6559a27ea5681c1415f71eeb837bfadd8351d
2018-07-20 13:20:42 -07:00
Kris Maglione 8a9627cd5c Bug 1476405: Part 2a - Create nsThread wrappers/set names for chromium threads. r=erahm,jld
MozReview-Commit-ID: FvGhq6nhIde

--HG--
extra : rebase_source : 3d9ef99840da37bce0117515b03a165f6821e74d
2018-07-18 22:31:30 -07:00
Brian Hackett b073b2dd5f Bug 1477563 - Deep copy file descriptor sets when copying IPDL messages, r=froydnj.
--HG--
extra : rebase_source : 6a002c9af0b12d1015159a3ce841376af13ee284
2018-07-24 15:47:26 +00:00
Nathan Froyd 99a3d308d0 Bug 1477048 - part 3 - remove ipc/chromium uses of OS_TEST; r=gps
These were less straightforward, so I separated them out into a separate
patch.
2018-07-24 16:08:56 -04:00
Nathan Froyd 5158597854 Bug 1477048 - part 1 - remove `'86' in CONFIG['OS_TEST']` stanzas from moz.build files; r=gps
The current code is somewhat non-obvious to a first-time reader, and
OS_TEST is a bizarre thing anyway, since it's actually the name of the
CPU we're running on.  We'd do well to minimize the use of OS_TEST.

Note that the complete nuking of the xptcall/md/unix/moz.build lines are
because we don't support OS X/x86 anymore.
2018-07-24 16:08:56 -04:00
Brian Hackett 3f2c401055 Bug 1465287 Part 9 - Allow copying IPDL messages, r=froydnj.
--HG--
extra : rebase_source : 25d5c75b5a5b07b545646535bd8da7b9fd9562dc
2018-07-22 11:53:23 +00:00
Jed Davis 3ffadbe5c7 Bug 1456919 - Shuffle fds correctly in process_util_mac. r=erahm
MozReview-Commit-ID: K17Bn44NU48

--HG--
extra : rebase_source : cc330d387c43f941d54c508f90639567c48e86c5
2018-07-13 15:16:48 -06:00
Jed Davis bd5903e8fc Bug 1475382 - Remove debugging crashes added in bug 1461459. r=spohl
These are no longer providing useful information.  There are still a
noticeable number of failures on Windows, but we've narrowed them down to
within SandboxBroker::LaunchApp.

MozReview-Commit-ID: 9srWLNZq1Wo

--HG--
extra : rebase_source : db44114a7623e75f9efd629046d2118748352ed1
2018-07-13 15:18:03 -06:00
Stephen A Pohl 80b1014efb Bug 1461459: Add nightly-only MOZ_CRASH statements in base::LaunchApp on macOS to investigate failures to asynchronously launch content processes. r=jld 2018-06-15 10:46:33 -07:00
Jed Davis b0a1468c01 Bug 1456911 - Rewrite the fd shuffling to be simpler & handle identity mappings correctly. r=froydnj
This replaces some old Chromium code that tries to minimally disentangle
an arbitrary file descriptor mapping with simpler algorithm, for several
reasons:

1. Do something appropriate when a file descriptor is mapped to the same
fd number in the child; currently they're ignored, which means they'll
be closed if they were close-on-exec.  This implementation duplicates
the fd twice in that case, which seems to be uncommon in practice; this
isn't maximally efficient but avoids special-case code.

2. Make this more generally applicable; the previous design is
specialized for arbitrary code running between fork and exec, but we
also want to use this on OS X with posix_spawn, which exposes a very
limited set of operations.

3. Avoid the use of C++ standard library iterators in async signal safe
code; the Chromium developers mention that this is a potential problem in
some debugging implementations that take locks.

4. In general the algorithm is simpler and should be more "obviously
correct"; more concretely, it should get complete coverage just by being
run normally in a debug build.

As a convenient side benefit, CloseSuperfluousFds now takes an arbitrary
predicate for which fds to leave open, which means it can be used in
other code that needs it without creating a fake fd mapping.

MozReview-Commit-ID: EoiRttrbrKL

--HG--
extra : rebase_source : 336e0ba9f56dc80f7347dc62617b4ad1efea7e7e
2018-04-25 17:44:08 -06:00
Alex Gaynor b174206e6f Bug 1451859 - Part 2: Add sanitizer coverage to a handful of places relevant to IPC. r=posidron 2018-04-05 15:48:11 -04:00
Cosmin Sabou 18d0742c9b Backed out 3 changesets (bug 1451859) for causing Spidermonkey bustages on Linux x64 opt.
Backed out changeset 8f5a9e18e953 (bug 1451859)
Backed out changeset 950fa584ec8e (bug 1451859)
Backed out changeset f1f42726f1ec (bug 1451859)
2018-06-07 09:10:35 +03:00
Alex Gaynor 76b53de450 Bug 1451859 - Part 2: Add sanitizer coverage to a handful of places relevant to IPC. r=posidron 2018-04-05 15:48:11 -04:00
Andreea Pavel 4ced6e8b2d Merge mozilla-central to autoland. a=merge 2018-06-03 07:27:01 +03:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Cameron Kaiser 06d4641b77 Bug 1464754 - Use proper atomicops for ppc32/ppc64. r=froydnj 2018-05-27 22:50:05 -07:00
Rofael Aleezada dd5f62f8fa Bug 806514 - Replaced std::vector with nsTArray in Histogram::SampleSet. r=chutten
MozReview-Commit-ID: 6ptwiOz2c5i

--HG--
extra : rebase_source : a50dd5ae00689a4186dc2040eac2a19029ab5a2d
2018-05-23 21:50:29 -05:00
Alessio Placitelli c5ecfdbb33 Bug 1459144 - Fix CountHistogram deserialization for GeckoView. r=chutten,janerik
This adds all the samples from the provided sample set to the CountHistogram's
storage, instead of just adding 1 sample of value 1. This change does not affect
code outside of GeckoView persistence since |AddSampleSet| is not used in other
places.

MozReview-Commit-ID: 9bE0M9dgrtE

--HG--
extra : rebase_source : c2147d084415518b02148daa83107045f2993c0f
2018-05-22 17:15:26 +02:00
Csoregi Natalia 2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
Markus Stange 88cd48ca91 Bug 1462784 - Annotate idle stacks in the chromium event loop. r=froydnj
MozReview-Commit-ID: Ac8H02GKnmV

--HG--
extra : rebase_source : a24d92a0e7745a81d4dfc30ddef2f95f01fd31cd
2018-05-18 18:17:21 -04:00
Csoregi Natalia fc2ed6e92a Backed out 18 changesets (bug 1462784) for ESlint failure on FlameGraph.js:1297. CLOSED TREE
Backed out changeset 79556798ff9f (bug 1462784)
Backed out changeset 88321efb673b (bug 1462784)
Backed out changeset 7880f9dc7023 (bug 1462784)
Backed out changeset 71fe35fd1f7e (bug 1462784)
Backed out changeset a543b94b049a (bug 1462784)
Backed out changeset d1ca8b0f2221 (bug 1462784)
Backed out changeset 68eabfbf3c16 (bug 1462784)
Backed out changeset 34e71c789903 (bug 1462784)
Backed out changeset 6fe79d1ca1bd (bug 1462784)
Backed out changeset e5ad2e525ea9 (bug 1462784)
Backed out changeset 329645ff1e23 (bug 1462784)
Backed out changeset e09c38853172 (bug 1462784)
Backed out changeset 0663d1a6d2da (bug 1462784)
Backed out changeset 106967fc29d2 (bug 1462784)
Backed out changeset 99b4a433a8e5 (bug 1462784)
Backed out changeset 1d38a4cf5a4a (bug 1462784)
Backed out changeset 692017229de6 (bug 1462784)
Backed out changeset c2911a626671 (bug 1462784)
2018-06-01 23:42:00 +03:00
Markus Stange 2eecff51ad Bug 1462784 - Annotate idle stacks in the chromium event loop. r=froydnj
MozReview-Commit-ID: Ac8H02GKnmV

--HG--
extra : rebase_source : 3bbf0398b2a2152a9000d51f04688436832f81e1
2018-05-18 18:17:21 -04:00
Noemi Erli 1fd69fa2bc Backed out 18 changesets (bug 1462784) for failures in devtools/client/performance/test/unit/test_tree-model-08.js on a CLOSED TREE
Backed out changeset a74d36598442 (bug 1462784)
Backed out changeset c8192175f360 (bug 1462784)
Backed out changeset cde492240e99 (bug 1462784)
Backed out changeset 8c8d30fa406c (bug 1462784)
Backed out changeset ad3802ffb780 (bug 1462784)
Backed out changeset 2fe10732076c (bug 1462784)
Backed out changeset 268a72b7c3c4 (bug 1462784)
Backed out changeset 4055eb6c3bc6 (bug 1462784)
Backed out changeset 3901070e2e60 (bug 1462784)
Backed out changeset 2faf787fbbdf (bug 1462784)
Backed out changeset 8f06963c7c6f (bug 1462784)
Backed out changeset 036e6f64e224 (bug 1462784)
Backed out changeset e670f156a603 (bug 1462784)
Backed out changeset cd39588aece4 (bug 1462784)
Backed out changeset 2ac65d100fa2 (bug 1462784)
Backed out changeset ea05ff70a51d (bug 1462784)
Backed out changeset 8a06c0ba42f7 (bug 1462784)
Backed out changeset 52ed9a039ad2 (bug 1462784)
2018-06-01 01:06:29 +03:00
Markus Stange 3b73629fe1 Bug 1462784 - Annotate idle stacks in the chromium event loop. r=froydnj
MozReview-Commit-ID: Ac8H02GKnmV

--HG--
extra : rebase_source : 8328ecf80068519f5962d1bc5bd58f428136b9af
2018-05-18 18:17:21 -04:00
Jed Davis 95e6221bc6 Bug 1436242 - Avoid undefined behavior in IPC fd-passing code. r=froydnj
MozReview-Commit-ID: 3szIPUssgF5

--HG--
extra : rebase_source : c5ce3f601ce9872c2c2f98340907e13c77a49e71
2018-05-21 17:01:45 -06:00
Alex Gaynor dcaebb1096 Bug 1456147 - do not fail on an assertion error when calling Pickle::ExtractBuffers on an empty iterator; r=jld
MozReview-Commit-ID: 7m2QSOuxLOw

--HG--
extra : rebase_source : 776380e443647019f11e725a106f670adbb2c919
2018-04-23 11:20:07 -04:00
Gurzau Raul faeb9b7ddd Merge inbound to mozilla-central. a=merge 2018-04-25 12:36:04 +03:00
Christoph Diehl d5091638e8 Bug 777067 - Fuzzing: IPC Protocol Definition Language (IPDL) Protocols. r=jld
--HG--
rename : ipc/glue/Faulty.cpp => tools/fuzzing/faulty/Faulty.cpp
rename : ipc/glue/Faulty.h => tools/fuzzing/faulty/Faulty.h
2018-04-24 20:10:15 +02:00
Alex Gaynor 3e8fd2dc07 Bug 1450232 - in IPC, check that lengths fit in the available data before allocating data; r=mccr8
There are three things we want to be true:

a) If the child sends a large value and the parent can't allocate enough space
   for it we use an infallible allocation so the parent dies with an OOM.
b) If a fuzzer generates (huge-length, small-data) we don't try to allocate
   huge-length bytes; knowing that the read will fail.
c) No fuzzer-specific branches in the core IPC serialization code.

Finally, this makes (huge-length, small-data) consistent with other cases where
the data is potentially truncated: ReadParam returns false.

MozReview-Commit-ID: 6nDKrw5z4pt

--HG--
extra : rebase_source : 58372d29139e9545a6ed2852c7243affeab6fdb7
2018-04-19 16:53:29 -04:00
David Major 4ed8d6a022 Bug 1456192 - make Pickle::ReadSentinel MOZ_NEVER_INLINE; r=froydnj
This function is just pure bloat when it gets inlined, and it will
disappear on non-Nightly builds anyway.  Make it MOZ_NEVER_INLINE so our
size statistics on Nightly are somewhat more reflective of our size
statistics on Release.
2018-04-23 14:13:37 -04:00
jld@mozilla.com c7c75836c0 Backed out 2 changesets (bug 1439057, bug 1447867)
Backed out changeset baeab3bff807 (bug 1439057)
Backed out changeset 1a024d5ca77b (bug 1447867)

--HG--
extra : rebase_source : d39e4657b4117706a53bc42b7817424cf43f9148
2018-04-23 07:59:02 -06:00
Jed Davis 6f2db7351f Bug 1447867 - Replace base::SharedMemory POSIX backend with shm_open and ashmem. r=froydnj
This replaces using file_util to open and unlink temporary files
(/dev/shm on Linux, $TMPDIR or /tmp otherwise) with the POSIX shm_open
API, or ashmem on Android (which doesn't implement shm_open).

glibc maps shm_open/shm_unlink to open and unlink in /dev/shm (as does
musl libc), so the Linux situation is mostly unchanged except we aren't
duplicating code from system libraries.  Other OSes may (and some do)
use more efficient implementations than temporary files.

FreeBSD's SHM_ANON extension is used if available.  Sadly, it's not
standard; it would make this patch much simpler if it were.

This patch changes the shm file names; they now start with "org.mozilla"
instead of "org.chromium" because the original Chromium code is mostly
gone at this point.  When running as a Snap package, the required
filename prefix is added; other container/sandbox environments using
AppArmor to restrict the allowed filenames may need to be adjusted.

The shm names now include the creating process's pid, to allow
using sandboxing to prevent interfering with shm belonging to other
applications or other processes within the same browser instance.

MozReview-Commit-ID: 7PirIlcblh4

--HG--
extra : rebase_source : 550a0ab013429c29a57bde5c0e4593d9b426da8e
2018-04-12 21:37:38 -06:00
Tom Bannister 988d18881f Bug 1434710 - Replaced all instances of mozilla::IndexSequence, mozilla::MakeIndexSequence and mozilla::IndexSequenceFor with std::index_sequence, std::make_index_sequence and std::index_sequence_for and removed mfbt/IndexSequence.h. r=botond
MozReview-Commit-ID: 1Ema7TUNr5v

--HG--
extra : rebase_source : e5bb164dbe19993214e8c16f92b0a1f5d2ff3fa1
2018-04-09 21:12:13 +10:00
Jed Davis 330ff36a4d Bug 1278361 - Step 2: Search-and-replace HANDLE_EINTR(close(...)) to use IGNORE_EINTR. r=froydnj
I've also manually verified that no other references to HANDLE_EINTR are
wrapping a close() in any less syntactically obvious way.

MozReview-Commit-ID: 3KkBwFIhEIq

--HG--
extra : rebase_source : 4e79a70b3be22a7721b6f85b19ee5a31c98df456
2018-04-10 14:36:00 -06:00
Jed Davis ec48124734 Bug 1278361 - Step 1: Update eintr_wrapper.h to bring in IGNORE_EINTR. r=froydnj
This is based on the current security/sandbox/chromium version of eintr_wrapper.h,
taken from upstream commit 937db09514e061d7983e90e0c448cfa61680f605.

I've edited it to remove some things that aren't relevant to us: the
debug-mode loop limit in HANDLE_EINTR, because we don't seem to be
having the problem it's meant to fix and it risks regressions, and
references to Fuchsia, which we don't (yet) support.  I also kept the
original include guards (the file path has changed upstream).

What this patch *does* do is add IGNORE_EINTR and modernize the C++
slightly (using decltype instead of nonstandard typeof).

MozReview-Commit-ID: BO4uQL9jUtf

--HG--
extra : rebase_source : ab3343c6d93e0ce753859217a55af131a0c4ea68
2018-04-10 14:24:27 -06:00
Jed Davis de8c3b42fa Bug 1436156 - CHECK() in Chromium IPC code should be fatal when not fuzzing. r=froydnj
Includes a workaround for bug 1445121.

MozReview-Commit-ID: 4iQqzzECCK8

--HG--
extra : rebase_source : 04906bef5c425fb12d30372aab2df120ce5b2b2d
2018-04-10 12:36:46 -06:00
Nika Layzell 952f6a915a Bug 1443954 - Part 3: Add support for RefCounted types to IPDL, r=bz,froydnj,baku
This patch was reviewed in parts, however the intermediate states would not build:

Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj

Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz

Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz

Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku

Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku

Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj
2018-04-10 17:49:48 -04:00
Nika Layzell c3cbd8710f Bug 1434768 - Part 1: Add Child/ParentSHistory classes which wrap nsISHistory, r=bz 2018-04-10 17:49:44 -04:00
Alex Gaynor 42630ebaff Bug 1449679 - Disable sentinel checking in IPC in debug fuzzing builds. r=jld 2018-03-28 14:26:10 -04:00
Jed Davis 59f1007c8e Bug 1440199 - Part 3: Remove IPC shared memory IDs. r=froydnj
This code isn't blocking anything, but it's dead and I don't think we
have any plans to use it.

MozReview-Commit-ID: KBoEfLceDns

--HG--
extra : rebase_source : 1eee3d961e249939f02d4cc40a707739eb2a596a
2018-02-20 15:09:12 -07:00
Jed Davis 91efa87e62 Bug 1440199 - Part 2: Remove named mode from IPC shared memory. r=froydnj
We're not using named shared memory, and supporting only anonymous
shared memory allows using other backends that are more compatible
with preventing a process from accessing any shared memory it wasn't
explicitly granted (i.e., sandboxing).

Specifically: SharedMemory::Open is removed; SharedMemory::Create no
longer takes a name, no longer has the open_existing option which doesn't
apply to anonymous memory, and no longer supports read-only memory
(anonymous memory which can never have been written isn't very useful).

This patch also fixes some comments in what remains of SharedMemory::Create.

MozReview-Commit-ID: 4kBrURtxq20

--HG--
extra : rebase_source : f6b1fb2fc79b6e9cdd251b3d9041036c0be503f9
2018-02-20 13:07:32 -07:00
Jed Davis 444639dc96 Bug 1440199 - Part 1: Remove Chromium shared memory locks. r=froydnj
This deletes some dead code and removes a dependency on the shared
memory object's name, which will be removed in the next patch (and is
always empty in our usage).

MozReview-Commit-ID: 1ub0nLCBucO

--HG--
extra : rebase_source : 6a29261e00b89773a2f2ace47303d9d9842c089b
2018-02-20 11:49:24 -07:00
Nicholas Nethercote 68124009fc Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium.
This patch replaces the large -intPrefs/-boolPrefs/-stringPrefs flags with
a short-lived, anonymous, shared memory segment that is used to pass the early
prefs.

Removing the bloat from the command line is nice, but more important is the
fact that this will let us pass more prefs at content process start-up, which
will allow us to remove the early/late prefs split (bug 1436911).

Although this mechanism is only used for prefs, it's conceivable that it could
be used for other data that must be received very early by children, and for
which the command line isn't ideal.

Notable details:

- Much of the patch deals with the various platform-specific ways of passing
  handles/fds to children.

  - Linux and Mac: we use a fixed fd (8) in combination with the new
    GeckoChildProcessHost::AddFdToRemap() function (which ensures the child
    won't close the fd).

  - Android: like Linux and Mac, but the handles get passed via "parcels" and
    we use the new SetPrefsFd() function instead of the fixed fd.

  - Windows: there is no need to duplicate the handle because Windows handles
    are system-wide. But we do use the new
    GeckoChildProcessHost::AddHandleToShare() function to add it to the list of
    inheritable handles. We also ensure that list is processed on all paths
    (MOZ_SANDBOX with sandbox, MOZ_SANDBOX without sandbox, non-MOZ_SANDBOX) so
    that the handles are marked as inheritable. The handle is passed via the
    -prefsHandle flag.

  The -prefsLen flag is used on all platforms to indicate the size of the
  shared memory segment.

- The patch also moves the serialization/deserialization of the prefs in/out of
  the shared memory into libpref, which is a better spot for it. (This means
  Preferences::MustSendToContentProcesses() can be removed.)

MozReview-Commit-ID: 8fREEBiYFvc

--HG--
extra : rebase_source : 7e4c8ebdbcd7d74d6bd2ab3c9e75a6a17dbd8dfe
2018-02-16 17:54:16 +11:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Alex Gaynor 0d04153faf Bug 1407693 - Part 1 - Expose method for sharing a HANDLE to a child process in the sandboxing API; r=bobowen
MozReview-Commit-ID: 3LBCzPS6Mzg

--HG--
extra : rebase_source : 7e1ea157eeea5810ad21d781e93b7046aebf2bd6
2017-11-27 14:34:48 -06:00
Andreea Pavel 93f2f80c9d Backed out 2 changesets (bug 1407693) for windows mingw32 bustages at /builds/worker/workspace/build/src/ipc/glue/GeckoChildProcessHost.cpp:1032 on a CLOSED TREE
Backed out changeset 9c3346021c21 (bug 1407693)
Backed out changeset f18e1e557cf6 (bug 1407693)
2018-02-07 21:42:47 +02:00
Alex Gaynor fe879d087a Bug 1407693 - Part 1 - Expose method for sharing a HANDLE to a child process in the sandboxing API; r=bobowen
MozReview-Commit-ID: 3LBCzPS6Mzg

--HG--
extra : rebase_source : 70b31bde82bfd3721b75cc9dc7171b2c1efc5f9f
2017-11-27 14:34:48 -06:00
arthur.iakab c4dd80eca3 Merge mozilla-central to autoland 2018-01-31 00:41:58 +02:00
Jim Chen ffe5a4900b Bug 1428182 - 5. Update libevent patch for Android builds; r=froydnj
Support for accept4 and arc4random_buf depends on which set of NDK
headers we're using. accept4 is supported for API >= 21 for unified and
non-unified headers. arc4random_buf is supported for API >= 21 if using
non-unified headers, and it's always supported if using unified headers
(the unified headers provide shims for API < 21).

MozReview-Commit-ID: FY8n5jWXB1K

--HG--
rename : ipc/chromium/src/third_party/libevent/patches/android-arc4random-buf.patch => ipc/chromium/src/third_party/libevent/patches/android-api-level.patch
extra : rebase_source : 45ec28ca03ba877d9e0911bde081df7d9cb2d3d2
2018-01-30 14:08:23 -05:00
Petr Sumbera 6c6e2604c1 Bug 1434328 - process_util_linux.cc with fork_delegate should build on Solaris too r=jld 2018-01-30 08:47:26 -08:00
Cosmin Sabou c6a0d55423 Backed out 11 changesets (bug 1428182) for build bustages on pixman-inlines.h:29:10 on a CLOSED TREE
Backed out changeset 84c767de6202 (bug 1428182)
Backed out changeset 429433caa78c (bug 1428182)
Backed out changeset c576e9d1f68f (bug 1428182)
Backed out changeset 092662eab5eb (bug 1428182)
Backed out changeset 4dd7eaff3ab5 (bug 1428182)
Backed out changeset fbbb0745b139 (bug 1428182)
Backed out changeset 1d1278b289b7 (bug 1428182)
Backed out changeset 55891ffb3768 (bug 1428182)
Backed out changeset 4655e1b1b237 (bug 1428182)
Backed out changeset 377eada51b3c (bug 1428182)
Backed out changeset 17c0e373d921 (bug 1428182)

--HG--
rename : ipc/chromium/src/third_party/libevent/patches/android-api-level.patch => ipc/chromium/src/third_party/libevent/patches/android-arc4random-buf.patch
2018-01-30 01:22:33 +02:00
Jim Chen dbaea867e2 Bug 1428182 - 5. Update libevent patch for Android builds; r=froydnj
Support for accept4 and arc4random_buf depends on which set of NDK
headers we're using. accept4 is supported for API >= 21 for unified and
non-unified headers. arc4random_buf is supported for API >= 21 if using
non-unified headers, and it's always supported if using unified headers
(the unified headers provide shims for API < 21).

MozReview-Commit-ID: FY8n5jWXB1K

--HG--
rename : ipc/chromium/src/third_party/libevent/patches/android-arc4random-buf.patch => ipc/chromium/src/third_party/libevent/patches/android-api-level.patch
extra : rebase_source : a8974cb1e8e71a8c951754ca9902fff28c099031
2018-01-29 17:38:13 -05:00
Jed Davis 6cc01043ce Bug 1401062 - Create Linux child processes with clone() for namespace/chroot sandboxing. r=gcp
Namespace isolation is now handled by using clone() at process creation
time, rather than calling unshare.

pthread_atfork will no longer apply to sandboxed child processes.
The two significant uses of it in Firefox currently are to (1) make
malloc work post-fork, which we already avoid depending on in IPC and
sandboxing, and (2) block SIGPROF while forking, which is taken care of;
see SandboxFork::Fork for details.  Note that if we need pthread_atfork
in the future it could be emulated by symbol interposition.

clone() is called via glibc's wrapper, for increased compatibility vs.
invoking the syscall directly, using longjmp to recover the syscall's
fork-like semantics the same way Chromium does; see comments for details.

The chroot helper is reimplemented; the general approach is similar,
but instead of a thread it's a process cloned with CLONE_FS (so the
filesystem root is shared) from the child process before it calls
exec, so that it still holds CAP_SYS_CHROOT in the newly created user
namespace.  This does mean that it will retain a CoW copy of the
parent's address space until the child starts sandboxing, but that is a
relatively short period of time, so the memory overhead should be small
and short-lived.

The chrooting now happens *after* the seccomp-bpf policy is applied;
previously this wasn't possible because the chroot thread would have
become seccomp-restricted and unable to chroot.  This fixes a potential
race condition where a thread could try to access the filesystem after
chrooting but before having its syscalls intercepted for brokering,
causing spurious failure.  (This failure mode hasn't been observed in
practice, but we may not be looking for it.)

This adds a hidden bool pref, security.sandbox.content.force-namespace,
which unshares the user namespace (if possible) even if no sandboxing
requires it.  It defaults to true on Nightly and false otherwise, to
get test coverage; the default will change to false once we're using
namespaces by default with content.

MozReview-Commit-ID: JhCXF9EgOt6

--HG--
rename : security/sandbox/linux/LinuxCapabilities.cpp => security/sandbox/linux/launch/LinuxCapabilities.cpp
rename : security/sandbox/linux/LinuxCapabilities.h => security/sandbox/linux/launch/LinuxCapabilities.h
extra : rebase_source : f37acacd4f79b0d6df0bcb9d1d5ceb4b9c5e6371
2017-10-06 17:16:41 -06:00
Heiher 245134e169 Bug 1430745 - IPC: Fix unaligned accesses in DirReaderLinux. r=froydnj
---
 ipc/chromium/src/base/dir_reader_linux.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
2018-01-17 23:17:28 +08:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Jan Beich 0d6100b8a4 Bug 1428950 - Unbreak build on BSDs after bug 1297740. r=gcp
--HG--
extra : rebase_source : f1fd0a89d72fbe812ff706e17dff18c001fe4aef
2018-01-09 02:13:20 +00:00
Gian-Carlo Pascutto 61cf15cc85 Bug 1297740. r=jld 2018-01-08 10:07:16 +01:00
Coroiu Cristina ebae541f60 Backed out 1 changesets (bug 1297740) for mingw32 build failure at src/ipc/chromium/src/base/process_util_win.cc r=backout on a CLOSED TREE
Backed out changeset e2501f2e295e (bug 1297740)
2018-01-06 00:59:25 +02:00
Gian-Carlo Pascutto 3178a4003d Bug 1297740. r=jld
--HG--
extra : rebase_source : 1d7bd987eed365bf442ed7eb856d8413af3205dc
2018-01-04 15:37:33 +01:00
Andrew McCreight 0b3352e605 Bug 1426513, part 3 - Remove CPU and TimeTicks::HighResNow. r=jld
CPU is only used on Windows, for TimeTicks::HighResNow, but the latter
is not used, so remove them all.

MozReview-Commit-ID: CvV1gMrVRA5

--HG--
extra : rebase_source : 2a512e2cfbe7d734a2c806214a2a96f79cbc9f11
2017-12-20 14:06:44 -08:00
Andrew McCreight f301d2f896 Bug 1426513, part 2 - Remove SysInfo. r=jld
MozReview-Commit-ID: AzNOH8mJqEY

--HG--
extra : rebase_source : 86c7fdc8d5c1f9e5873b2e206f854cbbfbc16a34
2017-12-20 13:51:57 -08:00
Andrew McCreight e2c8b28f84 Bug 1426513, part 1 - Remove ProcessMetrics and ProcessFilter. r=jld
MozReview-Commit-ID: 7991I7JtkIw

--HG--
extra : rebase_source : f4b04d9b3bd1b752363aef8628133f359038c361
2017-12-20 13:43:01 -08:00
Coroiu Cristina 72aaaf526b Backed out 3 changesets (bug 1426513) for bustage at /src/base/process_util_posix.cc r=backout on a CLOSED TREE
Backed out changeset 693bb500fc25 (bug 1426513)
Backed out changeset 64021383118d (bug 1426513)
Backed out changeset 9d80a554866c (bug 1426513)
2017-12-21 20:59:02 +02:00
Andrew McCreight 7b5bcc482d Bug 1426513, part 3 - Remove CPU and TimeTicks::HighResNow. r=jld
CPU is only used on Windows, for TimeTicks::HighResNow, but the latter
is not used, so remove them all.

MozReview-Commit-ID: CvV1gMrVRA5

--HG--
extra : rebase_source : 60ddcf6ea5542f4526a23d739a2fe754219e5b9f
2017-12-20 14:06:44 -08:00
Andrew McCreight 52848c69fb Bug 1426513, part 2 - Remove SysInfo. r=jld
MozReview-Commit-ID: AzNOH8mJqEY

--HG--
extra : rebase_source : 4ccb092c7eb4aca89e913505f52c5b00484730d8
2017-12-20 13:51:57 -08:00
Andrew McCreight e2a7d9b7b9 Bug 1426513, part 1 - Remove ProcessMetrics and ProcessFilter. r=jld
MozReview-Commit-ID: 7991I7JtkIw

--HG--
extra : rebase_source : 75e56f918a6e276b114ed8ea154f2686915ee8ac
2017-12-20 13:43:01 -08:00
Andrew McCreight ab7fa64021 Bug 1410209, part 4 - Add names to some IPC runnables. r=kanru
This patch requires that each instance of IPC's RunnableFunction is
passed in a name, like the non-IPC RunnableFunction.

MozReview-Commit-ID: Atu1W3Rl66S

--HG--
extra : rebase_source : f932d7597a26a3f0c4246b3a95df638860d3d32d
2017-10-27 13:39:28 -07:00
Andrew McCreight b01441d8e5 Bug 1426284 - Remove TransportDIB files. r=jld
PluginMessageUtils.h was bootlegging base/shared_memory.h via transport_dib.h

MozReview-Commit-ID: CPGxu2lpdj0

--HG--
extra : rebase_source : 796c747a4a125dddc2a0685f1e0d0152ac3ef74f
2017-12-19 12:40:41 -08:00
Sylvestre Ledru 5de63ef061 Bug 1394734 - Replace CONFIG['MSVC'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 5orfnoude7h

--HG--
extra : rebase_source : 1ed9a6b56e1d27221a07624767a7fb0e6147117f
2017-12-08 13:46:13 +01:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Jeff Muizelaar fba16646be Bug 1379680. Add an ipc ByteBuf type. r=billm
This adds a ByteBuf type that can be sent by taking
ownership of its buffer instead of having to make a copy.
2017-11-29 10:11:15 -05:00
Jeff Muizelaar 07d53bd660 Bug 1379680. Add a way to append buffers to a BufferList. r=billm 2017-11-29 10:11:13 -05:00
Mike Hommey a1f665f7e9 Bug 1417309 - Remove the nscore.h include from basictypes.h. r=froydnj
This is a hack that was added back when the chromium ipc codebase was
imported, but that shouldn't be required anymore. The mozalloc operator
new is gotten through stl wrapping these days.
2017-11-16 08:37:34 +09:00
Jed Davis c7f8a32bf4 Bug 1401786 - Move base::LaunchApp options into a LaunchOptions struct, like upstream Chromium. r=billm
MozReview-Commit-ID: 74IXV4oGeWR

--HG--
extra : rebase_source : ef4021a60506a8fc5fa5a35e3f3fefb9dbad75d6
2017-09-08 20:35:06 -06:00
Sylvestre Ledru aedb2fa4c6 Bug 1415543 - Remove some Chromium unused files (platform_file_*.cc thread_local_storage_*.cc) r=jld
MozReview-Commit-ID: FY6YZ7TqfjG

--HG--
extra : rebase_source : 21dc0e5f7c7fa50d6a5b4826a54f40314eae69a8
2017-11-07 14:54:51 +01:00
Sylvestre Ledru 79a24b6820 Bug 1414631 - Remove the Chromium Process class r=jld
MozReview-Commit-ID: B5NmJPQhGYm

--HG--
extra : rebase_source : 686a0877def17a2d79b33f912f20ccbd7228a4cf
2017-11-07 14:57:23 +01:00
Andrew McCreight 2f7ae795af Bug 1412138 - Re-fix mode lines in ipc/chromium and ipc/glue. r=kanru
--HG--
extra : rebase_source : 0f12dc7af00745cf83a93b1faa516f51ff293cc2
2017-10-26 16:05:47 -07:00
Chris Manchester c86173526a Bug 1403346 - Replace all uses of ALLOW_COMPILER_WARNINGS with a template, remove ALLOW_COMPILER_WARNINGS. r=glandium
MozReview-Commit-ID: 1G2o4fy74cf
2017-10-25 15:12:09 -07:00
Jed Davis 70736cfb1b Bug 1401790 - Remove ProcessArchitecture from IPC. r=billm,jimm
This was used to support cross-architecture NPAPI plugins on OS X, but
we stopped supporting that in 54 (bug 1339182).

MozReview-Commit-ID: 2BcWYD6mguY

--HG--
extra : rebase_source : 6e509a3cc1f356ccd24f1459c43bc8fb66d7b0f4
2017-10-04 20:31:12 -06:00
Jed Davis 84c3a8a672 Bug 1400061 - Stop using SetAllFDsToCloseOnExec when launching processes on OS X. r=billm
As its original comments indicate, SetAllFDsToCloseOnExec has an
unavoidable race condition if another thread creates file descriptors
during launch.  Instead, use POSIX_SPAWN_CLOEXEC_DEFAULT, which is an
Apple-specific extension to posix_spawn that accomplished the desired
effect atomically.

This patch also introduces some RAII to simplify cleanup in error cases.

MozReview-Commit-ID: 6oHggs77AiY

--HG--
extra : rebase_source : a9391031a95fee4977af800ca993871277db51ce
2017-10-04 19:39:54 -06:00
Jed Davis a9b7865141 Bug 1316153 - Remove base::ChildPrivileges from IPC. r=billm,bobowen
ChildPrivileges is a leftover from the B2G process model; it's now
mostly unused, except for the Windows sandbox using it to carry whether
a content process has file:/// access.

In general, when sandboxing needs to interact with process launch, the
inputs are some subset of: the GeckoProcessType, the subtype if content,
various prefs and even GPU configuration; and the resulting launch
adjustments are platform-specific.  And on some platforms (e.g., OS X)
it's all done after launch.  So a simple enum used cross-platform isn't
a good fit.

MozReview-Commit-ID: K31OHOpJzla

--HG--
extra : rebase_source : 3928b44eb86cd076bcac7897536590555237b76b
2017-09-08 16:16:50 -06:00
Jed Davis 6f041840ce Bug 1259852 - Merge Linux/BSD/Mac child process environment handling. r=billm f=jbeich
This is mostly based on the BSD version, which in turn is more or less
the Mac version minus some race conditions.  The Linux version does
something similar, but more verbosely and (at least in my opinion) is
harder to follow.  Some changes have been made, mainly to use C++11
features like UniquePtr.

MozReview-Commit-ID: 3Gv4DKCqWvu

--HG--
extra : rebase_source : 972264a778b9361d1259851554b5b7ae8f3dcdc6
2017-09-15 11:18:43 -06:00
Nicholas Nethercote 8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Jed Davis cf40bed720 Bug 1397928 - Remove some unused type definitions from process_util. r=billm
MozReview-Commit-ID: I30AUWYOPwi

--HG--
extra : rebase_source : 4183336bd3e1f0055366ebddf39cd1f518e2b139
2017-08-28 12:45:29 -06:00
Petr Sumbera cd2a716e79 Bug 1402851 - ipc/chromium/moz.build needs some stuff for Solaris too. r=glandium 2017-09-25 06:53:41 -07:00
Kan-Ru Chen 9016ef6cef Bug 1397456 - Always use static name for ipc messages r=billm
Never store names in Message. One can get string names from
Message::name() or use IPC::StringFromIPCMessageType() when only
message id is available.

MozReview-Commit-ID: 15ksx6SE90c

--HG--
extra : rebase_source : 1a041dc365b7f42edd540d8c7a4dfd8912e48921
2017-09-14 16:08:57 +08:00
Markus Stange 6aae3892e2 Bug 1401305 - Fix TaskTracer build failure. r=froydnj
MozReview-Commit-ID: 62KhOTwvxuZ

--HG--
extra : rebase_source : 6e870da2a216d717e4dea7063b6991eb44caa8d4
2017-09-19 15:15:36 -04:00
Nathan Froyd 37cbcb454b Bug 1397823 - part 4 - reduce codesize for IPDL IPC::Message creation; r=kanru
Each protocol in IPDL has a bunch of autogenerated functions that
instantiate IPC::Message with various parameters.  Each of these
functions, then:

1) Pays the cost of calling malloc()
2) Setting up various parameters
3) Calling IPC::Message()

There's no reason that we should be duplicating 1) across all of these
autogenerated functions.  In step 2), several of the parameters we're
setting up are common across all or nearly all calls: the message
segment size is almost always zero, and we're always indicating that
IPDL-generated messages should be recorded in telemetry.

Instead of duplicating that code several thousand times, we can add a
small helper function that takes the only interesting parameters for an
IPDL message.  This helper function can then deal with calling malloc in
a single place and setting up the common parameters.  For messages that
require a custom segment size, we'll have to use the old scheme, but
such messages are uncommon.

The previous changes are not required for this scheme to work, but they
do help significantly, as the helper function (Message::IPDLMessage) can
now take four parameters, which ensures that its arguments are passed
solely in registers on Win64 and ARM.  The wins from this change are
also larger than they would be without the previous parts: ~100K on
x86-64 Linux (!)  and ~80K on ARM Android.
2017-09-15 08:06:11 -04:00
Nathan Froyd a697f87d36 Bug 1397823 - part 3 - do a better job setting IPC::Message flags; r=kanru
The current IPC::Message constructor takes a large number of arguments,
three of which--the nesting level, the priority, and the
compression--are almost always constant by virtue of the vast majority
of Message construction being done by auto-generated IPDL code.  But
then we take these constant values into the Message constructor, we
check them for various values, and then based on those values, we
perform a bunch of bitfield operations to store flags based on those
values.  This is wasted work.

Furthermore, for replies to IPDL messages, we'll construct a Message
object, and then call mutating setters on the Message object that will
perform even more bitfield manipulations.  Again, these operations are
performing tasks at runtime that are the same every single time, and use
information we already have at compile time.

The impact of these extra operations is not large, maybe 15-30K of extra
code, depending on platform.  Nonetheless, we can easily make them go
away, and make everything cleaner to boot.

This patch adds a HeaderFlags class that encapsulates all the knowledge
about the various kinds of flags Message needs to know about.  We can
construct HeaderFlags objects with strongly-typed enum arguments for the
various kinds of flags, and the compiler can take care of folding all of
those flags together into a constant when possible (and it is possible
for all the IPDL-generated code that instantiates Messages).  The upshot
is that we do no unnecessary work in the Message constructor itself.  We
can also remove various mutating operations on Message, as those
operations were only there to support post-constructor flag twiddling,
which is no longer necessary.
2017-09-15 08:06:11 -04:00
Doug Thayer d01cafd325 Bug 1397376 - Avoid copying on initializing histogram ranges r=gfritzsche
Since LinearHistogram and its descendants inherit ranges_ from
Histogram, and we wanted to replace the copying into a std::vec
for Histogram, the simplest approach seemed to just be to
precompute ranges for all histograms, exponential or otherwise.
This should have the added benefit of reducing the memory
footprint for those histograms, since they will benefit from the
deduplication work that the precomputing script already does.

MozReview-Commit-ID: JTV5Dej5ZIb

--HG--
extra : rebase_source : de942d54b3475be54c70d43d2fa8e772ee2e18c4
2017-09-08 12:13:44 -07:00
Nathan Froyd d549d65f97 Bug 1396869 - eliminate -Wunused-private-field warnings in Android's message pump; r=jld
Android's MessagePumpForUI includes some useless code in its
MessagePumpAndroid class, which is completely unused.  Let's go ahead
and delete that.
2017-09-06 13:10:33 -04:00
Petr Sumbera 61bd1ae7d9 Bug 1392203 - Make internal libevent work on Solaris. r=glandium 2017-08-23 03:40:23 -07:00
Bill McCloskey c0ec174576 Bug 1391848 - Use nsIEventTarget instead of nsIThread for MessageLoop/Pump (r=kanru)
MozReview-Commit-ID: 8op94arX6FE
2017-08-25 10:28:23 -07:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Stone Shih de7f705042 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Doug Thayer a70aac6a11 Bug 1388748 - Don't resize histogram ranges on init r=gfritzsche
We were using std::vector::assign, which resizes the vector to
match the incoming data. This isn't what we want, as ranges_ has
already been sized to bucket_count_ + 1. Instead, just use a
copy.

MozReview-Commit-ID: EGuW5jj7Rpq

--HG--
extra : rebase_source : 616d61fc27c7e43c22ea69e11e070ba958bf20a9
2017-08-09 10:21:09 -07:00
Mike Hommey 889e867916 Bug 1388981 - Fixup EVENT__SIZEOF_OFF_T. r=jld
There are two problems related with EVENT__SIZEOF_OFF_T:
- When building Firefox with -D_FILE_OFFSET_BITS=64, off_t is 64 bits,
  but the in-tree event-config.h still defines EVENT__SIZEOF_OFF_T to 4.
- When building Firefox *without* -D_FILE_OFFSET_BITS=64 (the default)
  against a system libevent that was built with -D_FILE_OFFSET_BITS=64,
  its event-config.h defines EVENT__SIZEOF_OFF_T to 8, which then
  doesn't match off_t size.

For the latter, libevent actually defines its own off_t type, that
callers are supposed to use instead of off_t. So that's what our
static_assert should be checking.

--HG--
extra : rebase_source : 4231530e3c260b2cdd53e15206d48ef0779e394c
2017-08-10 14:03:08 +09:00
Doug Thayer d8e7d5c150 Bug 1383210 - Use precomputed histogram buckets r=gfritzsche
The log and exp calls in base::Histogram::InitializeBucketRange()
were showing up in profiles. This patch uses the precomputed
buckets for exponential histograms instead of computing them at
runtime. Though linear histograms do show up in the profile that
prompted this change, they contribute much less, and due to the
trivial nature of generating these, it's unlikely that a static
cache would provide much if any speedup.

MozReview-Commit-ID: IavFwoWjFhk

--HG--
extra : rebase_source : ad7d641ab2982f5cf8d202c7c382bfc26daa4bd5
2017-08-04 10:02:28 -07:00
Wes Kocher 4550ccb5d1 Backed out changeset 277c7e4952a8 (bug 1383210) for flake8 failures a=backout
MozReview-Commit-ID: 3j1ROBxjf2Z
2017-08-08 12:38:41 -07:00
Doug Thayer b31336cbe3 Bug 1383210 - Use precomputed histogram buckets r=gfritzsche
The log and exp calls in base::Histogram::InitializeBucketRange()
were showing up in profiles. This patch uses the precomputed
buckets for exponential histograms instead of computing them at
runtime. Though linear histograms do show up in the profile that
prompted this change, they contribute much less, and due to the
trivial nature of generating these, it's unlikely that a static
cache would provide much if any speedup.

MozReview-Commit-ID: IavFwoWjFhk

--HG--
extra : rebase_source : 18101da322faf9477acae266e9e27f579464f8d0
2017-08-04 10:02:28 -07:00
Nathan Froyd 0e2d3cda96 Bug 1387134 - out-of-line type-specific Pickle::Write* methods; r=billm
Having these functions declared in the class definition and therefore
inlined means that every call site is bloated by having to store the
argument so its address can be taken and load the sizeof() constant.
There's no good reason that we should be doing this; the Read*
counterparts are also out-of-lined, which hasn't seemed to cause any
problems.  Moving these out-of-line saves about 200K (!) of space on
x86-64 Linux.
2017-08-04 17:12:38 -04:00
Dean deef8d264a Bug 1381470 - Added a less memory consuming method to tell if a histogram is empty. r=chutten 2017-07-31 21:38:48 +02:00
Carsten "Tomcat" Book de369deb98 Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
Carsten "Tomcat" Book 198430bca2 merge mozilla-inbound to mozilla-central a=merge 2017-07-26 11:11:40 +02:00
Bill McCloskey c590d9adb8 Bug 1383322 - Allow changing the current MessageLoop (r=dvander)
MozReview-Commit-ID: 1kyHqrhOzjF
2017-07-25 19:52:29 -07:00
Christoph Diehl 8f5475d68d Bug 1382234 - Disable MOZ_PICKLE_SENTINEL_CHECKING in --enable-fuzzing builds. r=billm 2017-07-22 07:08:25 +00:00
Markus Stange 95eccb68b1 Bug 1382908 - Make TaskTracer build and run again. r=billm
MozReview-Commit-ID: 8SqBWgOXc6H

--HG--
extra : rebase_source : 4b5cbb34740ebd439431188dd8c6df02eeee3969
2017-07-24 18:35:07 -04:00
Chris H-C d85e538902 bug 1366294 - Part 11 - Fix OSX Build. r=gfritzsche
MozReview-Commit-ID: DSljXr8ZRhy
2017-07-24 09:52:26 -04:00
Chris H-C 6f04d378e5 bug 1366294 - Part 9 - Fix Windows Build. r=gfritzsche
MozReview-Commit-ID: 8P2W8fD2xNi
2017-07-24 09:52:26 -04:00
Georg Fritzsche 3a649263e4 Bug 1366294 - Part 3 - Refactor TelemetryHistogram storage. r=chutten
Previously we used the base::StatisticsRecorder object for storage by name.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.

In this re-write, we instead introduce the following lookup paths (managed in TelemetryHistogram.cpp):
- Main storage:
  - (histogramId, processId, sessionOrSubsession) -> Histogram*
  - (histogramId, processId) -> KeyedHistogram* (this handles subsessions internally)
- Lookup:
  - (histogramName) -> histogramId
  - (HistogramID) -> bool (is recording enabled for this histogram?)

This is wrapped with a few lookup functions.

This also allows us to keep HistogramIDs in the JS histogram instances now, instead of pointers to Histogram instances.
That means Histogram instance life-time management is now properly contained inside TelemetryHistogram.cpp.

MozReview-Commit-ID: 5yijGv7mc89
2017-07-24 09:52:26 -04:00
Georg Fritzsche 681bd8d85a Bug 1366294 - Part 2 - Cleanup Chromium Histogram code. r=chutten
- A histogram name identifies a set of histogram instances, for which storage and lookup will be handled in TelemetryHistogram.cpp.
  So we remove the names from histogram code.
- Various unused macros in the header are removed.
- Remaining traces of StatisticsRecorder are removed from the Histogram class code.
- Some unused methods are dropped that were about printing histograms to ASCII etc.

MozReview-Commit-ID: BF2rLSpKOJ8
2017-07-24 09:52:26 -04:00
Georg Fritzsche 09d533dae9 Bug 1366294 - Part 1 - Remove base::StatisticsRecorder. r=chutten
The Chromium IPC histogram code used the StatisticsRecorder object for storage.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.
Consequently we need to rewrite this storage, which means StatisticsRecorder is not used anymore.

MozReview-Commit-ID: 1LC7YubpKaD
2017-07-24 09:52:26 -04:00
Lee Salzman e6656c5e8b Bug 1380530 - don't allow new tasks to be posted to MessageLoop when it is shutting down. r=billm
MozReview-Commit-ID: KsXK7UPIO4P
2017-07-21 11:33:53 -04:00
Sebastian Hengst 838439065a Backed out changeset e3825e35e2e2 (bug 1366294) for crashing various tests with [@ TelemetryHistogram::DeInitializeGlobalState()], e.g. in bc's browser_permission_dismiss.js. r=backout on a CLOSED TREE 2017-07-21 15:21:49 +02:00
Sebastian Hengst 6e8c3ee29f Backed out changeset df6adc4c95f2 (bug 1366294) 2017-07-21 15:20:16 +02:00
Sebastian Hengst 60fe11dece Backed out changeset ed0027bb1187 (bug 1366294) 2017-07-21 15:20:11 +02:00
Sebastian Hengst 3a5a4516ab Backed out changeset 0ed44ecf9062 (bug 1366294) 2017-07-21 15:19:41 +02:00
Sebastian Hengst ae069ab9d5 Backed out changeset 140948f5b955 (bug 1366294) 2017-07-21 15:19:31 +02:00
Chris H-C 5572efbe7a bug 1366294 - Part 11 - Fix OSX Build. r=gfritzsche
MozReview-Commit-ID: DSljXr8ZRhy
2017-07-21 08:41:44 -04:00
Chris H-C 94b0e907b6 bug 1366294 - Part 9 - Fix Windows Build. r=gfritzsche
MozReview-Commit-ID: 8P2W8fD2xNi
2017-07-21 08:41:44 -04:00
Georg Fritzsche 8eb19e8693 Bug 1366294 - Part 3 - Refactor TelemetryHistogram storage. r=chutten
Previously we used the base::StatisticsRecorder object for storage by name.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.

In this re-write, we instead introduce the following lookup paths (managed in TelemetryHistogram.cpp):
- Main storage:
  - (histogramId, processId, sessionOrSubsession) -> Histogram*
  - (histogramId, processId) -> KeyedHistogram* (this handles subsessions internally)
- Lookup:
  - (histogramName) -> histogramId
  - (HistogramID) -> bool (is recording enabled for this histogram?)

This is wrapped with a few lookup functions.

This also allows us to keep HistogramIDs in the JS histogram instances now, instead of pointers to Histogram instances.
That means Histogram instance life-time management is now properly contained inside TelemetryHistogram.cpp.

MozReview-Commit-ID: 5yijGv7mc89
2017-07-21 08:41:44 -04:00
Georg Fritzsche f4c024d936 Bug 1366294 - Part 2 - Cleanup Chromium Histogram code. r=chutten
- A histogram name identifies a set of histogram instances, for which storage and lookup will be handled in TelemetryHistogram.cpp.
  So we remove the names from histogram code.
- Various unused macros in the header are removed.
- Remaining traces of StatisticsRecorder are removed from the Histogram class code.
- Some unused methods are dropped that were about printing histograms to ASCII etc.

MozReview-Commit-ID: BF2rLSpKOJ8
2017-07-21 08:41:44 -04:00
Georg Fritzsche e6a136758b Bug 1366294 - Part 1 - Remove base::StatisticsRecorder. r=chutten
The Chromium IPC histogram code used the StatisticsRecorder object for storage.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.
Consequently we need to rewrite this storage, which means StatisticsRecorder is not used anymore.

MozReview-Commit-ID: 1LC7YubpKaD
2017-07-21 08:41:44 -04:00
Stone Shih 9573b6e439 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Nicholas Nethercote 9b33b50478 Bug 1382099 - Remove MOZ_WIDGET_GONK from ipc/. r=jld.
--HG--
extra : rebase_source : fab4cc67bb4d9911e9ca4f9062bfaa2772a1da4f
2017-07-21 10:45:49 +10:00
Henry Chang 6d648badcb Bug 1348591 - Support custom default segment buffer list size. r=billm
MozReview-Commit-ID: 2Nkj6RPx62f

--HG--
extra : rebase_source : 4e763563e3f9e9927314e804ba4e0fbd291fc9e8
2017-06-21 17:55:13 +08:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Nicholas Nethercote 033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Chris Peterson 5cac01578b Bug 1373525 - ipc: Remove unused classes EmptyStrings and InitUDPSocketParentCallback. r=dvander
ipc/chromium/src/base/string_util.cc:35:3 [-Wunused-member-function] unused member function 'EmptyStrings'
ipc/glue/BackgroundParentImpl.cpp:405:3: warning: unused member function 'InitUDPSocketParentCallback' [-Wunused-member-function]

The class InitUDPSocketParentCallback was added in bug 1109338. It wasn't used then and it isn't used now.

https://hg.mozilla.org/mozilla-central/rev/eefcbe8e6a0c

MozReview-Commit-ID: BfDbQ5dfgo8

--HG--
extra : source : 7411baa0c64638b9da7de813c578fe9505625690
extra : intermediate-source : 975014d05919be2c9c6a0672c1ae94da86ccb29b
2017-06-11 00:14:49 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Kan-Ru Chen 2025397d67 Bug 1373603 - Initialize the mEventTarget after we setup MessageLoop::current() to silence a DCHECK. r=billm
MozReview-Commit-ID: EnMm4uhlfQV
2017-06-20 09:07:36 +08:00
Bill McCloskey eee9dad55a Bug 1366072 - Expose an event target for MessageLoop (r=kanru)
MozReview-Commit-ID: 8vWOGO2zzPs
2017-06-13 14:51:05 -07:00
Bill McCloskey bbed3cf3c1 Bug 1366072 - Use nsIRunnable instead of Runnable in MessageLoop (r=kanru)
MozReview-Commit-ID: 9LmBghd0D46
2017-06-13 14:51:03 -07:00
Nicholas Nethercote 0be77baa96 Bug 1370329 (part 1) - Clean up the profiler's RAII classes. r=mstange.
This patch does the following renamings, which increase consistency.

- GeckoProfilerInitRAII -> AutoProfilerInit
- GeckoProfilerThread{Sleep,Wake}RAII -> AutoProfilerThread{Sleep,Wake}
- GeckoProfilerTracingRAII -> AutoProfilerTracing
- AutoProfilerRegister -> AutoProfilerRegisterThread
- ProfilerStackFrameRAII -> AutoProfilerLabel
- nsJSUtils::mProfilerRAII -> nsJSUtils::mAutoProfilerLabel

Plus a few other minor ones (e.g. local variables).

The patch also add MOZ_GUARD_OBJECT macros to all the profiler RAII classes
that lack them, and does some minor whitespace reformatting.

--HG--
extra : rebase_source : 47e298fdd6f6b4af70e3357ec0b7b0580c0d0f50
2017-06-07 12:33:19 +10:00
Randell Jesup 450c4d90a1 Bug 1341285: rollup of changes for webrtc after applying webrtc.org v57 update r=ng,jesup,pehrsons,drno,dminor,cpearce,jya,glandium,dmajor
Includes re-importing gyp files removed from upstream in v56, and then
updating them to match the BUILD.gn file changes.

--HG--
rename : media/webrtc/trunk/webrtc/call/audio_send_stream.cc => media/webrtc/trunk/webrtc/call/audio_send_stream_call.cc
2017-06-13 01:54:13 -04:00
Petr Sumbera 274de19ad9 Bug 1364865 - process_util.h should use _POSIX_PATH_MAX instead of NAME_MAX. r=billm 2017-05-15 04:31:55 -07:00
Cervantes Yu 26a4bb3385 Bug 1365203 - Annotate name of base::Thread in the crash report. r=gsvelto
This adds the call NS_SetCurrentThreadName() to the thread created using
base::Thread (e.g. the Compositor thread) so that the name gets annotated in the
crash report and displayed on socorro.

MozReview-Commit-ID: 9bNeHlhbicA

--HG--
extra : amend_source : a7c0c09e7fa057df4c0e212e1579961c3f9617b1
extra : histedit_source : 8919f69bc68861858105efed12cc0a37404b38b0
2017-05-17 14:25:09 +08:00
Ryan VanderMeulen 64fe0d9416 Bug 1360264 - Update libevent to 2.1.8-stable. r=billm
--HG--
extra : rebase_source : 82d7bf7e67e822cb8d09a30d52c89516673dcc55
2017-05-11 20:14:23 -04:00
Kevin Chen aa4fe616d0 Bug 1343754 - Add a function for replacing event target for actor and label PTexture; r=bevistseng,billm,nical
MozReview-Commit-ID: KGVBWsexkqC

--HG--
extra : rebase_source : 2ae5e2aa2e54cb2c368310ebdb1fdcbcae3092f4
2017-03-21 03:57:56 +00:00
Sebastian Hengst 0d8a182804 Backed out changeset 25f2e9e2068d (bug 1343754) for crashing e.g. in dom/workers/test/serviceworkers/test_fetch_integrity.html. r=backout 2017-05-03 12:59:36 +02:00
Kevin Chen bdb02a828a Bug 1343754 - Add a function for replacing event target for actor and label PTexture; r=bevistseng,billm,nical
MozReview-Commit-ID: KGVBWsexkqC

--HG--
extra : rebase_source : 5ac2edced51462fd013f0efba0e434d6a2fc7863
2017-03-21 03:57:56 +00:00
Wes Kocher c90904f9bf Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 9HQViJrDT6S
2017-04-26 17:30:31 -07:00
Nathan Froyd 8bbd081c88 Bug 1359415 - move threadsafety checks inside nsAutoOwningThread; r=erahm
This change moves most of the logic for the threadsafety check into
nsAutoOwningThread, rather than having part of the logic live in
nsAutoOwningThread and part of the logic live in nsDebug.h.  Changing
this also forces us to clean up a couple of places that replicated the
logic that lived in nsDebug.h as well.
2017-04-26 11:41:32 -04:00
Tom Tromey 99f4608655 Bug 1334278 - change mozilla::Smprintf to return a UniquePtr; r=froydnj
Change mozilla::Smprintf and friends to return a UniquePtr, rather than
relying on manual memory management.  (Though after this patch there are
still a handful of spots needing SmprintfFree.)

MozReview-Commit-ID: COa4nzIX5qa

--HG--
extra : rebase_source : ab4a11b4d2e758099bd0794d5c25d799a7e42680
2017-03-03 08:17:27 -07:00
Wes Kocher cb8ce82cca Merge inbound to m-c a=merge 2017-04-19 17:10:04 -07:00
Petr Sumbera df0c2aae53 Bug 1357451 - Add OS_SOLARIS ifdefs to various IPC code. r=kchen
--HG--
extra : rebase_source : 2720ac11f122f267408c2d01ab13ffe0a8181df2
2017-04-18 08:53:59 -07:00
Mike Hommey 34e619d1c1 Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).

--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
2017-04-18 16:56:09 +09:00
Sebastian Hengst 45fe002ab2 Backed out changeset 325bf1bf5a1f (bug 1313200) for Android and reftest bustage. r=backout
--HG--
rename : ipc/ipdl/test/ipdl/ok/AsyncReturn.ipdl => ipc/ipdl/test/ipdl/error/AsyncReturn.ipdl
2017-04-18 18:24:56 +02:00
Kan-Ru Chen 625b54086e Bug 1313200 - Allow IPC messages to async return MozPromises. r=billm,jwwang
This patch implements async returns for IPDL using MozPromises. There
are following changes:

* Initialize AbstractThreads for MessageLoops
* Record promises and their reject functions
  * When async message returns, call their resolve functions
  * When send error or channel close, call their reject functions
* Implement "unresolved-ipc-promises" count for about:memory
* Test cases

See bug attachment for generated code from test cases

MozReview-Commit-ID: 7xmg8gwDGaW

--HG--
rename : ipc/ipdl/test/ipdl/error/AsyncReturn.ipdl => ipc/ipdl/test/ipdl/ok/AsyncReturn.ipdl
extra : rebase_source : 55c4f68a3f8b7d0df5ca9f9c45b9a205b337282d
2017-03-16 17:36:15 +08:00
Bill McCloskey 5c609727dc Bug 1354249 - Use same TabGroup as original tab for print preview (r=mystor)
MozReview-Commit-ID: 5wmjLgq2j5m
2017-04-12 20:17:50 -07:00
Petr Sumbera 0e17adee7c Bug 1354510 - Firefox build should recognize Solaris. r=glandium
--HG--
extra : rebase_source : 2bec2709a26a5295e723b0ecc424b0d648715bb7
2017-04-11 00:01:32 -07:00
Petr Sumbera 3a967bed69 Bug 1353332 - sys_info_posix.cc should declare correctly struct utsname (r=billm)
MozReview-Commit-ID: IwJlsEhfyiw
2017-04-04 14:02:47 -07:00
Petr Sumbera 96aad64ae4 Bug 1345102 - ipc_channel_posix.cc should use OS defined IOV_MAX macro (r=billm)
MozReview-Commit-ID: BmTTbIX6dCx
2017-04-04 12:57:47 -07:00
Thinker K.F. Li 94cf2fab3d Bug 1323076 - Part 3: IPC with flag checking for TaskTracer. r=mstange 2017-03-22 21:46:00 +01:00
Michael Layzell 9b0ad3267d Bug 1346866 - Make the IPC serialization/deserialization time probes main-thread-only, r=billm
MozReview-Commit-ID: 5Sc820Jh494
2017-03-13 19:25:48 -04:00
Michael Layzell 3acb9e3b8a Bug 1342635 - Part 2: Add a telemetry probe for IPDL IPC serialzation time, r=billm
MozReview-Commit-ID: Gyx4QO8f5yx
2017-03-10 09:15:26 -05:00
Michael Layzell 657e5bfebf Bug 1342635 - Part 1: Add a telemetry probe for IPDL IPC deserialization time, r=billm
MozReview-Commit-ID: 8XWFWoRECrC
2017-03-10 09:15:26 -05:00
Thinker K.F. Li 48e9a43dc4 Bug 1331173 - Increase header segment capacity for TaskTracer. r=billm
--HG--
extra : rebase_source : 3cc829ac53c520896d3f28ddf4a8e27a6eac6fc1
2017-03-10 02:35:00 +01:00
Ryan VanderMeulen 5463f0305e Bug 1343453 - Backport some upstream libevent fixes to our in-tree copy. r=billm
Fixes for upstream issues #317, #318, #332, #335, and #340.
2017-03-06 16:43:06 -05:00
Tom Tromey d36cdd04ce Bug 1060419 - make ipc/chromium use Printf.h, r=froydnj
MozReview-Commit-ID: 10spM5oOe5c

--HG--
extra : rebase_source : 2663a309a83a69e846f5a984eb5757e87ade9e3e
2016-12-09 10:16:59 -10:00
Christoph Diehl e7b945296c Bug 1339306 - Faulty: Use --enable-fuzzing instead of --enable-ipc-fuzzing. r=billm
--HG--
extra : rebase_source : ea691b454f4b89ab3bda903b7c4636caf6e1a245
2017-02-14 03:12:10 +01:00
Nicholas Nethercote 334f89c567 Bug 1339327 (part 5) - Rename some profiler functions related to sleeping. r=mstange.
The new names make it clearer that these actions apply to just one thread.

- profiler_sleep_start() --> profiler_thread_sleep()
- profiler_sleep_end()   --> profiler_thread_wake()
- profiler_is_sleeping() --> profiler_thread_is_sleeping()
- GeckoProfilerSleepRAII --> GeckoProfilerThreadSleepRAII
- GeckoProfilerWakeRAII  --> GeckoProfilerThreadWakeRAII
2017-02-15 14:26:23 +11:00
Matt Woodrow 08e918a18b Bug 1325227 - Part 2: Add equality operator to FileDescriptor as it is required by IPDL generated structs. r=billm
MozReview-Commit-ID: 9gD2FA1wGii
2017-02-04 23:18:53 +13:00
Nathan Froyd 47aa24f1f4 Bug 1331205 - update ipc/'s copy of locks and condition variables from Chromium upstream; r=jld
This update is mostly because the upstream implementation is now free of
the gnarly, XP-required implementation of condition variables and
updating both the posix and windows implementations at the same time
seemed easier.
2017-02-03 14:28:58 -05:00
Chris Peterson 9341d66cbd Bug 1333686 - Part 3: Fix -Wmacro-redefined warnings in ipc/chromium. r=jld
The WARN_UNUSED_RESULT macro is defined in multiple Google header files in ipc/chromium and webrtc. Copy the WARN_UNUSED_RESULT definition from the latest security/sandbox/chromium/base/compiler_specific.h to our ipc/chromium code. Also remove the ALLOW_UNUSED macro definition because it is no longer defined in the latest compiler_specific.h and is not used anywhere.

Warning: -Wmacro-redefined in ipc/chromium/src/base/compiler_specific.h: 'WARN_UNUSED_RESULT' macro redefined
ipc/chromium/src/base/compiler_specific.h:73:9: warning: 'WARN_UNUSED_RESULT' macro redefined [-Wmacro-redefined]
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))

media/webrtc/trunk/webrtc/typedefs.h:152:9: note: previous definition is here
#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))

MozReview-Commit-ID: EUIlXGKLhDL

--HG--
extra : rebase_source : f252b7b36824f6e4f11fdf6e543dd760ac90e81e
extra : histedit_source : 870eaf4875e954c16e3a951ffea73102ffff2436
2017-01-16 19:14:52 -08:00
Masatoshi Kimura 96cc4073b0 Bug 1325299 - Don't explicitly set PSAPI_VERSION. r=glandium
WINVER=0x0601 implies PSAPI_VERSION=2. We should not mix PSAPI_VERSION.

MozReview-Commit-ID: Ckxel4JNW2x

--HG--
extra : rebase_source : 3dc221ca67642ea810cb353869f76b82c40c7bf3
2016-12-30 01:29:52 +09:00
Phil Ringnalda 4711cdb9fd Backed out 4 changesets (bug 1333686) for ASan/static warnings-as-errors
CLOSED TREE

Backed out changeset 154ee971feb7 (bug 1333686)
Backed out changeset 514fdfd43d63 (bug 1333686)
Backed out changeset 313a9604211f (bug 1333686)
Backed out changeset 5c610ccf76de (bug 1333686)
2017-01-25 19:53:20 -08:00
Chris Peterson 4652559dd8 Bug 1333686 - Part 3: Fix -Wmacro-redefined warnings in ipc/chromium. r=jld
The WARN_UNUSED_RESULT macro is defined in multiple Google header files in ipc/chromium and webrtc. Copy the WARN_UNUSED_RESULT definition from the latest security/sandbox/chromium/base/compiler_specific.h to our ipc/chromium code. Also remove the ALLOW_UNUSED macro definition because it is no longer defined in the latest compiler_specific.h and is not used anywhere.

Warning: -Wmacro-redefined in ipc/chromium/src/base/compiler_specific.h: 'WARN_UNUSED_RESULT' macro redefined
ipc/chromium/src/base/compiler_specific.h:73:9: warning: 'WARN_UNUSED_RESULT' macro redefined [-Wmacro-redefined]
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))

media/webrtc/trunk/webrtc/typedefs.h:152:9: note: previous definition is here
#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))

MozReview-Commit-ID: EUIlXGKLhDL

--HG--
extra : rebase_source : 4c584dfa2243514aef0357ff919d1cba48bd8b86
2017-01-16 19:14:52 -08:00
Ryan VanderMeulen 32aac3cc5d Bug 1331297 - Update libevent to version 2.0.22-stable. r=jld
--HG--
extra : rebase_source : 73804cbcb2930f32ea2125bd382e0ec2169fd95a
2017-01-24 21:58:13 -05:00
Botond Ballo cc3459a0d4 Bug 1331495 - Move operator<< overloads for mozilla::Logger inside namespace mozilla. r=froydnj
MozReview-Commit-ID: LqAx0zXVkgc

--HG--
extra : rebase_source : df18a96013158d238d505c5791ce176948987e83
2017-01-20 18:21:38 -05:00
Wes Kocher eff114e84c Backed out 4 changesets (bug 1325299) for frequent Win7VM failures in browser_addonPerformanceAlerts.js a=backout
Backed out changeset cac5baad14a1 (bug 1325299)
Backed out changeset 933d06e4b567 (bug 1325299)
Backed out changeset c168221313d6 (bug 1325299)
Backed out changeset dcf71e5e5fc3 (bug 1325299)

MozReview-Commit-ID: DLAtTjf0iPB
2017-01-20 12:46:34 -08:00
Masatoshi Kimura 9929e7d3d2 Bug 1325299 - Don't explicitly set PSAPI_VERSION. r=glandium
WINVER=0x0601 implies PSAPI_VERSION=2. We should not mix PSAPI_VERSION.

MozReview-Commit-ID: Ckxel4JNW2x

--HG--
extra : rebase_source : 932c67a3cae063fe4b0c5fec9048e67ce6286ad3
2016-12-30 01:29:52 +09:00
John Paul Adrian Glaubitz 942df3d3a4 Bug 1329194 - ipc:chromium: Add platform defines for SH. r=froydnj 2017-01-20 09:12:13 +09:00
Chris Peterson 4d95c4db20 Bug 1330496 - Part 1: Remove MOZ_WIN_INHERIT_STD_HANDLES_PRE_VISTA support for inheriting stdout/stderr handles on XP. r=bobowen
MozReview-Commit-ID: B7qJdK2sjv5

--HG--
extra : rebase_source : 4053054009359c0a775dae5ad5e24ba74b4c7c7b
extra : amend_source : 3231886a86fd03ac52f3717e22f33a7b4dc41f54
extra : histedit_source : 4533b894f9894bf5c883943bc53b260faa2ae8b1
2017-01-10 23:50:16 -08:00
Jan Beich ab093993b7 Bug 1329467 - Move remaining *RAII classes from GeckoProfiler under mozilla namespace. r=mstange
MozReview-Commit-ID: I8qqGDLJkgo

--HG--
extra : rebase_source : eeda752a75c050e5f88851d7401a462d86c24b80
2017-01-09 22:11:58 +00:00
Thinker K.F. Li 05cd0a68ef Bug 1325526 - Remove IPC message overhead for TaskTracer being disabled. r=cyu 2017-01-10 19:04:00 +08:00
John Paul Adrian Glaubitz 120b9c868b Bug 1275204 - ipc:chromium: Use better pre-processor defines for sparc64. r=froydnj
Currently, ipc/chromium detects sparc64 by checking whether
__sparc64__ is defined. However, this definition is used on BSD
targets only. Linux targets define both __sparc__ and __arch64__
on sparc64. Since this also works on BSD, rather use __sparc__
and __arch64__ instead of __sparc64__ to detect sparc64 targets.
2017-01-11 16:04:55 +09:00
Thinker K.F. Li 3de5fae4cb Bug 1319669 - Add TaskTracer labels for IPC messages. r=cyu,billm
--HG--
extra : rebase_source : e5de9974d2110fa717c5ecfc295110c2d6939cd2
2017-01-09 18:46:00 +01:00
Markus Stange e8007952db Bug 1323100 - Use AutoProfilerRegister to register chromium threads with the profiler. r=froydnj
MozReview-Commit-ID: 12LS5hqCA2c

--HG--
extra : rebase_source : 13dccf8fe255e59fef60d47dd49218ddaf696694
2016-12-22 00:48:55 +01:00
Bill McCloskey 132483934d Bug 1304266 - Remove libevent workaround for MacOS 10.4 bug (r=dvander)
MozReview-Commit-ID: 1U1TLlKT7aa
2017-01-03 19:51:33 -08:00
Randall Barker d917acf57f Bug 1319850 - part 2, Update MessageLoop so that it supports MessagePumpForAndroidUI r=nfroyd 2016-12-23 09:08:29 -08:00
Wes Kocher 0992df4676 Backed out 4 changesets (bug 1319850) for android xpcshell bustage a=backout
Backed out changeset 15b92bb6d810 (bug 1319850)
Backed out changeset e31107c3f677 (bug 1319850)
Backed out changeset 2a8012945a74 (bug 1319850)
Backed out changeset 8717bea884c9 (bug 1319850)
2016-12-22 18:16:34 -08:00
Randall Barker 260ada35fb Bug 1319850 - part 2, Update MessageLoop so that it supports MessagePumpForAndroidUI r=nfroyd 2016-12-22 16:15:14 -08:00
Markus Stange d7d6b57c9d Bug 1323072 - Trace tasks dispatched on Chromium (non-XPCOM) threads. r=sinker
MozReview-Commit-ID: GKfPCAspwDz

--HG--
extra : rebase_source : bde6aafe3ef989600d32b771f912871c0819cc44
2016-12-12 17:38:12 -05:00
David Major c66cdc62d8 Bug 1321875: Fix relative lifetimes of lpAttributeList and handlesToInherit in LaunchApp. r=aklotz
CreateThreadAttributeList warns:

// Note that the pointer to the HANDLE array ends up embedded in the result of
// this function and must stay alive until FreeThreadAttributeList is called,
// hence it is passed in so the owner is the caller of this function.

but the caller was passing a |handlesToInherit| that was declared inside a block scope that ends before we're finished using lpAttributeList.

This happened to work on MSVC but leads to badness under clang-cl.

+ Bonus fix for a sometimes-uninitialized warning in CreateThreadAttributeList.

MozReview-Commit-ID: 6uu3ICjfj5k

--HG--
extra : rebase_source : 45fd2e4084c80ab60bcf7bee8e1575b40b5b3283
2016-12-02 14:49:41 -06:00
Bob Owen 8865218aa3 Bug 1147911 Part 9: Ensure file read permissions for file content process on Windows. r=jimm, r=jld 2016-11-24 15:08:32 +00:00
Sebastian Hengst c7964131c3 Backed out changeset 11a036eafea2 (bug 1147911) 2016-11-23 18:32:42 +01:00
Bob Owen ca93c43645 Bug 1147911 Part 9: Ensure file read permissions for file content process on Windows. r=jimm, r=jld 2016-11-23 13:36:59 +00:00
Carsten "Tomcat" Book 8b27dda5d1 merge mozilla-inbound to mozilla-central a=merge 2016-11-22 15:53:05 +01:00
Bill McCloskey 75ee8c1609 Bug 1317844 - Add IPC message constructor flag (r=dvander)
MozReview-Commit-ID: 3eEAN5LqJ6N
2016-11-21 16:43:10 -08:00
Bill McCloskey a8bd0983dc Bug 1317844 - Convert IDMap so it can store nsCOMPtr (r=dvander)
MozReview-Commit-ID: 5fCM4u1QZLE
2016-11-21 16:43:05 -08:00
Mike Hommey 6dbb114821 Bug 1318914 - Fix --with-system-libevent build against libevent 2.1. r=billm
--HG--
extra : rebase_source : da25767f6045507447f90ab03291c60a4f2c6b3d
2016-11-20 17:51:17 +09:00
Thinker K.F. Li e4631a1eb6 Bug 1287392 - Part 3: Pass info of TaskTracer along with IPC messages. r=cyu 2016-11-10 07:59:00 +01:00
Thinker K.F. Li 9be93d8af3 Bug 1287392 - Part 1: Fix TaskTracer bugs caused by the changes of IPC. r=khuey, r=bgirard 2016-11-11 20:26:00 +01:00
Randall Barker 7687cf7959 Bug 1314466 - part 3, Fennec child processes are no longer forked so kill and waitpid do not work as expected and must gracefully handle error cases. r=billm 2016-11-14 16:45:23 -08:00
Randall Barker 3931285d6b Bug 1314466 - part 1, Allow android to set client channel fd for ipc r=billm 2016-11-14 16:45:23 -08:00
David Anderson 4d70e0e711 Fix MessageChannel when constructed with a broken Transport. (bug 1316473, r=billm) 2016-11-14 14:54:00 -08:00
Sebastian Hengst a0103a13ec Backed out changeset a5c68edf3788 (bug 1147911) 2016-11-18 00:58:51 +01:00
Bob Owen 87b58c6a19 Bug 1147911 Part 9: Ensure file read permissions for file content process on Windows. r=jimm, r=jld 2016-11-17 15:48:53 +00:00
Carsten "Tomcat" Book c2c23abfe2 Backed out changeset 606c7cb149c9 (bug 1287392) for bustage on a CLOSED TREE 2016-11-11 17:03:23 +01:00
Carsten "Tomcat" Book 72dedb5df0 Backed out changeset 7d8ed1ceafd7 (bug 1287392) 2016-11-11 17:03:02 +01:00
Thinker K.F. Li 86ea3b2d69 Bug 1287392 - Part 3: Pass info of TaskTracer along with IPC messages. r=cyu
--HG--
extra : rebase_source : d76de7bae28520e266f1f928e8474837260925c9
2016-11-10 07:59:00 -05:00
Thinker K.F. Li 9f1f17b5dc Bug 1287392 - Part 1: Fix TaskTracer bugs caused by the changes of IPC. r=khuey, r=bgirard
--HG--
extra : rebase_source : d7c6771ada2f19b028760456bd976bf578e58cf6
2016-11-10 07:57:00 -05:00