Commit Graph

4880 Commits

Author SHA1 Message Date
Nathan Froyd
53f1900f29 Bug 1451363 - part 6 - move GetIPCChannel into ProtocolState; r=mccr8
We can move this information into ProtocolState and save having two
virtual functions for every protocol.  Moving some bits out of the
codegen'd IPC code is a nice bonus, though we keep the strange setup
where toplevel protocols have two mChannel member variables.
2018-04-23 14:13:36 -04:00
Nathan Froyd
dbc53de3d9 Bug 1451363 - part 5 - remove ProtocolName virtual function; r=mccr8
ProtocolName() is only used for producing error messages and annotating
crash reports.  But examining actual crash reports that would have used
the result of ProtocolName() indicates that we can always tell what the
erroring protocol is due to the stack backtrace.  So having this virtual
function around just provides duplicate information, and it takes up too
much space in the vtable besides.  Let's get rid of it.
2018-04-23 14:13:36 -04:00
Nathan Froyd
e77f1868f1 Bug 1451363 - part 4 - consolidate generated code into IProtocol; r=mccr8
lower.py generates repetitious:

  SetManager(...);
  Register(...); // Or RegisterID.
  SetIPCChannel(...);

calls, which are moderately sized, given that the above call sequence
requires virtual calls in several places.  Instead of codegenning this
sequence, let's consolidate the sequence into IProtocol and change the
code generator to call into the consolidated function instead.
2018-04-23 14:13:37 -04:00
Nathan Froyd
9eac324691 Bug 1451363 - part 3 - make OnChannelReceivedMessage defined in early beta only; r=mccr8
This function is only overriden in two places, both of which go away
after early beta is done.  We shouldn't be paying for its vtable entry
after that point.
2018-04-23 14:13:37 -04:00
Nathan Froyd
7b8c73c090 Bug 1451363 - part 2b - move protocol event target access into ProtocolState; r=mccr8
The reasoning here is the same as for the protocol register/lookup
functions: these functions are all basic functionality that should not
be overriden by subclasses.
2018-04-23 14:13:37 -04:00
Nathan Froyd
8196fc2720 Bug 1451363 - part 2a - move protocol register/lookup functions into ProtocolState; r=mccr8
This functionality is base functionality for top-level and non-toplevel
protocols; nobody overrides this stuff, so it's safe to move into
ProtocolState.
2018-04-23 14:13:37 -04:00
Nathan Froyd
a796a8f982 Bug 1451363 - part 1 - move Shmem-related IProtocol interfaces into an intermediate State class; r=mccr8
IProtocol, which is inherited by every generated IPDL protocol and every
concrete protocol implementation in-tree, has a number of virtual
methods that are only relevant when distinguishing between top-level
protocols (IToplevelProtocol) and managed protocols (everything else).
These virtual methods require pointers in every protocol's vtable, which
is wasteful, and it's also somewhat confusing that many methods exist
but don't really need to be overridable in any useful way.

Let's clean this up, by creating a ProtocolState class to hold methods
that solely differ between top-level protocols and everything else.
This commit does that work and moves Shmem-related methods into this
class as a proof that this can be done in a reasonable way.
2018-04-23 14:13:37 -04:00
David Major
5b7eb8380c Bug 1456192 - make {Read,Write}IPDLParam MOZ_NEVER_INLINE; r=froydnj
MSVC's PGO inliner thinks these functions are hot enough to be inlined,
but they're really not, and inlining them bloats xul.dll quite a bit.
2018-04-23 14:13:37 -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
Steve Fink
c92957a424 Bug 1455071 - Use delegation rather than inheritance for the BufferList in JSStructuredCloneData, r=jorendorff,r=baku
--HG--
extra : rebase_source : 1620d0a2d99d9aeddd7d06b4f29251907311ef86
extra : histedit_source : 59145661383b920085164eff3586a78da41c420b
2018-03-15 16:56:09 -07:00
Andrea Marchesini
2d7cb1d63f Bug 1252998 - StorageActivityService - part 2 - Use of StorageActivityService in LocalStorage, r=asuth 2018-04-18 18:19:10 +02:00
Andrea Marchesini
4a97618634 Bug 1252998 - StorageActivityService - part 1 - Introduce StorageActivityService to monitor origin activities, r=asuth 2018-04-18 18:19:10 +02:00
Stephen A Pohl
484e9fd139 Bug 1423261: Skip intentionally crashing the browser during KillHard shutdowns. r=jimm 2018-04-17 21:38:22 -04:00
Nathan Froyd
9f5a543f01 Bug 1452657 - rename IPDL-private Shmem token struct to something more professional; r=mccr8
Brevity is the soul of wit.
2018-04-17 10:05:30 -04: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
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03: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
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jan Varga
efe3185776 Bug 1447156; r=bkelly a=abillings 2018-04-11 06:36:04 +02:00
Nika Layzell
9b6f7881f9 Bug 1443956 - Part 1: Support serializing nsIURI directly over IPDL, r=froydnj 2018-04-10 17:49:48 -04: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
15aae6a990 Bug 1443954 - Part 2: Support parsing using refcounted class imports in IPDL, r=froydnj 2018-04-10 17:49:48 -04:00
Nika Layzell
854c39c514 Bug 1443954 - Part 1: Only Move() arguments when necessary, r=froydnj 2018-04-10 17:49:47 -04:00
Nika Layzell
0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -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
Andreea Pavel
26f640b36b Backed out 4 changesets (bug 1366808) for Windows GPU leakchecks on a CLOSED TREE
Backed out changeset 23f60e5acaa2 (bug 1366808)
Backed out changeset bf2262b6aca8 (bug 1366808)
Backed out changeset 1fc82af3a155 (bug 1366808)
Backed out changeset 0649f0d9884b (bug 1366808)
2018-04-10 05:11:36 +03:00
Stephen A Pohl
b40a23754c Bug 1366808: Properly detect buildID mismatches between parent and child processes and display about:restartrequired to prompt the user to restart Firefox before proceeding. r=jimm,felipe,bz 2018-04-09 20:16:31 -04:00
James Teh
fe6f1b3bf1 Bug 1429665: ipc::mscom::SpinEvent: Only spin for a short time, falling back to an event thereafter. r=aklotz
We want to spin for faster response, but we only want to spin for a very short time.
If we're waiting for a while, we don't want to be burning CPU for the entire time.
Therefore, only spin for 30 ms, then fall back to waiting on an event.

