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

904 Коммитов

Автор SHA1 Сообщение Дата
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