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

4743 Коммитов

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