MozReview-Commit-ID: ErAIwpsIqYz

--HG--
extra : rebase_source : b6ac024adb7853456fd06c4385cf32184c8aeca2
2018-01-15 14:51:19 +10:00
James Teh
1d688c5a0d Bug 1411685: Remove another accessibility related diagnostic crash on Nightly. r=aklotz
I missed this one in bug 1431404.
This condition is rare and does indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing this as a result of this crash, so it causes user pain without any gain to us.

MozReview-Commit-ID: GncQGeZckrV

--HG--
extra : rebase_source : b6670005d53bc6d0009f0b8b142c2ab837b7d2e7
2018-03-23 15:21:56 -04:00
Tom Schuster
72acf485fb Bug 1255800 - Make computeThis return a boolean for easier error handling. r=jorendorff
--HG--
extra : rebase_source : 1b4d227aba2fd0e1a458849addb634df9d72111c
extra : histedit_source : 29e8c520ae4d3644131b05794a447a0e7a32796f
2018-03-23 13:09:04 +01: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
Christoph Kerschbaumer
3739c23b85 Bug 1439713 - Add flag to loadinfo for skipping certain security policy checks. r=bz 2018-03-29 11:14:35 +02:00
Bob Owen
5fd844b6e4 Bug 1447019 Part 1: Don't SetWinEventHook in InitUIThread for GMP processes. r=jimm 2018-03-27 14:09:31 +01:00
Nathan Froyd
eedd6f361c Bug 1448022 - make MessagePumpForAndroidUI's constructor explicit; r=jld
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Tom Schuster
2bf6212869 Bug 1255800 - Remove JS_THIS_OBJECT from dom/xpconnect. r=bz
--HG--
extra : rebase_source : dcaa891010e25e10079db853fe4eb1a7fe261e47
2018-03-07 14:35:22 +01:00
Nicholas Nethercote
5f16fc9dc3 Bug 1447246 - Refactor ContentProcess::Init(). r=jimm
The current code is a bit of a mess. This patch does the following.

- Changes the processing from backwards to forwards. This avoids the need for
  all the `found` booleans, because if a flag is present multiple times, the
  last one will naturally override.

- Tightens up the checking. It now doesn't use assertions, but instead returns
  false if any of the options are missing arguments, or have malformed
  arguments, or any of the mandatory flags are missing. (It assumes that
  -appdir and -profile are optional.)

- Renames the loop variable `idx` as `i`.

- Changes `!strcmp(...)` to `strcmp(...) == 0`, because I find that clearer.

- Avoids a redundant nsCString when handling -appdir.

The patch also tweaks GeckoChildProcessHost::mGroupId, which was buggy. It
holds the appModelUserId argument, which XRE_InitChildProcess() always expects
is present in the command. But it's only set to a non-empty value in
InitWindowsGroupID(), which is only called for plugin processes. So in lots of
cases the appModelUserId argument was missing, and a different argument would
be interpreted as the appModelUserId argument (seemingly without noticeable ill
effect).

The patch changes things to mGroupId defaults to "-", which means it's always
present in the command.

Note: all this explains why the old code for ContentProcess::Init() started
processing from argument aArgc, instead of aArgc-1 as you might expect -- it
had to read one extra arg in order to see the argument following -appdir,
because XRE_InitChildProcess() was decrementing aArgc for the appModelUserId
argument even when that argument wasn't present. The new code for
ContentProcess::Init() doesn't have to read past aArgc-1 because the mGroupId
fix ensures the appModelUserId argument is always present.

MozReview-Commit-ID: 8a8k6ABYMgo

--HG--
extra : rebase_source : 70695125ee26e67af3337119f4dfc293a0dab74c
2018-03-16 12:23:10 +11:00
Nathan Froyd
94df69d8f2 Bug 1448053 - be more efficient in MessageChannel::RepostAllMessages; r=jld
Once we've figured out that some task needs to be reposted, there's no
reason to continue scanning the list to find other tasks that need to be
reposted, since the logic in this function just requires one task that
needs to be reposted.
2018-03-23 09:40:53 -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
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Ted Mielczarek
4b813d4c4a bug 1255485 - Remove NSDISTMODE=copy from Makefiles. r=nalexander
MozReview-Commit-ID: GJV2O6zvEx2
2017-11-22 15:30:06 -05:00
Kartikaya Gupta
c864e00967 Bug 1441324 - Move the input event messages from PAPZCTreeManager to PAPZInputBridge. r=froydnj,rhunt
This remotes the APZInputBridge interface over the PAPZInputBridge
protocol in the case of the GPU process, and makes the GPU process'
main thread act as the APZ controller thread in that process. If
there is no GPU process we continue as before and the APZInputBridge
interface implementation is the concrete APZCTreeManager instance
in the UI process.

The main changes in this patch are moving all the code associated with
these messages out of APZCTreeManager{Parent,Child} and into
APZInputBridge{Parent,Child}. APZCTreeManagerChild now returns an
APZInputBridgeChild instance via InputBridge(), instead of returning
itself. The SetControllerThread call in the GPU process is also updated.

MozReview-Commit-ID: M4AaIW1Q0h

--HG--
extra : rebase_source : e5a8f14e23be34229fe80a47f6789d19b19e0a9f
2018-03-16 16:28:19 -04:00
Stephen A Pohl
db9ff55a1c Bug 1348361 - Part 3 - Do not block the thread when spawning a gecko child process; r=jld
They are not yet fully async because ContentParent::InitInternal calls
OtherPid(), which will block until the process is spawned. Deferring the calls
to OtherPid() will be a subject of a follow up patch.

MozReview-Commit-ID: 4TFkMpdQtRw

--HG--
extra : rebase_source : 3e7567679ae04aa4c04ea6f6c146e70417e7ce05
2018-02-16 10:24:21 -05:00
Alex Gaynor
911eab5d61 Bug 1348361 - Part 1 - Added locking to IToplevelProtocol's management of the peer's pid; r=jld
This will let us manipulate it from multiple threads in a future patch.

MozReview-Commit-ID: 2AOgho8SEX9

--HG--
extra : rebase_source : 49e7d82b38e6f7b7eb9f6cb7c61a2b41d34f2bdc
2018-02-22 10:36:55 -05:00
Sylvestre Ledru
fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
shindli
9bfc016707 Merge inbound to mozilla-central. a=merge 2018-03-15 12:15:17 +02:00
Ryan Hunt
691f20afd2 Remove ReadLockHandle and ReadLockInit code (bug 1445008, r=aosmond)
This code is unused now that ReadLockDescriptors are not sent in layer transactions.

--HG--
extra : rebase_source : 8cd25541b22c3151e2dbd2f8ea6d1119e2f26c94
extra : source : 99a2d26d1ba82ad34a6c27641500a424cda015c3
2018-03-13 17:00:18 -05:00
Jonathan Kingston
10ebc30d5d Bug 1440701 - Adding in telemetry for upgrading display content. r=ckerschb,valentin
MozReview-Commit-ID: 7oEIith4Ehv

--HG--
extra : rebase_source : 454d56277aa5dc08bf8cfd7cd9c1e24d31014838
2018-03-04 14:33:33 +00:00
Coroiu Cristina
0f6841e0d2 Backed out 2 changesets (bug 1443080) for spidermonkey build bustage at build/src/js/src/jit/BaselineCacheIRCompiler.cpp
Backed out changeset 7d509bb8a35d (bug 1443080)
Backed out changeset 53bdcd5937cd (bug 1443080)

--HG--
extra : rebase_source : 59b5350d2959c0b065aedd34bfe8337216c0ea4b
2018-03-14 11:13:21 +02:00
Sylvestre Ledru
c07eb73986 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 17c91bfd7241e3e522b1413b6e544df74f5361a0
2018-03-05 13:43:54 +01:00
Alex Gaynor
f45434cdf0 Bug 1445249 - Part 3 - Make it an error to call IToplevelProtocol::OtherPid() on an unconnected protocol; r=jld
MozReview-Commit-ID: HAMXOYUeHoU

--HG--
extra : rebase_source : ffd8f90d4c63a05fb9c4004df2ed7f036a4edacd
2018-03-12 13:06:33 -04:00
Alex Gaynor
83b1d64e22 Bug 1445249 - Part 2 - avoid calling OtherPid() where it might return an invalid pid on android; r=jld
MozReview-Commit-ID: EXio3oNJy4U

--HG--
extra : rebase_source : a7fe96470b138bb8758c6b8683ba6ad029adb5a1
2018-03-13 12:54:35 -04:00
Alex Gaynor
b5a231f297 Bug 1445249 - Part 1 - Remove unused aProcessId parameter when deleting shared memory; r=jld
MozReview-Commit-ID: Cn0q46Q67hd

--HG--
extra : rebase_source : 7f963216e3c73118ae761dc8aa961cb120255481
2018-03-13 10:07:18 -04: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
Ryan Hunt
084c9b6f4c Allocate TextureReadLock at TextureClient creation and drop file handles immediately after. (bug 1416726, r=aosmond)
This changes the lifecycle and API for TextureReadLock to fix file descriptor exhaustion
crashes. These changes are partially superficial and mostly align the API of TextureReadLocks
with their actual usage.

The changes are:

1. Create the TextureReadLock in the TextureClient constructor so it's available before IPC creation
    a. This is superficial as EnableReadLock was always called before IPC creation
2. Send the ReadLockDescriptor in the PTextureConstructor message and close the file handle
3. Receive the ReadLockDescriptor in TextureHost and close the file handle
4. Send a boolean flag in layer transactions if the texture is read locked instead of a descriptor
5. Use a boolean flag in TextureHost to determine if the ReadLock must be unlocked instead of a nullptr

I believe that we can remove the InitReadLocks code from LayerTransaction as that was added to
prevent file descriptor limits in IPDL messages and is no longer needed with this change. But
that is a non-essential change and this patch is already big enough.

MozReview-Commit-ID: DzHujrOQejH

--HG--
extra : rebase_source : 3bdd7c9bc8edfdc386faad8a9e59ad7dc18ed91d
2018-03-12 08:10:13 -05:00
Stephen A Pohl
b495992a03 Bug 1423261: Submit IPC protocol names in shutdown crash reports in a way that Socorro is able to display. r=jimm 2018-03-12 11:11:44 -04:00
Bogdan Tara
e3282a1fb3 Merge inbound to mozilla-central. a=merge 2018-03-07 12:03:48 +02:00
Jim Chen
5c88095f46 Bug 1442255 - 7. Switch the order of fd arguments; r=jchen
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.

MozReview-Commit-ID: CAVyYAIIBPm

--HG--
extra : rebase_source : 596f590443f727d1a79582202eed122f79ae85cf
2018-03-06 13:52:50 -05:00
Dorel Luca
2157d8d21d Merge mozilla-central to mozilla-inbound 2018-03-06 23:59:05 +02:00
Dorel Luca
9eb35ef453 Merge mozilla-inbound to mozilla-central. a=merge 2018-03-06 23:54:12 +02:00
Stephen A Pohl
54c0a8cff6 Bug 1362303: Avoid crashes when dragging on macOS due to failed allocations of large shmem segments. r=glandium 2018-03-06 13:21:54 -05:00
Honza Bambas
8aaa7351b0 Bug 1438935 - Serialize selected LoadInfo properties from HTTPChannelParent to HTTPChannelChild through OnStartRequest and Redirect1Begin, r=asuth
--HG--
extra : rebase_source : 6d93112fbd0bcd9562094a05c70cb02e0c3bb4b9
2018-03-06 08:07:00 +02:00
Dorel Luca
e43399c28e Merge mozilla-central to autoland 2018-03-06 23:58:12 +02:00
Csoregi Natalia
0ad2abb8e9 Backed out changeset 7aef35642e5f (bug 1436156) for failing ipc/chromium/src/base/id_map.h:60. CLOSED TREE 2018-03-06 13:50:36 +02:00
Christoph Diehl
bb37ad9aba Bug 1436156 CHECK() in Chromium IPC code should be fatal when not fuzzing. r=jld 2018-03-06 00:26:06 +01:00
Cosmin Sabou
ed1b2a8736 Backed out 4 changesets (bug 1437167) for build bustages on nsUpdateDriver.cpp and WindowsMessageLoop.cpp on a CLOSED TREE.
Backed out changeset b98740e7c639 (bug 1437167)
Backed out changeset 4476e8f51fa6 (bug 1437167)
Backed out changeset c79dc40faa41 (bug 1437167)
Backed out changeset b608d2dcbb86 (bug 1437167)
2018-03-06 00:09:46 +02:00
Nika Layzell
7d5a04f0fb Bug 1437167 - Part 4: Spell CVStatus correctly on a CLOSED TREE, a=bustage
MozReview-Commit-ID: I4t8OtmxjDa
2018-03-05 16:47:29 -05:00
Nika Layzell
801a4a8d1a Bug 1437167 - Part 3: Fix some platform-specific consumers of the Monitor::Wait APIs on a CLOSED TREE, a=bustage
MozReview-Commit-ID: FymGvwEtZRk
2018-03-05 16:31:18 -05:00
James Teh
a26d4b939e Bug 1434822 part 2: mscom: Add a function to disconnect all remote clients associated with a given target. r=aklotz
Because Interceptors disable COM garbage collection to improve performance, they never receive Release calls from remote clients.
If the object can be shut down while clients still hold a reference, this function can be used to force COM to disconnect all remote connections (using CoDisconnectObject) and thus release the associated references to the Interceptor, its target and any objects associated with the HandlerProvider.
A HandlerProvider::DisconnectHandlerRemotes method also had to be added to allow HandlerProviders to disconnect clients for their own objects.

MozReview-Commit-ID: JaxEkOtrP1M

--HG--
extra : rebase_source : bc7a4ab79458eaaddcef8df74ff4d6f685fbfdce
extra : histedit_source : 087f17f09a0c0e1c8e3b5f6d9690f331c15f0b95
2018-02-19 16:08:57 +10:00
James Teh
a6bf63dc6e Bug 1442523: mscom::Interceptor: Don't dispatch QI calls to the main thread while creating a marshaler. r=aklotz
COM queries for special interfaces such as IFastRundown when creating a marshaler.
We don't want these being dispatched to the main thread, since this would cause a deadlock on mStdMarshalMutex if the main thread is also querying for IMarshal.

MozReview-Commit-ID: EQcN8Zhewjh

--HG--
extra : rebase_source : 40c39edce139f66fdb43b539b1d6fb0acb00d755
2018-03-06 17:08:15 +10:00
Nika Layzell
bfb9a07251 Bug 1440771 - Part 1: Add a ParamTraits impl for nsCOMPtr<nsIInputStream>, r=baku
MozReview-Commit-ID: dfZJH1cWnW
2018-03-05 16:00:05 -05:00
Nika Layzell
e282bb0ee4 Bug 1440511 - Part 12: Remove the now-unused per-actor pickling code, r=froydnj
MozReview-Commit-ID: 5ASQu4ly0od
2018-03-05 16:00:04 -05:00
Nika Layzell
b8ffcd26b0 Bug 1440511 - Part 11: Switch to calling IPDLParamTraits directly when pickling and unpickling messages, r=froydnj
MozReview-Commit-ID: 1t4oIp5JWcU
2018-03-05 16:00:04 -05:00
Nika Layzell
4cfd1b17fa Bug 1440511 - Part 10: Implement IPDLParamTraits for IPDL generated types, r=froydnj
MozReview-Commit-ID: 2ljPFJKM9Fg
2018-03-05 16:00:04 -05:00
Nika Layzell
68cee68ee8 Bug 1440511 - Part 9: Correct serialization and deserialization of arrays of Shmem objects, r=froydnj
MozReview-Commit-ID: KEFduw2Pn8r
2018-03-05 16:00:03 -05:00
Nika Layzell
ea516e7fbb Bug 1440511 - Part 7: Include c++ includes in ipdlh generated .cpp files, r=froydnj
This is important as these includes are often used to define ParamTraits
implementations which are needed to serialize struct members and
parameters. The place where the code which uses these implementations
will be moving from the protocol where they are used to the file where
the structs are defined, which means we need to includes these files
there.

MozReview-Commit-ID: H1wqgyv5mel
2018-03-05 16:00:03 -05:00
Nika Layzell
50056699b1 Bug 1440511 - Part 6: Support passing the fq flag to _cxxBareType in more places, r=froydnj
MozReview-Commit-ID: K1lkVr6KdZo
2018-03-05 16:00:02 -05:00
Nika Layzell
acff444d08 Bug 1440511 - Part 5: Move all serialization logic into an IPDLParamTraits impl for Shmem, r=froydnj
MozReview-Commit-ID: DsrfSVPgoo1
2018-03-05 16:00:02 -05:00
Nika Layzell
896117c019 Bug 1440511 - Part 4: Add an IPDLParamTraits implementation for FileDescriptor, r=froydnj
MozReview-Commit-ID: R1CiT5IvAi
2018-03-05 16:00:02 -05:00
Nika Layzell
36059eb187 Bug 1440511 - Part 3: Add IPDLParamTraits which supports passing in an actor when {un,}pickling, r=froydnj
MozReview-Commit-ID: JTsQJ292A09
2018-03-05 16:00:01 -05:00
Nika Layzell
351767a407 Bug 1440511 - Part 2: Support specializations in _splitMethodDefn, r=froydnj
MozReview-Commit-ID: JFYgyUr4I4G
2018-03-05 16:00:01 -05:00
Nika Layzell
262be91f75 Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj
MozReview-Commit-ID: BN18I8Q6c7S
2018-03-05 16:00:00 -05:00
Nathan Froyd
062f6d980e Bug 1443236 - remove static init and shutdown nsRegion routines; r=kats
These routines are no-ops; let's get rid of them.
2018-03-05 14:06:50 -05:00
James Teh
16bde7a2f5 Bug 1434822 part 1: Disable COM ping functionality for our parent process instead of for external processes. r=aklotz
MozReview-Commit-ID: 2ayfzIxh8Lo

--HG--
extra : rebase_source : 59e0d9d4a15bd6b714600558bebda4e2add08201
extra : histedit_source : d068b57d9706d4b0cc3e32e7e575f441f3e23a9c
2018-02-01 15:42:24 +10:00
Valentin Gosu
34872b6d20 Bug 1441688 - Remove nsIIPCSerializableURI.Deserialize r=mayhemer
MozReview-Commit-ID: 8gwX3vSKWNX

--HG--
extra : rebase_source : a2c21a7e66aa8be3c2e345ca64feea967b380491
2018-03-05 04:14:44 +01:00
James Teh
4e593a1e00 Bug 1440257: Ensure that mscom::MainThreadInvoker gets cleaned up very soon after it finishes executing. r=aklotz
MainThreadInvoker queues both a Gecko runnable and an APC to the main thread to deal with different ways in which the main thread can block.
However, the main thread doesn't check for APCs very often any more.
This means that the APC's reference to the SyncRunnable doesn't get cleaned up for a long time, thus leaking memory.
To work around this, we:
1. Queue an APC wich does the actual work.
2. Post a Gecko runnable (which always runs).
If the APC hasn't run, the Gecko runnable runs it.
Otherwise, it does nothing.

MozReview-Commit-ID: L0P4rMBnlaZ

--HG--
extra : rebase_source : 3af871cf59e94818963e15881217218ef2b42b6c
2018-02-23 10:44:07 +10:00
Bogdan Tara
3c059709aa Backed out changeset c055d7b57071 (bug 1434822) for causing 1442523. a=backout 2018-03-02 11:27:55 +02:00
Bogdan Tara
3cadf78110 Backed out changeset 54526e7c7b6c (bug 1434822) for causing 1442523. a=backout 2018-03-02 11:27:35 +02:00
Sebastian Hengst
118e03a936 merge mozilla-central to mozilla-inbound 2018-03-01 20:32:20 +02:00
James Teh
6fc08ce5ed Bug 1434822 part 2: mscom: Add a function to disconnect all remote clients associated with a given target. r=aklotz
Because Interceptors disable COM garbage collection to improve performance, they never receive Release calls from remote clients.
If the object can be shut down while clients still hold a reference, this function can be used to force COM to disconnect all remote connections (using CoDisconnectObject) and thus release the associated references to the Interceptor, its target and any objects associated with the HandlerProvider.
A HandlerProvider::DisconnectHandlerRemotes method also had to be added to allow HandlerProviders to disconnect clients for their own objects.

MozReview-Commit-ID: JaxEkOtrP1M

--HG--
extra : rebase_source : 2262af8fc3cb1aec8d9c8fc2762f3d61e188cb37
2018-02-19 16:08:57 +10:00
James Teh
5f27445039 Bug 1434822 part 1: Disable COM ping functionality for our parent process instead of for external processes. r=aklotz
MozReview-Commit-ID: 2ayfzIxh8Lo

--HG--
extra : rebase_source : 2ff14410152493c5bcaa4f0e34aa0a67d66a78ed
2018-02-01 15:42:24 +10:00
Gurzau Raul
185d1fcf42 Backed out 7 changesets (bug 1442255) for failing c1 tests on mochitest/test_browserElement_inproc_PurgeHistory.html
Backed out changeset 208c4c42f641 (bug 1442255)
Backed out changeset 6a794e14fceb (bug 1442255)
Backed out changeset 62d1c57c37b4 (bug 1442255)
Backed out changeset 5d0f72867f53 (bug 1442255)
Backed out changeset c3305648ad30 (bug 1442255)
Backed out changeset 08f906f3a0c8 (bug 1442255)
Backed out changeset d7a43e59a1b4 (bug 1442255)
2018-03-06 17:08:57 +02:00
Jim Chen
9b7b3f4565 Bug 1442255 - 7. Switch the order of fd arguments; r=jchen
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.

MozReview-Commit-ID: CAVyYAIIBPm

--HG--
extra : rebase_source : 02bf7337fa9a6d1194809c224acb4a2690fd87a3
2018-03-06 00:04:56 -05:00
Stephen A Pohl
562c70ab11 Bug 1423261: Diagnostics patch to obtain more info about the IPC channel state when we expect it to be closed. r=jimm 2018-03-01 11:41:34 -05:00
Csoregi Natalia
166bce1123 Merge inbound to mozilla-central. a=merge 2018-02-24 12:13:21 +02:00
Chris Peterson
4c4286f348 Bug 1330529 - Part 3: Protect DLL loads in wmain instead of waiting until PluginProcessChild::Init. r=jimm
Removing #define XRE_DONT_PROTECT_DLL_LOAD from plugin-container.cpp and xpcshell.cpp allows the #included nsWindowsWMain.cpp to protect DLL loads much earlier in the plugin process startup.

MozReview-Commit-ID: HbgyfvljvFs

--HG--
extra : rebase_source : dccdabb2e5bee4472d5aef9400a58cb0e397c112
extra : histedit_source : da248fc6fbdf96f30979f3a0396aefcf4bfcd5d9
2018-02-02 22:53:34 -08:00
James Teh
b51649c9a4 Bug 1440564: mscom::StructToStream: Free the buffer when destroying the instance. r=aklotz
You'd think that MesHandleFree would free the buffer, since it was created by RPC, but it doesn't.
Therefore, we must free it ourselves using midl_user_free.

MozReview-Commit-ID: 9KzWTngFEEq

--HG--
extra : rebase_source : 6bee3903f619ec1cb1569ebf1df2ddef9da6b901
2018-02-23 20:00:30 +10:00
Alex Gaynor
85d35b3366 Bug 1440034 - fixed reporting of annotations at the time of crashes on GeckoView; r=rbarker
MozReview-Commit-ID: 8thtJe0QmcE

--HG--
extra : rebase_source : 68f2380d1846f4f648ac4146f2d5385ac4923522
2018-02-21 14:37:22 -05:00
Csoregi Natalia
7ec5af04a0 Backed out changeset 3237c9532102 (bug 1440034) for breaking Android builds. CLOSED TREE 2018-02-22 05:37:53 +02:00
Alex Gaynor
bef576f813 Bug 1440034 - fixed reporting of annotations at the time of crashes on GeckoView; r=rbarker
MozReview-Commit-ID: 8thtJe0QmcE

--HG--
extra : rebase_source : 27d0875e412b8dde435af132768fda98bb24ed35
2018-02-21 14:37:22 -05:00
Gurzau Raul
2a77281049 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-02-21 19:30:44 +02:00
Christoph Kerschbaumer
a6c1ffb498 Bug 1434357: Exempt Web Extensions from insecure redirects to data: URIs. r=kmag,mayhemer 2018-02-18 19:52:52 +01:00
Jonathan Kingston
8afc412494 Bug 1435733 - Upgrade mixed display content pref. r=baku,ckerschb,francois,mayhemer
MozReview-Commit-ID: ETIgVF3zhRu

--HG--
extra : rebase_source : e4c59f50584158f4b31527347b10424b56692fa1
2018-02-05 15:37:27 +00:00
Christoph Kerschbaumer
494f074b53 Bug 1432358: Allow certain top-level pages to be agnostic to CSP. r=smaug
--HG--
extra : source : 27527f95cccca4927d4fee56b0dab9af11c5733f
extra : intermediate-source : 2fa11c525da3d0c7ca58a593241c1902f2849528
2018-02-01 14:07:01 +01: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
07d1a1f5aa Bug 1438209 - fixed Windows builds with the crashreporter disabled; r=ted
Do not pass command line arguments to child processes that they won't read.

MozReview-Commit-ID: soj1hRygNw

--HG--
extra : rebase_source : 13501d2f12a0be910323465f589386e7c956e41a
2018-02-15 10:07:12 -05:00
Kyle Machulis
e1ca4ed006 Bug 1201590 - WebMIDI Parent/PBackground implementation; r=baku,padenot
MozReview-Commit-ID: Juk7azaIViw

--HG--
extra : rebase_source : 1daa19e385ba04fcfba1eb284442a64ae691a271
2017-11-15 11:19:59 -08:00
Kyle Machulis
584f1f8b59 Bug 1201590 - WebMIDI Content implementation; r=baku,padenot
MozReview-Commit-ID: HmiGV9iqAeM

--HG--
extra : rebase_source : 27ae72adf4997bdc8c0810515165434b08f1d390
2017-11-15 11:18:58 -08:00
Kyle Machulis
a95162b2c3 Bug 1201590 - WebMIDI IPDL files; r=baku
MozReview-Commit-ID: 1b4FSasfZJ4

--HG--
extra : rebase_source : 5a400499ef8100d1454b7dbf3ebc63780dac453a
2017-11-14 22:16:18 -08:00
James Teh
752cda7b26 Bug 1433046: mscom::Interceptor: Don't destroy an aggregated interceptor before releasing its interface. r=aklotz
When an object is aggregated, doing a QI to anything other than IUnknown on the inner object AddRefs the outer object.
Thus, before releasing our reference to the inner IUnknown (and thus destroying it), we *must* release any references to interfaces queried from it.
Otherwise, any pointers to interfaces of the inner object would be invalidated.

MozReview-Commit-ID: KXsA8Sagx6G

--HG--
extra : rebase_source : f1dca4ee71f2ed49c8ba19c12862f2b4f9881fca
2018-02-08 15:53:20 +10:00
James Teh
d557fc0b1d Bug 1431404: Remove some accessibility related diagnostic crashes on Nightly. r=aklotz
These conditions are rare and do indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing these as a result of these crashes, so they cause user pain without any gain to us.

MozReview-Commit-ID: D9U4et3Bg7d

--HG--
extra : rebase_source : a81263a0ef97a8ed87129d15ef30ded3005e740c
2018-02-09 15:28:13 +10:00
Andreea Pavel
3d2179915d Backed out changeset e68169412c0b (bug 1431404) for failing mochitest browser chrome at browser/base/content/test/general/browser_datachoices_notification.js on a CLOSED TREE 2018-02-13 03:28:44 +02:00
James Teh
3f381e616f Bug 1431404: Remove some accessibility related diagnostic crashes on Nightly. r=aklotz
These conditions are rare and do indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing these as a result of these crashes, so they cause user pain without any gain to us.

MozReview-Commit-ID: D9U4et3Bg7d

--HG--
extra : rebase_source : a81263a0ef97a8ed87129d15ef30ded3005e740c
2018-02-09 15:28:13 +10:00
Alex Gaynor
de20b74dc4 Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.

MozReview-Commit-ID: 8agL5jwxDSL

--HG--
extra : rebase_source : 17ebcef3e9d24f3d4e7515e3fae95e65cef76a79
2017-11-27 14:37:34 -06: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
c190a71600 Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.

MozReview-Commit-ID: 8agL5jwxDSL

--HG--
extra : rebase_source : 215577cd5ced3994a4c3345377b3feedea07e886
2017-11-27 14:37:34 -06: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
Dorel Luca
112cc1ff6b Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout
Backed out changeset a992887a6060 (bug 1430857)
Backed out changeset cc9b0ac5f66b (bug 1430857)
Backed out changeset 4bdd6d82f993 (bug 1430857)
2018-02-07 15:02:58 +02:00
Aaron Klotz
200eb77750 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : 3a5b4a6f0412311f0b9080a2b3b3a31e45d15b75
2018-01-30 14:23:10 -07:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Andrea Marchesini
8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Nika Layzell
785a14270e Bug 1431867 - Part 2: Add move constructors and assignment operators to IPDL unions, r=mccr8
MozReview-Commit-ID: IQVODEfMGi9
2018-02-01 11:30:50 -05:00
Nika Layzell
a1e4513e2a Bug 1431867 - Part 1: Remove some unnecessary complexity from generated IPDL structs, r=mccr8
MozReview-Commit-ID: HvX4ZF8t9Eg
2018-02-01 11:30:49 -05:00
Gian-Carlo Pascutto
d959ea23b4 Bug 1386404 - Don't try to fetch the content process tmpdir if sandboxing is disabled. r=jld
MozReview-Commit-ID: zaWPy4rt1J

--HG--
extra : rebase_source : 2b4fcf210c986ae9c0f74619df3290e7cd9fbfd0
extra : histedit_source : e2ef0fa68e9a0d544e11ac4475cab4e6e97f74fc
2018-01-09 17:51:55 +01:00
Gian-Carlo Pascutto
7fd8a36d1c Bug 1386404 - Intercept access to /tmp and rewrite to content process tempdir. r=jld
MozReview-Commit-ID: 2h9hw6opYof

--HG--
extra : rebase_source : 73c677be84d62ed958d07b0aca0947dd0e9448c7
extra : histedit_source : 499d483f58372b7b06a36da3fdf0ea3afc12feeb
2017-10-26 17:50:49 +02:00
Gian-Carlo Pascutto
6520179659 Bug 1386404 - Enable content-process specific tmpdir on Linux. r=jld
MozReview-Commit-ID: 6Hijq0to9MG

--HG--
extra : rebase_source : 8435b8e39d9723c52b0176a7686895185136aa6e
extra : histedit_source : 50c41172788fddead6357f1d566d0e48de8c90d6
2018-01-09 16:29:40 +01:00
Noemi Erli
7df180b6ad Backed out 2 changesets (bug 1431867) for build bustages on ClientSourceOpChild.cpp:57:12 on a CLOSED TREE
Backed out changeset 4cdb114a46f9 (bug 1431867)
Backed out changeset b5a46d76193b (bug 1431867)
2018-01-31 22:15:54 +02:00
Nika Layzell
08119d282a Bug 1431867 - Part 2: Add move constructors and assignment operators to IPDL unions, r=mccr8
MozReview-Commit-ID: IQVODEfMGi9
2018-01-31 14:40:36 -05:00
Nika Layzell
c9e0af69b6 Bug 1431867 - Part 1: Remove some unnecessary complexity from generated IPDL structs, r=mccr8
MozReview-Commit-ID: HvX4ZF8t9Eg
2018-01-31 14:40:35 -05:00
Bogdan Tara
1f15df5f24 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-01-31 12:11:39 +02:00
Andrea Marchesini
26352bfee1 Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00
Andrea Marchesini
a5bed23bd8 Bug 1432963 - Fixing workers headers - part 15 - static function in a workers namespace, r=smaug 2018-01-31 08:24:30 +01:00
Andrea Marchesini
2c7c69af24 Bug 1432963 - Fixing workers headers - part 14 - WorkerPrivate without workers namespace, r=smaug 2018-01-31 08:24:08 +01:00
Andrea Marchesini
063723a1f0 Bug 1432963 - Fixing workers headers - part 13 - WorkerHolder without workers namespace, r=smaug 2018-01-31 08:23:44 +01: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
Gurzau Raul
c380dfe905 Merge inbound to mozilla-central. a=merge 2018-01-30 12:01:49 +02: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
Aaron Klotz
1559fd3d00 Bug 1433046: Use WeakReferenceSupport::StabilizeRefCount instead of regular kung-fu death grips when aggregating; r=Jamie
This fix is completely speculative, but I have strong reason to believe that
we are having lifetime issues, and that refcount stabilization might be coming
into play.

The situation is this:

Suppose we're aggregating an object, so we pass |this| as the outer IUnknown.
The inner object might perform AddRef() and Release() on |this| during its
initialization.

But if we're in the process of creating the outer object, that refcount might
not yet have been incremented by 1, so the inner object's invocation of the
outer object's Release() could trigger a deletion.

The way around this is to temporarily bump the refcount when aggregating another
object. The key, though, is to not do this via AddRef() and Release(), but by
direct maniuplation of the refcount variable, so that we don't trigger any of
the self-deletion stuff.

MozReview-Commit-ID: 3WA2AJvb6jY

--HG--
extra : rebase_source : ab05a52760541a4ab11f1245a5ddeae938998047
2018-01-25 13:45:21 -07:00
Daniel Zielas
e80f2e7469 Bug 1427229 - Perform validation when sending an EnumSet over IPC. r=botond,froydnj
MozReview-Commit-ID: Cmugi1ldc1Z

--HG--
extra : amend_source : 88b792772ce7948172a68fda03d6d61de66347de
2018-01-21 21:23:21 +01:00
David Parks
cc15f3d517 Bug 1382251: Part 8 - Migrate some previously hooked functions to FunctionHook/Broker; r=jimm,froydnj
Moves GetWindowInfo, GetKeyState, SetCursorPos, GetSaveFileNameW and GetOpenFileNameW to the new FunctionHook and FunctionBroker systems.
2017-11-06 11:07:16 -08:00