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

1631 Коммитов

Автор SHA1 Сообщение Дата
Tom Ritter e9bd1a1b96 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-20 20:21:44 +00:00
Tom Ritter a77e0fbeb2 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-20 20:21:43 +00:00
Cristian Tuns 6e25a12cb7 Backed out 16 changesets (bug 1752332) for causing multiple failures on StaticPrefList_media.h
Backed out changeset ec6a5f016318 (bug 1752332)
Backed out changeset 10ac6886fa5e (bug 1752332)
Backed out changeset d37dec5c0d9e (bug 1752332)
Backed out changeset 258d19fe4e28 (bug 1752332)
Backed out changeset 52f6b46250a3 (bug 1752332)
Backed out changeset ab5c00d2fb02 (bug 1752332)
Backed out changeset d72dc14eeafd (bug 1752332)
Backed out changeset 061cdf612d0e (bug 1752332)
Backed out changeset 26707a82d896 (bug 1752332)
Backed out changeset 01ca344dedbf (bug 1752332)
Backed out changeset 22c6c04046b1 (bug 1752332)
Backed out changeset ce809df435e1 (bug 1752332)
Backed out changeset 185026a397b0 (bug 1752332)
Backed out changeset 9dfd530f26b8 (bug 1752332)
Backed out changeset deadcb975866 (bug 1752332)
Backed out changeset 4944ae34f15b (bug 1752332)
2022-04-20 13:10:55 -04:00
Tom Ritter ab308fb14f Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-20 15:44:40 +00:00
Tom Ritter 696098706b Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-20 15:44:39 +00:00
Tom Ritter d9fb7a4c74 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-20 15:44:37 +00:00
Tom Ritter 288e606baf Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-20 15:44:37 +00:00
Nika Layzell 5e08e6891a Bug 1757802 - Don't keep alive Shmem shared memory regions on IProtocol, r=ipc-reviewers,jld
With this new approach, Shmem instances will now have their handles
transferred inline within messages as attachments, rather than being
associated with their actors and sent in separate messages.

This has a few advantages:

* The implementation is much simpler
* Releasing all references to a Shmem will automatically destroy it by
  RAII, rather than leaking the shared memory region until the toplevel
  actor is destroyed, removing the need for types like RaiiShmem.
* This allows re-transmitting Shmem instances to another process, as we
  don't close the shared memory region handle upon receiving it.

But also has a disadvantage that because we keep alive the shared memory
region's handle until the shmem is destroyed, so that it can be
re-transmitted, we may end up using more FDs or HANDLEs while running.

This patch intentionally doesn't change or simplify callsites, removing
APIs like RaiiShmem, in order to make it easier to revert if this causes
issues on platforms like Linux due to FD exhaustion. If we don't run
into increased resource exhaustion problems, we can make these changes
in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D140211
2022-04-18 19:26:15 +00:00
Gijs Kruitbosch ce3b4cdbc5 Bug 1763257 - ipdl parser's duplicate definition check should do case-insensitive filename comparisons to avoid being confused, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D143052
2022-04-06 14:54:47 +00:00
Andrew McCreight 3c7ec4776c Bug 1760244 - Make badProtocolInclude syntactically valid. r=nika
The Python IPDL frontend checks for includes before checking if the
entire file is syntactically valid. However, my Rust IPDL front end
does it later, so it ends up failing in a syntax error before
noticing the invalid include. I think the basic issue is that this
file wasn't updated when async was made mandatory, because it didn't
affect the results. Let's just fix the file so it only tests one
thing.

Differential Revision: https://phabricator.services.mozilla.com/D141445
2022-03-18 17:09:33 +00:00
Nika Layzell 56e6865c9c Bug 1759609 - Make IPDL typedef generation happen non-recursively, r=ipc-reviewers,mccr8
Before this change, the collection of typedefs to include in IPDL
protocols was being performed in the _DecorateWithCXXStuff pass of
lower.py. This pass iterates over all included headers, including
recursively, so will also visit headers included by headers you import.

The recursive behaviour caused issues because importing and
forward-declaring imported types is non-recursive, looking at exported
types only one layer deep. This could lead to typedefs being generated
in IPDL protocols referencing types which could never be named by the
IPDL code, and which had no definition in c++, leading to build errors.

This patch changes the logic to instead happen during the
_GenerateProtocolActorCode pass of lower.py, which is also where
required forward declarations and imports are handled, allowing us to
keep the set of typedefs generated more tightly in sync with the actual
set of types available to the actor.

This required some changes in client code which was relying on
incorrectly generated typedefs, however these types have now been fixed.

Differential Revision: https://phabricator.services.mozilla.com/D141032
2022-03-17 18:09:36 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Jan Varga 01ad68bec6 Bug 1754448 - Add basic testing for snapshot re-using; r=dom-storage-reviewers,webidl,asuth,jari,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D138405
2022-03-09 09:43:09 +00:00
sotaro 7991ca6079 Bug 1757879 - Make SimulateDeviceReset() similar to actual device reset handling r=ipc-reviewers,gfx-reviewers,lsalzman,mccr8
SimulateDeviceReset() works differently from actual device reset handling. It seems better to make SimulateDeviceReset() more similar to actual device reset handling.

Differential Revision: https://phabricator.services.mozilla.com/D140161
2022-03-08 23:14:28 +00:00
Nika Layzell 6617df9161 Bug 1754037 - Part 8: Switch ipdlc to use ParamTraits instead of IPDLParamTraits, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D140009
2022-03-04 15:39:43 +00:00
Nika Layzell 05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Nika Layzell 1d44e4355c Bug 1754037 - Part 3b: Update IPDL generated code to new ParamTraits API, r=ipc-reviewers,mccr8
Updates to the IPDL code generator to make the generated code correctly
use the new ParamTraits APIs for serialization and deserialization.

IPDL continues to use IPDLParamTraits after this change, it will be
changed to use ParamTraits in a later part.

Differential Revision: https://phabricator.services.mozilla.com/D140002
2022-03-04 15:39:40 +00:00
Nika Layzell 2f62d8c857 Bug 1751948 - Part 6: Add basic support for running IPDL unit tests during gtest, r=ipc-reviewers,andi,handyman
This patch introduces a new system for building IPDL unit tests, which is
roughly inspired by the old cxx unit test design, however designed to work with
gtest. It re-uses the existing IPDLUnitTest process type, using static
constructors only present in xul-gtest to register child actor constructors and
ProcessChild implementations to avoid bloating xul.

The IPDLUnitTest actor is used as a backchannel to communicate test failures
from the child process back to the parent process, and manage the test's async
lifecycle more reliably.

The IPDLUnitTest process also needed to have various properties about how it was
initialized adjusted:

* The IPDLUnitTest process should now always load xul-gtest when running
  gtests, by using the "Self" process type and adding a DYLD_LIBRARY_PATH override
  on macOS where the "Self" process type cannot be used.
* The IPDLUnitTest process now initializes minimal XPCOM, and runs a
  frankeneventloop to allow it to use XPCOM event loop structures such as
  SpinEventLoopUntil in tests.
* Support for creating IPDLUnitTest processes on Android was added, as these
  tests had never run on android before.

Differential Revision: https://phabricator.services.mozilla.com/D137170
2022-02-28 21:01:49 +00:00
Jonathan Watt 300fb860be Bug 1756447 - Remove the code supporting saving print setting from the content process. r=bobowen,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D139292
2022-02-27 23:45:56 +00:00
Jan Varga 07a99f0a17 Bug 1754448 - Simplify ending of an explicit snapshot; r=dom-storage-reviewers,ipc-reviewers,mccr8,jari
Differential Revision: https://phabricator.services.mozilla.com/D138407
2022-02-21 19:24:30 +00:00
Nika Layzell 40b4794120 Bug 1346446 - Add a DataPipe shared memory pipe type, r=ipc-reviewers,handyman
This is a high-level async pipe which can be cheaply transferred between
processes and uses a shared memory ring buffer as its implementation. This can
be used to efficiently stream non-message oriented data between processes and
is not bound to any particular protocol or thread.

Differential Revision: https://phabricator.services.mozilla.com/D135161
2022-02-14 23:59:35 +00:00
Bob Owen e82a8ce887 Bug 1695556 p3: Add file tests for content process sandbox. r=handyman,ipc-reviewers,jld
Depends on D135693

Differential Revision: https://phabricator.services.mozilla.com/D135694
2022-02-10 16:56:02 +00:00
Nika Layzell dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Nika Layzell 91ec85c593 Bug 1752444 - Part 2: Rewrite direct_call.py protocols to use {Parent,Child}Impl attributes, r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
This is a mechanical change which was performed by a script based on the
contents of direct_call.py, and then manually checked over to fix
various rewriting bugs caused by my glorified sed script. See the
previous part for more context on the change.

Differential Revision: https://phabricator.services.mozilla.com/D137227
2022-02-09 17:29:46 +00:00
Nika Layzell 261ef74ea4 Bug 1752444 - Part 1: Add {Parent,Child}Impl attributes to ipdl, r=ipc-reviewers,mccr8
These attributes replace the previous direct_call.py table which
specified how to locate the concrete implementation of a protocol and
whether it should use a virtual implementation or not.

They work by specifying the concrete type for an actor, and disabling
the automatic inclusion of the implementation's header file, which can
be included explicitly with an `include "";` statement. This allows
customizing both the name and include path of the concrete
implementation of an interface.

Differential Revision: https://phabricator.services.mozilla.com/D137226
2022-02-09 17:29:45 +00:00
Nika Layzell 9919099425 Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.

A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.

Differential Revision: https://phabricator.services.mozilla.com/D130381
2022-02-08 23:53:45 +00:00
Nika Layzell 486c5fc2c4 Bug 1751071 - Correctly forward-declare/import included but unused types in ipdlh headers, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D137164
2022-02-08 23:53:44 +00:00
Sandor Molnar 6035b5cf95 Backed out changeset ba6624225635 (bug 1738734) for causing build bustages in ipc/PUtilityProcessParent. 2022-02-01 00:57:12 +02:00
Nika Layzell c45d6350d4 Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.

A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.

Differential Revision: https://phabricator.services.mozilla.com/D130381
2022-01-31 22:26:05 +00:00
Nika Layzell f17ea9075a Bug 1751047 - Remove support for intr messages from IPC, r=ipc-reviewers,mccr8
All uses of the intr message type have been removed from the tree, and the only
remaining uses are in IPDL tests, which currently do not test the IPDL runtime.
This test fully removes support for intr messages from the MessageChannel
interface.

Differential Revision: https://phabricator.services.mozilla.com/D136500
2022-01-27 16:42:13 +00:00
David Parks 1195985bf3 Bug 1696382: Add IPC in-tree docs r=nika,gerard-majax,ipc-reviewers
Includes docs for IPDL actors and protocols.

Differential Revision: https://phabricator.services.mozilla.com/D121871
2022-01-13 00:10:20 +00:00
Nika Layzell 7a827c900c Bug 1631402 - Remove expired IPC_MAIN_THREAD_LATENCY probes, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D135154
2022-01-07 20:33:01 +00:00
Noemi Erli 0950d681d3 Backed out changeset 686ae9e71a9c (bug 1631402) for causing build bustage in MessageChannel.cpp 2022-01-06 00:45:48 +02:00
Jed Davis 0dd45b5bf8 Bug 1746289 - Deprecate the IPDL `intr` keyword and tag legacy uses in tests. r=nika
At this point, the only remaining uses of `intr` are in test files.  To
avoid the possibility of adding any more (until such time as we deal
with the tests and can get rid of `intr` entirely), this patch requires
a `[LegacyIntr]` attribute on any declaration that uses them, and tags
all the uses in tests with that attribute.

Differential Revision: https://phabricator.services.mozilla.com/D133964
2022-01-05 22:04:46 +00:00
Nika Layzell 4ae3066937 Bug 1631402 - Remove expired IPC_MAIN_THREAD_LATENCY probes, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D135154
2022-01-05 21:20:15 +00:00
Mike Hommey fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Cristian Tuns e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Mike Hommey b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00
Dana Keeler e06d1bceee Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,glandium,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Depends on D130820

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-18 01:30:24 +00:00
Jonathan Watt ac90ddff59 Bug 1745452 - Remove the print progress dialog code. r=mstriemer,bobowen,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133500
2021-12-16 15:12:33 +00:00
Butkovits Atila 7d46682c0e Backed out changeset 51d7c5d96ceb (bug 1745452) for causing failures at browser_all_files_referenced.js. CLOSED TREE 2021-12-16 15:13:34 +02:00
Jonathan Watt f2d22001b0 Bug 1745452 - Remove the print progress dialog code. r=mstriemer,bobowen,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133500
2021-12-16 11:45:59 +00:00
Cosmin Sabou 045a43b2c8 Backed out 2 changesets (bug 1712837) for causing an increase in crashes (bug 1735798). a=backout
Backed out changeset 51773d1ab7b5 (bug 1712837)
Backed out changeset 97b0a77e4ce7 (bug 1712837)
2021-12-15 12:24:03 +02:00
Dana Keeler fe0468b14a Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-13 23:59:08 +00:00
Cristian Tuns b00f575d28 Merge mozilla-central to autoland on a CLOSED TREE 2021-12-10 09:41:08 -05:00
Cristian Tuns 9ad5101118 Backed out changeset 5396b58ddae7 (bug 1712837) for causing Android ARMv7 build bustages. a=backout 2021-12-10 09:35:39 -05:00
Andrew Osmond 663576a9e6 Bug 1736177 - Part 9. Add plumbing to snapshot worker canvas contexts from the main thread. r=jgilbert,ipc-reviewers,nika
Right now, if we wanted to get a snapshot of an OffscreenCanvas context
on a worker thread from the main thread, we would need to block the main
thread on the worker thread, and from the worker thread, issue a sync
IPC call get the front buffer snapshot.

This patch adds an alternative which allows the main thread to go
directly to the canvas owning thread in the compositor process to get
the snapshot, thereby bypassing the worker thread in content process
entirely. All it needs as the unique ID of the CanvasManagerChild
instance, and the protocol ID of the WebGLChild instance.

This will be used for Firefox screenshots, New Tab tiles, and printing.

Differential Revision: https://phabricator.services.mozilla.com/D130785
2021-12-10 02:57:55 +00:00
Dana Keeler c52192ebff Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-10 00:24:49 +00:00
Csoregi Natalia 1c7cae16d7 Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond 8077b44a0c Bug 1736177 - Part 9. Add plumbing to snapshot worker canvas contexts from the main thread. r=jgilbert,ipc-reviewers,nika
Right now, if we wanted to get a snapshot of an OffscreenCanvas context
on a worker thread from the main thread, we would need to block the main
thread on the worker thread, and from the worker thread, issue a sync
IPC call get the front buffer snapshot.

This patch adds an alternative which allows the main thread to go
directly to the canvas owning thread in the compositor process to get
the snapshot, thereby bypassing the worker thread in content process
entirely. All it needs as the unique ID of the CanvasManagerChild
instance, and the protocol ID of the WebGLChild instance.

This will be used for Firefox screenshots, New Tab tiles, and printing.

Differential Revision: https://phabricator.services.mozilla.com/D130785
2021-12-09 19:25:28 +00:00
Andreea Pavel 041f6f706d Backed out 2 changesets (bug 1712837) for win build bustages on a CLOSED TREE
Backed out changeset e754af875d57 (bug 1712837)
Backed out changeset 020eaab241a8 (bug 1712837)
2021-12-07 02:21:09 +02:00
Dana Keeler 8d68ea1d86 Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-06 23:43:32 +00:00
Cathy Lu 8348b23f54 Bug 1697647 - Add screen orientation lock api r=ipc-reviewers,mccr8,agi,smaug,jonalmeida
Previously, the screenOrientation.lock API was for Fennec and not supported for Fenix and multi-process use. The overall idea is to now allow apps to use the API through a delegate and make asynchronous calls to LockDeviceOrientation. This required replacing the existing code that returned a default false bool to calls that perform the requested orientation change and instead return a promise that contained either an allow or deny value.

Returning a promise instead of a bool involved changing the API calls from the C++ side to Java. The new general control flow of screenOrientation lock follows: an app calls C++ ScreenOrientation.lock() which eventually dispatches LockOrientationTask to resolve the pending orientation promise. Hal.cpp sends an IPC call to the content process and RecvLockScreenOrientation retrieves the current instance of geckoRuntime and calls the java side LockScreenOrientation. Apps must create a delegate and override onOrientationLock to set the requested orientation. In geckoview's testing, this is done with the android API setRequestedOrientation. Once a device orientation change has been triggered, native OnOrientationChange calls to NotifyScreenConfigurationChange, which notifies all observers and dispatches a change event to resolve the pending orientation promise.

Testing:
I used a demo on the GeckoView Example (https://usefulangle.com/demos/105/screen.html) to test locking to landscape orientation. This required a change to the GVE to show the app from recreating the whole thing on orientation change. In the example AndroidManifest xml file, `orientation` prevents restart when orientation changes.

The Junit/Kotlin tests were to verify that the expected orientation delegate was called with the expected new orientation value, in an orientation change, if the new orientation was the same as the current, and if the pre-lock conditions such as being fullscreen were not met.

A static preference `dom.screenorientation.allow-lock` was added to the dom group, since it affects the ui dom) and is currently turned off. C++ can access it through its mirrored variable dom_screenorientation_allow_lock (same name but with underscores). The junit tests turn the preference on and test the lock feature.

Reference:
Orientation constant values:
    C++
        1 ScreenOrientation_PortraitPrimary); - vertical with button at bottom
        2 ScreenOrientation_PortraitSecondary); - vertical with button at top
        4 ScreenOrientation_LandscapePrimary); - horizational w button right
        8 ScreenOrientation_LandscapeSecondary); - horization button left
        16 ScreenOrientation_Default);
    Java
        1 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_PRIMARY.value
        2 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_SECONDARY.value
        4 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_PRIMARY.value
        8 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_SECONDARY.value

    Java public API
        0 ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
        1 Activitynfo.SCREEN_ORIENTATION_PORTRAIT

    Android
        1 ORIENTATION_PORTRAIT
        2 ORIENTATION_LANDSCAPE

Differential Revision: https://phabricator.services.mozilla.com/D129427
2021-12-06 13:58:37 +00:00
Butkovits Atila cd8a98f0df Backed out changeset 05897abf2c4e (bug 1697647) for causing failures at lock-sandboxed-iframe.html. CLOSED TREE 2021-12-04 04:32:48 +02:00
Cathy Lu 3e9924d513 Bug 1697647 - Add screen orientation lock api r=ipc-reviewers,mccr8,agi,smaug,jonalmeida
Previously, the screenOrientation.lock API was for Fennec and not supported for Fenix and multi-process use. The overall idea is to now allow apps to use the API through a delegate and make asynchronous calls to LockDeviceOrientation. This required replacing the existing code that returned a default false bool to calls that perform the requested orientation change and instead return a promise that contained either an allow or deny value.

Returning a promise instead of a bool involved changing the API calls from the C++ side to Java. The new general control flow of screenOrientation lock follows: an app calls C++ ScreenOrientation.lock() which eventually dispatches LockOrientationTask to resolve the pending orientation promise. Hal.cpp sends an IPC call to the content process and RecvLockScreenOrientation retrieves the current instance of geckoRuntime and calls the java side LockScreenOrientation. Apps must create a delegate and override onOrientationLock to set the requested orientation. In geckoview's testing, this is done with the android API setRequestedOrientation. Once a device orientation change has been triggered, native OnOrientationChange calls to NotifyScreenConfigurationChange, which notifies all observers and dispatches a change event to resolve the pending orientation promise.

Testing:
I used a demo on the GeckoView Example (https://usefulangle.com/demos/105/screen.html) to test locking to landscape orientation. This required a change to the GVE to show the app from recreating the whole thing on orientation change. In the example AndroidManifest xml file, `orientation` prevents restart when orientation changes.

The Junit/Kotlin tests were to verify that the expected orientation delegate was called with the expected new orientation value, in an orientation change, if the new orientation was the same as the current, and if the pre-lock conditions such as being fullscreen were not met.

A static preference `dom.screenorientation.allow-lock` was added to the dom group, since it affects the ui dom) and is currently turned off. C++ can access it through its mirrored variable dom_screenorientation_allow_lock (same name but with underscores). The junit tests turn the preference on and test the lock feature.

Reference:
Orientation constant values:
    C++
        1 ScreenOrientation_PortraitPrimary); - vertical with button at bottom
        2 ScreenOrientation_PortraitSecondary); - vertical with button at top
        4 ScreenOrientation_LandscapePrimary); - horizational w button right
        8 ScreenOrientation_LandscapeSecondary); - horization button left
        16 ScreenOrientation_Default);
    Java
        1 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_PRIMARY.value
        2 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_SECONDARY.value
        4 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_PRIMARY.value
        8 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_SECONDARY.value

    Java public API
        0 ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
        1 Activitynfo.SCREEN_ORIENTATION_PORTRAIT

    Android
        1 ORIENTATION_PORTRAIT
        2 ORIENTATION_LANDSCAPE

Differential Revision: https://phabricator.services.mozilla.com/D129427
2021-12-03 23:49:25 +00:00
criss daea1328b7 Backed out changeset 9c623cac6b96 (bug 1697647) for causing mozlint failures. CLOSED TREE 2021-12-04 01:34:21 +02:00
Cathy Lu 1e4d05e6fd Bug 1697647 - Add screen orientation lock api r=ipc-reviewers,mccr8,agi,smaug,jonalmeida
Previously, the screenOrientation.lock API was for Fennec and not supported for Fenix and multi-process use. The overall idea is to now allow apps to use the API through a delegate and make asynchronous calls to LockDeviceOrientation. This required replacing the existing code that returned a default false bool to calls that perform the requested orientation change and instead return a promise that contained either an allow or deny value.

Returning a promise instead of a bool involved changing the API calls from the C++ side to Java. The new general control flow of screenOrientation lock follows: an app calls C++ ScreenOrientation.lock() which eventually dispatches LockOrientationTask to resolve the pending orientation promise. Hal.cpp sends an IPC call to the content process and RecvLockScreenOrientation retrieves the current instance of geckoRuntime and calls the java side LockScreenOrientation. Apps must create a delegate and override onOrientationLock to set the requested orientation. In geckoview's testing, this is done with the android API setRequestedOrientation. Once a device orientation change has been triggered, native OnOrientationChange calls to NotifyScreenConfigurationChange, which notifies all observers and dispatches a change event to resolve the pending orientation promise.

Testing:
I used a demo on the GeckoView Example (https://usefulangle.com/demos/105/screen.html) to test locking to landscape orientation. This required a change to the GVE to show the app from recreating the whole thing on orientation change. In the example AndroidManifest xml file, `orientation` prevents restart when orientation changes.

The Junit/Kotlin tests were to verify that the expected orientation delegate was called with the expected new orientation value, in an orientation change, if the new orientation was the same as the current, and if the pre-lock conditions such as being fullscreen were not met.

A static preference `dom.screenorientation.allow-lock` was added to the dom group, since it affects the ui dom) and is currently turned off. C++ can access it through its mirrored variable dom_screenorientation_allow_lock (same name but with underscores). The junit tests turn the preference on and test the lock feature.

Reference:
Orientation constant values:
    C++
        1 ScreenOrientation_PortraitPrimary); - vertical with button at bottom
        2 ScreenOrientation_PortraitSecondary); - vertical with button at top
        4 ScreenOrientation_LandscapePrimary); - horizational w button right
        8 ScreenOrientation_LandscapeSecondary); - horization button left
        16 ScreenOrientation_Default);
    Java
        1 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_PRIMARY.value
        2 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_SECONDARY.value
        4 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_PRIMARY.value
        8 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_SECONDARY.value

    Java public API
        0 ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
        1 Activitynfo.SCREEN_ORIENTATION_PORTRAIT

    Android
        1 ORIENTATION_PORTRAIT
        2 ORIENTATION_LANDSCAPE

Differential Revision: https://phabricator.services.mozilla.com/D129427
2021-12-03 22:35:22 +00:00
Csoregi Natalia 59f022092c Backed out 2 changesets (bug 1712837) for causing RemoteProcessMonitor failures. CLOSED TREE
Backed out changeset e3ed61b61357 (bug 1712837)
Backed out changeset 19b9dfd60749 (bug 1712837)
2021-12-01 22:36:35 +02:00
Dana Keeler c02a76841b Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-01 18:10:34 +00:00
Nika Layzell c8c4669312 Bug 1734739 - Part 2: Stop requiring the OtherPid to create Endpoint, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128219
2021-11-24 17:56:00 +00:00
Marian-Vasile Laza 133cd29435 Backed out 2 changesets (bug 1712837) for causing mochitest and marionette test failures. CLOSED TREE
Backed out changeset ecfd23a7ef69 (bug 1712837)
Backed out changeset 51529cb4682e (bug 1712837)
2021-11-11 01:52:57 +02:00
Dana Keeler 15ebcb5e82 Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-11-10 21:48:47 +00:00
Nika Layzell 803584be9d Bug 1732343 - Part 1: Better support for moveonly types in IPDL, r=handyman
In part 2 of this patch, a large number of messages are being converted to
contain move-only types, both as direct arguments and within compound data
structures. This revealed some limitations in IPDL's handling of moveonly
types, which this patch hopes to rectify. This also required changes to allow
distinguishing between types which require move to send vs. them not having a
move constructor.

This does not fully fix the underlying issues, but attempts to preserve
existing behaviour while improving support for the new types being added. There
should be further cleanup in the future.

Differential Revision: https://phabricator.services.mozilla.com/D126563
2021-11-09 14:17:31 +00:00
Cristian Tuns cbd178830f Backed out 10 changesets (bug 1732343) for causing coverage build bustages (Bug 1739590).
Backed out changeset bba94c79f3e1 (bug 1732343)
Backed out changeset d30fa1e1f605 (bug 1732343)
Backed out changeset ed0b4f757c4b (bug 1732343)
Backed out changeset a272da134c34 (bug 1732343)
Backed out changeset ccb259d73843 (bug 1732343)
Backed out changeset a292990b62de (bug 1732343)
Backed out changeset 7d1854782ca8 (bug 1732343)
Backed out changeset 29eaabd9ffb3 (bug 1732343)
Backed out changeset 1aa26657a7a6 (bug 1732343)
Backed out changeset 7a6708dc620a (bug 1732343)
2021-11-05 07:21:04 -04:00
Nika Layzell 9f23266238 Bug 1732343 - Part 1: Better support for moveonly types in IPDL, r=handyman
In part 2 of this patch, a large number of messages are being converted to
contain move-only types, both as direct arguments and within compound data
structures. This revealed some limitations in IPDL's handling of moveonly
types, which this patch hopes to rectify. This also required changes to allow
distinguishing between types which require move to send vs. them not having a
move constructor.

This does not fully fix the underlying issues, but attempts to preserve
existing behaviour while improving support for the new types being added. There
should be further cleanup in the future.

Differential Revision: https://phabricator.services.mozilla.com/D126563
2021-11-04 19:20:17 +00:00
Nika Layzell 8d97cd8228 Bug 1725572 - Part 1: Support automatic cleanup for ManagedEndpoint instances, r=handyman
This patch adds support for ManagedEndpoint instances to be dropped &
gracefully destroyed. Before this change, a ManagedEndpoint which was
dropped without being bound would not clean up its' peer actor, meaning
that messages to and from that actor would be discarded.

This is done by adding a new actor destroy reason for dropping a
ManagedEndpoint.

Differential Revision: https://phabricator.services.mozilla.com/D128776
2021-10-18 22:59:17 +00:00
Tetsuharu Ohzeki 0109338d54 Bug 1729476 - Remove unused CompositorBridgeChild::SendMakeSnapshot(). r=gfx-reviewers,ipc-reviewers,nika,nical
Differential Revision: https://phabricator.services.mozilla.com/D124818
2021-09-07 22:37:48 +00:00
Matt Woodrow d751b43176 Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 04:59:57 +00:00
Butkovits Atila c83e348e26 Backed out 2 changesets (bug 1727488, bug 1727489) for causing bustages on KnowsCompositor.cpp. CLOSED TREE
Backed out changeset 5a00db1b7a6a (bug 1727489)
Backed out changeset 13686567e748 (bug 1727488)
2021-08-26 04:49:16 +03:00
Matt Woodrow 0d4e9aa48a Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 00:25:21 +00:00
Nika Layzell e3b52f319a Bug 1715755 - Part 1: Don't ignore dead actors for sync and intr messages, r=handyman
When this change was first implemented, it ignored dead actors for all types of
messages, but for messages with replies they cannot be ignored, as a reply must
be sent. This should fix that oversight.

Differential Revision: https://phabricator.services.mozilla.com/D123148
2021-08-25 18:30:24 +00:00
Makoto Kato 329f65c790 Bug 1725593 - Get rid of SendCheckAndSuggest sync IPC. r=masayuki,ipc-reviewers,mccr8
Depends on D122579

Differential Revision: https://phabricator.services.mozilla.com/D122580
2021-08-16 01:40:00 +00:00
Marian-Vasile Laza e954091acf Backed out 2 changesets (bug 1720965) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 2ed56ddce45a (bug 1720965)
Backed out changeset 3531708ab54e (bug 1720965)
2021-08-04 03:14:29 +03:00
Jeff Gilbert fba93f87af Bug 1720965 - Give up on move semantics for Shmem for now. r=nika
Don't pretend that it's not a copy, as this causes readers to get the
wrong impression of how it behaves.

Differential Revision: https://phabricator.services.mozilla.com/D120124
2021-08-03 20:06:55 +00:00
Kashav Madan f36c3b6e89 Bug 1720688 - Handle invalid attribute values for "Nested"/"NestedUpTo" and "Priority", r=mccr8
This KeyErrors since we build the ast before we typecheck attributes.

Differential Revision: https://phabricator.services.mozilla.com/D120376
2021-07-22 02:24:43 +00:00
Kashav Madan 5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Nika Layzell 7802bbb486 Bug 1706374 - Part 12b: Use NodeController for primary process channels, r=handyman
This extends on the changes in part 12a and consumes the new PortRef-based API
in all existing process types other than the fork server. The IPDL C++ unit
tests were already broken before this change, and were not updated.

Differential Revision: https://phabricator.services.mozilla.com/D112777
2021-06-22 18:17:23 +00:00
Nika Layzell 985adb750c Bug 1706374 - Part 11: Add NodeController component bridging IPC and Ports, r=handyman
The NodeController and NodeChannel types act as the backbone connecting the
existing IPC logic and driving the ports routing code. Individual NodeChannel
objects wrap and respond to messages from IPC::Channel, and the NodeController
orchestrates all messaging for a process.

The design of these types are inspired by the types with the same names from
Mojo but have been simplified and streamlined to only support features used by
Gecko.

Support for attaching ports or handles to messages hasn't been added yet, but
can be added in follow-up patches.

Differential Revision: https://phabricator.services.mozilla.com/D112775
2021-06-22 18:17:22 +00:00
Butkovits Atila 83f57b5c69 Backed out 22 changesets (bug 1714226, bug 1706374, bug 1713148) for causing build bustages on MessageChannel.cpp. CLOSED TREE
Backed out changeset ea469eaa54ca (bug 1713148)
Backed out changeset fd8523d5126e (bug 1713148)
Backed out changeset f2e5309c914c (bug 1713148)
Backed out changeset 2da57973ed55 (bug 1713148)
Backed out changeset 677e1ee99bb2 (bug 1713148)
Backed out changeset b4c0619e79bf (bug 1706374)
Backed out changeset c02fa459e77d (bug 1706374)
Backed out changeset 72dc6537cf0b (bug 1706374)
Backed out changeset 48088463c656 (bug 1706374)
Backed out changeset b09ae4c3a94b (bug 1706374)
Backed out changeset 04422175004b (bug 1706374)
Backed out changeset 110b2384e7d1 (bug 1706374)
Backed out changeset ab2b086abbd4 (bug 1706374)
Backed out changeset ffde07f73249 (bug 1706374)
Backed out changeset c6303af17ff4 (bug 1706374)
Backed out changeset 02249671c2f9 (bug 1706374)
Backed out changeset a6a5d05b5636 (bug 1706374)
Backed out changeset e21b6defb805 (bug 1706374)
Backed out changeset c72c5be9ddb1 (bug 1706374)
Backed out changeset 23cd961575a6 (bug 1706374)
Backed out changeset b412d6e9e145 (bug 1706374)
Backed out changeset a8ec285d6472 (bug 1714226)
2021-06-22 04:03:56 +03:00
Nika Layzell 1d4aba6770 Bug 1706374 - Part 12b: Use NodeController for primary process channels, r=handyman
This extends on the changes in part 12a and consumes the new PortRef-based API
in all existing process types other than the fork server. The IPDL C++ unit
tests were already broken before this change, and were not updated.

Differential Revision: https://phabricator.services.mozilla.com/D112777
2021-06-21 21:53:11 +00:00
Nika Layzell 6de2add6d7 Bug 1706374 - Part 11: Add NodeController component bridging IPC and Ports, r=handyman
The NodeController and NodeChannel types act as the backbone connecting the
existing IPC logic and driving the ports routing code. Individual NodeChannel
objects wrap and respond to messages from IPC::Channel, and the NodeController
orchestrates all messaging for a process.

The design of these types are inspired by the types with the same names from
Mojo but have been simplified and streamlined to only support features used by
Gecko.

Support for attaching ports or handles to messages hasn't been added yet, but
can be added in follow-up patches.

Differential Revision: https://phabricator.services.mozilla.com/D112775
2021-06-21 21:53:10 +00:00
Olli Pettay e5eb74b09d Bug 1708042, add support for 'control' priority in ipdl, r=jld,ipc-reviewers
Depends on D115404

Differential Revision: https://phabricator.services.mozilla.com/D115405
2021-05-21 15:46:46 +00:00
Iulian Moraru e0b2722506 Backed out 3 changesets (bug 1708042) for causing wr failures on background-color-animation-in-body.html.
Backed out changeset f8febc2db198 (bug 1708042)
Backed out changeset a0fccd7121b5 (bug 1708042)
Backed out changeset ddc6d95f0601 (bug 1708042)
2021-05-21 16:39:38 +03:00
Olli Pettay d147cf8e03 Bug 1708042, add support for 'control' priority in ipdl, r=jld,ipc-reviewers
Depends on D115404

Differential Revision: https://phabricator.services.mozilla.com/D115405
2021-05-20 12:42:31 +00:00
Edgar Chen 58fea44e06 Bug 1672726 - Part 2: Support dispatching synthesized touch events through parent process; r=ipc-reviewers,botond,nika
in order to support dispatching synthesized touch events to fission oop iframe.

Depends on D112127

Differential Revision: https://phabricator.services.mozilla.com/D112128
2021-04-22 16:01:26 +00:00
Mitchell Hentges 50483887d0 Bug 1705444: Pipe IPDL test status to exit code r=sheehan
By returning non-zero when tests fail, `make` can pick up the failure.

Differential Revision: https://phabricator.services.mozilla.com/D112789
2021-04-21 15:34:42 +00:00
Sean Feng 56c1ae0d21 Bug 1705443 - Use vsync priority in PIntrPriority::Msg r=smaug
We've renamed the `high` priority to `vsync` in bug 1697585,
this is just adapting the change.

Differential Revision: https://phabricator.services.mozilla.com/D112198
2021-04-15 19:07:06 +00:00
Sean Feng 6ba50278a7 Bug 1697585 - Rename high priority to vsync priority r=smaug
`High` priority is being used for vsync tasks, so we should rename it to
make it clear, and renaming it also makes our priority naming less
confusing.

Differential Revision: https://phabricator.services.mozilla.com/D109536
2021-04-14 19:56:42 +00:00
David Parks 9032efe20c Bug 1682030 - Remove NPAPI plugin async rendering support r=bas,jgilbert,ipc-reviewers,mccr8
Removes async (windowless) NPAPI plugin rendering methods used to render a plugin to an offscreen surface in the GPU process.  None of this code is used since we have removed all NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107152
2021-04-06 19:28:16 +00:00
David Parks 311a1c73dd Bug 1682030 - Remove some dead NPAPI code from dom/plugins and related spots. r=jmathies,mconley,ipc-reviewers,mccr8
This is the first of two patches in this series that removes a large amount of now dead code from dom/plugins as part of removing all NPAPI plugin support.  This patch removes re-entrancy guards we have for Windows OnPaint messages, as the guards were only needed for windowed plugins.

Differential Revision: https://phabricator.services.mozilla.com/D107144
2021-04-06 19:28:12 +00:00
David Parks d05df71761 Bug 1682030 - Remove PPluginWidget. r=jmathies,ipc-reviewers,nika
Removes the NPAPI plugin widget actor and its proxy, as part of removing all of NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107141
2021-04-06 19:28:11 +00:00
Brindusan Cristian 972d8621c6 Backed out 5 changesets (bug 1697585) for causing build bustages on nsTimerImpl.h. CLOSED TREE
Backed out changeset e9e4a710e7d1 (bug 1697585)
Backed out changeset bc271f42bcb7 (bug 1697585)
Backed out changeset d8516aec6a5e (bug 1697585)
Backed out changeset 0b1bc6cb84af (bug 1697585)
Backed out changeset 074ebebaee27 (bug 1697585)
2021-04-06 17:45:02 +03:00
Sean Feng dae8c27301 Bug 1697585 - Rename high priority to vsync priority r=smaug
`High` priority is being used for vsync tasks, so we should rename it to
make it clear, and renaming it also makes our priority naming less
confusing.

Differential Revision: https://phabricator.services.mozilla.com/D109536
2021-04-06 13:10:50 +00:00
Csoregi Natalia d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks bd753c5ff6 Bug 1682030 - Remove NPAPI plugin async rendering support r=bas,jgilbert,ipc-reviewers,mccr8
Removes async (windowless) NPAPI plugin rendering methods used to render a plugin to an offscreen surface in the GPU process.  None of this code is used since we have removed all NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107152
2021-04-05 23:48:40 +00:00
David Parks 3987158be1 Bug 1682030 - Remove some dead NPAPI code from dom/plugins and related spots. r=jmathies,mconley,ipc-reviewers,mccr8
This is the first of two patches in this series that removes a large amount of now dead code from dom/plugins as part of removing all NPAPI plugin support.  This patch removes re-entrancy guards we have for Windows OnPaint messages, as the guards were only needed for windowed plugins.

Differential Revision: https://phabricator.services.mozilla.com/D107144
2021-04-05 23:48:35 +00:00
David Parks 45f5dd79ff Bug 1682030 - Remove PPluginWidget. r=jmathies,ipc-reviewers,nika
Removes the NPAPI plugin widget actor and its proxy, as part of removing all of NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107141
2021-04-05 23:48:34 +00:00
Simon Giesecke 4a308827e3 Bug 708901 - Migrate to nsTHashSet in ipc. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109322
2021-03-24 17:56:48 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke b07f34785d Bug 708901 - Migrate to nsTHashSet in ipc. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109322
2021-03-24 16:59:00 +00:00
Tom Ritter 93ca1b2915 Bug 1610570: Add a 'NoTaint=allvalid' attribute as well, and cut Gamepad over to it r=cmartin
Depends on D108247

Differential Revision: https://phabricator.services.mozilla.com/D108248
2021-03-23 18:26:30 +00:00
Tom Ritter a40387b8a8 Bug 1610570: Pass attributes through so lower.py can change code emission, and handle NoTaint r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108246
2021-03-23 18:26:30 +00:00
Tom Ritter 7275e370ec Bug 1610570: Support the NoTaint attribute on method parameters with the passback value r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108245
2021-03-23 18:26:29 +00:00
Noemi Erli cc4a17cea3 Backed out 4 changesets (bug 1610570) for causing lint failure in lower.py CLOSED TREE
Backed out changeset faf6f57c64eb (bug 1610570)
Backed out changeset ccc49e1fd15c (bug 1610570)
Backed out changeset 83b086da2960 (bug 1610570)
Backed out changeset c7f732f443b1 (bug 1610570)
2021-03-23 19:25:55 +02:00
Tom Ritter 6470917122 Bug 1610570: Add a 'NoTaint=allvalid' attribute as well, and cut Gamepad over to it r=cmartin
Depends on D108247

Differential Revision: https://phabricator.services.mozilla.com/D108248
2021-03-23 15:15:39 +00:00
Tom Ritter 7d3fa671f3 Bug 1610570: Pass attributes through so lower.py can change code emission, and handle NoTaint r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108246
2021-03-23 15:15:38 +00:00
Tom Ritter 63f2838313 Bug 1610570: Support the NoTaint attribute on method parameters with the passback value r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108245
2021-03-23 15:15:37 +00:00
Cosmin Sabou b202667e72 Backed out 4 changesets (bug 1610570) for causing gamepad related bustages. CLOSED TREE
Backed out changeset 047120786a91 (bug 1610570)
Backed out changeset e2ef5d146d6a (bug 1610570)
Backed out changeset 6594ce800a6b (bug 1610570)
Backed out changeset 8d78b75b87fc (bug 1610570)
2021-03-22 20:57:04 +02:00
Tom Ritter 8a0b712b75 Bug 1610570: Add a 'NoTaint=allvalid' attribute as well, and cut Gamepad over to it r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D108248
2021-03-22 17:31:41 +00:00
Tom Ritter e453957de9 Bug 1610570: Pass attributes through so lower.py can change code emission, and handle NoTaint r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108246
2021-03-22 17:31:40 +00:00
Tom Ritter a693f1a809 Bug 1610570: Support the NoTaint attribute on method parameters with the passback value r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108245
2021-03-22 17:31:39 +00:00
Nika Layzell bf27412e89 Bug 1563624 - Part 2: Automatically reject async IPC responses when the resolver is dropped, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108868
2021-03-18 16:56:10 +00:00
Simon Giesecke 43b7a1eb09 Bug 1699098 - Avoid double hashtable lookup in generated RemoveManagee code. r=ipc-reviewers,jld
Differential Revision: https://phabricator.services.mozilla.com/D108768
2021-03-18 08:41:27 +00:00
Simon Giesecke 80fd24eaab Bug 1699100 - Remove unused code-emitting functions from lower.py. r=ipc-reviewers,jld
Differential Revision: https://phabricator.services.mozilla.com/D108771
2021-03-18 08:41:26 +00:00
Tom Ritter c744fc48da Bug 1698160: Add the magical incantation for running ipdl tests to the README r=mccr8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D108233
2021-03-12 18:55:21 +00:00
Mike Hommey 3d4a5dfac9 Bug 1694901 - Generate ipdl headers more deterministically. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D106575
2021-02-26 04:23:44 +00:00
Florian Quèze b2650ad078 Bug 1693347 - Avoid including GeckoProfiler.h in generated cpp files when it is not going to be used, r=nika.
Differential Revision: https://phabricator.services.mozilla.com/D105491
2021-02-18 11:56:20 +00:00
M. Sirringhaus 9ea20acd3b Bug 1666725 - Make gvfs e10s compatible r=valentin,necko-reviewers
Split channel into parent/child to be able to use dbus in the content sandbox

Differential Revision: https://phabricator.services.mozilla.com/D92206
2021-02-10 07:29:38 +00:00
Nika Layzell 86a03e6701 Bug 1689147 - Part 5: Change comparable to an extended attribute, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103370
2021-02-09 16:50:23 +00:00
Nika Layzell 661b4db5f0 Bug 1689147 - Part 4: Switch nested and prio to extended attributes, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103369
2021-02-09 16:50:22 +00:00
Nika Layzell b40f9a3000 Bug 1689147 - Part 3: Use extended attribute syntax for message modifiers, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103368
2021-02-09 16:50:22 +00:00
Nika Layzell ff239c6313 Bug 1689147 - Part 2: Remove verify support from ipdl, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103367
2021-02-09 16:50:21 +00:00
Nika Layzell 63fd915bfb Bug 1689147 - Part 1: Add extended attribute syntax to IPDL, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103366
2021-02-09 16:50:21 +00:00
Andreea Pavel 74d8a6339f Backed out changeset 29cd566d3c08 (bug 1666725) for build bustages at PNecko.ipdl on a CLOSED TREE 2021-02-09 15:11:47 +02:00
M. Sirringhaus 86e1612919 Bug 1666725 - Make gvfs e10s compatible r=valentin,necko-reviewers
Split channel into parent/child to be able to use dbus in the content sandbox

Differential Revision: https://phabricator.services.mozilla.com/D92206
2021-02-09 12:52:22 +00:00
Eitan Isaacson b9559d486e Bug 1690342 - P3: Add protocol stubs for mac attributed text. r=Jamie,mccr8,ipc-reviewers DONTBUILD
Created DocAccessibleTypes.ipdlh to put common types so they can be used in platform
extension protocols.

Differential Revision: https://phabricator.services.mozilla.com/D103801
2021-02-08 23:26:39 +00:00
Florian Quèze 16c243e0de Bug 1641181 - Record sync IPC markers, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D103335
2021-01-29 06:11:59 +00:00
Eitan Isaacson ca8fda7434 Bug 1681909 - P1: Add IPC stubs for ApplyPostSearchFilter. r=morgan,ipc-reviewers,mccr8
Applying a bulk filter on accessibles in content process allows us to avoid a potentially large (and variable) number of IPC sync calls to retrieve the accessible names. I chose to implement this as a "post filter" and not to actually do the entire search in content because it would cause a lot of duplication of code for non-IPC searching, and we wouldn't have the flexibility to combine a text search with any arbitrary search key as the API requires.

I also generalized the RangeTypes.h header to PlatformExtTypes so it can be used to define filter types as well.

Differential Revision: https://phabricator.services.mozilla.com/D100730
2021-01-05 20:35:22 +00:00
Masayuki Nakano 44dced1d87 Bug 1683226 - part 13: Get rid of `nsIWidget::StartPluginFocused()` r=m_kato,ipc-reviewers,mccr8
Depends on D100386

Differential Revision: https://phabricator.services.mozilla.com/D100387
2020-12-24 02:46:46 +00:00
Bryce Seager van Dyk 5c6194a73d Bug 1671246 - Use a union to pass NodeId in GMP. r=jbauman,ipc-reviewers,nika
Passing a union here allows us to reuse code and trim some code which was
duplicated to handle the different NodeId formats. This also consolidates the
former `NodeId` and `NodeIdData` structures into a new structure (working name
`NodeIdParts`) which represents parts that will later be converted to a string
based NodeId.

Differential Revision: https://phabricator.services.mozilla.com/D93569
2020-12-16 16:15:01 +00:00
Simon Giesecke ae75be244a Bug 1677466 - Split Endpoint.h and ProtocolMessageUtils.h from ProtocolUtils.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D93568

Depends on D93567
2020-11-23 16:06:42 +00:00
Simon Giesecke 5b3084384e Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93546

Depends on D93544
2020-11-23 16:05:20 +00:00
Simon Giesecke 16b9f61991 Bug 1660470 - Avoid including ProtocolUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93544

Depends on D93543
2020-11-23 16:05:07 +00:00
Simon Giesecke c902104cdb Bug 1660470 - Split ShmemMessageUtils.h from Shmem.h. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93543

Depends on D93321
2020-11-23 16:05:02 +00:00
Simon Giesecke c077183836 Bug 1660470 - Avoid including IPCMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93235

Depends on D93234
2020-11-23 16:03:47 +00:00
Simon Giesecke 93dd261db8 Bug 1660470 - Include C++ header files only from cpp file. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93233

Depends on D87865
2020-11-23 16:03:32 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Jean-Yves Avenard 44ad5e249a Bug 1672072 - P9. Make EnsureRDDProcessAndCreateBridge an async API. r=mattwoodrow,bryce,mjf,padenot,ipc-reviewers,mccr8
We can now chaincreation of the decoder to the launch of the RDD process as needed and setting up the PRemoteDecoderManager

Differential Revision: https://phabricator.services.mozilla.com/D96365
2020-11-13 04:21:16 +00:00
Jean-Yves Avenard 6d2df84e41 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-13 07:46:44 +00:00
Bogdan Tara 266d9ad46c Backed out 13 changesets (bug 1672072) for short.mp4.firstframe.html failures CLOSED TREE
Backed out changeset f093b7969e8b (bug 1672072)
Backed out changeset 28db8276ec2b (bug 1672072)
Backed out changeset ff8fe1b856b3 (bug 1672072)
Backed out changeset 091b9449c786 (bug 1672072)
Backed out changeset 89d9a12c0737 (bug 1672072)
Backed out changeset 9cb71fd4b43b (bug 1672072)
Backed out changeset 09adad7416e1 (bug 1672072)
Backed out changeset 9905650335ef (bug 1672072)
Backed out changeset 6f1d99e9c3a1 (bug 1672072)
Backed out changeset b59655b7a595 (bug 1672072)
Backed out changeset 1ef9d6d10508 (bug 1672072)
Backed out changeset fbf0b5117655 (bug 1672072)
Backed out changeset 65cd3b9de5c6 (bug 1672072)
2020-11-13 06:13:22 +02:00
Jean-Yves Avenard 8ffdd4eaef Bug 1672072 - P9. Make EnsureRDDProcessAndCreateBridge an async API. r=mattwoodrow,bryce,mjf,padenot,ipc-reviewers,mccr8
We can now chaincreation of the decoder to the launch of the RDD process as needed and setting up the PRemoteDecoderManager

Differential Revision: https://phabricator.services.mozilla.com/D96365
2020-11-12 22:53:49 +00:00
Jean-Yves Avenard 7a6315ba80 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-12 22:53:31 +00:00
Nika Layzell 630f9192f8 Bug 1676223 - Use ActorLifecycleProxy instead of WeakPtr for async returns, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D96454
2020-11-12 17:59:03 +00:00
Brindusan Cristian 030df1b5cf Backed out changeset 98b994baee88 (bug 1676223) for build bustages at PChromiumCDMChild.cpp. CLOSED TREE 2020-11-10 01:59:18 +02:00
Nika Layzell 2d9159f48c Bug 1676223 - Use ActorLifecycleProxy instead of WeakPtr for async returns, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D96454
2020-11-09 23:29:20 +00:00
Jean-Yves Avenard c938c7416c Bug 1674043 - P6. Remove sync PDecoderMananger::Supports API. r=mattwoodrow,bryce,mjf,ipc-reviewers,nika
In bug 1595994 we attempted to streamline the ability to determine which decoder was available regardless of the process they would be running in. This was subsequently done via the PDMFactory.

As there are several JS API that can query which codec are supported, it requires a synchronous mechanism.
This allowed to make a determination during the PlatformDecoderModule::Supports call, depending on which process it was going to be called frome.

Having a synchronous IPC call to the RemoteDecoderManagerParent has too many caveats to be workable.
So what we do instead is first determine at launch if the required external framework are available and pass this information to each content process.

When checking if a decoder is available, we make a best guess at determining if the PDM would support such codec, without actually loading such framework when running in the content process.

Supports can no longer make a decision based on the process currently running and as such PDM::CreateAudio/VideoDecoder using an optional system framework now need to further check the validity of the CreateDecoderParam argument.

Differential Revision: https://phabricator.services.mozilla.com/D95245
2020-11-04 02:22:33 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Andrew Osmond bc0f206cd6 Bug 1670939 - Make PImageBridge::WillClose async instead of sync. r=nical,ipc-reviewers,jld
Differential Revision: https://phabricator.services.mozilla.com/D93343
2020-10-23 18:29:15 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Jean-Yves Avenard 6307ec0451 Bug 1595994 - P26. Simplify and rename RecvLaunchRDDProcess. r=mattwoodrow,nika,ipc-reviewers
And we remove unnecessary checks, BackgroundParent only run in the parent process and if e10s is on. Also RecvLauchRDDProcess will only ever be called if the rdd pref is on already.

By streamlining the call we also reduce the number of sync dispatch to 1.

Depends on D93317

Differential Revision: https://phabricator.services.mozilla.com/D93476
2020-10-20 23:32:57 +00:00
Jean-Yves Avenard d06384295b Bug 1595994 - P25. Have launch rdd be signalled over the PBackground channel. r=mattwoodrow,nika,ipc-reviewers
This remove the need for a sync dispatch to the main thread, that lead to deadlocks.

Depends on D93316

Differential Revision: https://phabricator.services.mozilla.com/D93317
2020-10-20 23:32:54 +00:00
Dan Glastonbury a70a2c09f1 Bug 1595994 - P7: Add Supports messages to PRemoteDecoderManager. r=kamidphish,nika,ipc-reviewers
Add a synchronous Supports message to the IPDL PRemoteDecoderManager protocol so
decoder modules can query for playback support in the actual process that will
attempt to do the decoding.

Depends on D54878

Differential Revision: https://phabricator.services.mozilla.com/D54879
2020-10-20 23:26:27 +00:00
Ricky Stewart 362abcf949 Bug 1670357 - Remove `make` targets for cleaning: `clean`, `realclean`, `clobber`, `distclean`, `clobber_all`, `everything` r=firefox-build-system-reviewers,mhentges
The `clobber` targets are superseded by `mach clobber`, so we don't need them for any reason. The `clean` target is meant to get you to a post-`configure` state, but it doesn't really work, and if it's necessary for you to be in that state for some reason you can just clobber and re-`configure`, so it doesn't seem worth it to get it working again. Instead, delete all of them. Also delete `everything` which is not useful when `clobber` doesn't exist.

Differential Revision: https://phabricator.services.mozilla.com/D93514
2020-10-15 20:37:18 +00:00
Tom Tung 45a97b5b83 Bug 1654080 - Use PBackground for syncing SessionStorageCache and use LSWriteOptimizer to send data changes; r=dom-workers-and-storage-reviewers,janv,nika
This patch does:
- Use LSWriteOptimizer
- Remove SessionStorageService since it's unused.
- Move IPC from PContent to PBackground
(by SessionStorageManager{Child, Parent} and SessionStorageCache{Child, Parent}).
- Extract SessionStorageManagerBase and add PBackgroundSessionStorageManager.
- Expose a getter function to get a BackgroundParentManager for top context id
on the parent.

IPC
- Before this patch:
  - Copy from parent while loading a document.
    - Mark cache entry on the parent process as loaded by the child id.
  - Update change on checkpoint.
  - Unmark cache entry on the parent process as unloaded for the child id while
  the parent actor is destorying.
- After this patch:
  - Sync IPC load in the first SessionStorage operation.
  - Update change on checkpoint

`BackgroundSessionStorageManager`'s lifecycle on the parent process.
- Create by `SessionStorageManagerParent` and register to the `sManagers`.
- Hold by `SessionStorageManagerParent` and `sManagers`.
- Remove from the `sManagers` while the corresponding `BrowsingContext` is
destructed (on the parent process).

Depends on D89341

Differential Revision: https://phabricator.services.mozilla.com/D89342
2020-10-14 00:19:33 +00:00
Eitan Isaacson 10d6dd02bc Bug 1661760 - Part 1: Unify all range from offset methods to one. r=morgan,nika
There are at least 8 different methods for getting a range from an offset:
1. left word
2. right word
3. line
4. left line
5. right line
6. sentence
7. paragraph
8. range with same style.

Having a single wrapper and IPDL method for all of those with an enum would remove
a lot of redundancies.

Differential Revision: https://phabricator.services.mozilla.com/D90936
2020-09-24 16:04:41 +00:00
Jean-Yves Avenard 6716cfb826 Bug 1664362. Use move semantics with IPC's MozPromise resolver. r=nika
We use C++14's generic lambdas and its auto&& type in the generated code, in combination with a typed local variable to ensure the argument type is enforced.

The object is moved as necessary, no copies will occur.

The code generated will now be:
  [this, self__, id__, seqno__](auto&& aParam) {
    if ((!(self__))) {
      NS_WARNING("Not resolving response because actor is dead.");
      return;
    }
    bool resolve__ = true;
    InitResultIPDL result = std::forward<decltype(aParam)>(aParam);
    IPC::Message* reply__ = PRemoteDecoder::Reply_Decode(id__);
    WriteIPDLParam(reply__, self__, resolve__);
    // Sentinel = 'resolve__'
    (reply__)->WriteSentinel(322044863);
    WriteIPDLParam(reply__, self__, std::move(result));
    // Sentinel = 'result'
    (reply__)->WriteSentinel(153223840);
    (reply__)->set_seqno(seqno__);
  }

For multiple arguments return, creation of Tuple via Tie is also moved, though currently Tie method doesn't support move semantics.

Differential Revision: https://phabricator.services.mozilla.com/D90090
2020-09-24 04:05:28 +00:00
Nika Layzell e0c3e2f9a8 Bug 1664553 - Default initialize outparameters in ipdl generated code, r=jld
Doing this helps lower the chances of accidentally trying to send an
uninitialized primitive value, like a raw pointer or integer, over IPC due to a
sync method or IPDLParamTraits::Read implementation failing to initialize the
outparameter.

Differential Revision: https://phabricator.services.mozilla.com/D89963
2020-09-11 19:49:20 +00:00
Mark Banner 3d9ea7d179 Bug 1375244 - Remove sync KeywordToURI and related IPC messages as they are no longer required. r=Gijs,mak,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89486
2020-09-11 07:15:21 +00:00
Eitan Isaacson 1959904dc6 Bug 1661758 - Part 2: Introduce sync IPDL methods for getting leaf at offset. r=morgan,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89064
2020-09-11 05:07:48 +00:00
Eitan Isaacson e3872eb448 Bug 1661758 - Part 1: Introduce sync IPDL methods for getting text range of child. r=morgan,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89063
2020-09-11 05:07:46 +00:00
Brindusan Cristian c5f2ef7f15 Backed out 5 changesets (bug 1661758) for build bustages on GeckoTextMarker.h.
Backed out changeset 9b086da1f8f1 (bug 1661758)
Backed out changeset 8def1d51ae3d (bug 1661758)
Backed out changeset 17532cdc54ae (bug 1661758)
Backed out changeset be0ea9159b11 (bug 1661758)
Backed out changeset 2ca136e7d279 (bug 1661758)
2020-09-11 02:16:49 +03:00
Eitan Isaacson f613d9f64e Bug 1661758 - Part 2: Introduce sync IPDL methods for getting leaf at offset. r=morgan,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89064
2020-09-10 21:52:20 +00:00
Eitan Isaacson d0576060fa Bug 1661758 - Part 1: Introduce sync IPDL methods for getting text range of child. r=morgan,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89063
2020-09-10 21:52:13 +00:00
Eitan Isaacson 1962242b94 Bug 1660364 - Introduce IPDL getters for text range length, and absolute offsets. r=morgan,mccr8
We need a sync IPC call for this because otherwise the number of smaller sync messages we would need to call would be variable.

Differential Revision: https://phabricator.services.mozilla.com/D88076
2020-08-27 20:06:42 +00:00
Eitan Isaacson 1b3266b806 Bug 1660109 - Add BoundsForRange sync ipc call. r=Jamie,nika
Differential Revision: https://phabricator.services.mozilla.com/D87669
2020-08-20 22:11:41 +00:00
Eitan Isaacson 58ae94661e Bug 1657765 - Add IPDL interface for platform-specific mac API. r=morgan,Jamie,nika
Differential Revision: https://phabricator.services.mozilla.com/D86606
2020-08-14 19:33:00 +00:00
Andrew McCreight 85e0be181d Bug 1657504, part 2 - Fix deprecation warning in ipdl.py. r=nika
This is unrelated to the main issue in the bug, but I noticed
a deprecation warning in the log spew.

Differential Revision: https://phabricator.services.mozilla.com/D86229
2020-08-06 17:36:45 +00:00
Andrew McCreight bd21b11225 Bug 1657504, part 1 - Don't allow a protocol to be defined in two different files. r=nika
This changes the duplicate checking/caching implemented by |parsed| to be
based on the name of the protocol etc. we're loading, not the file name.
This lets us detect when a protocol is being defined in two different
files.

This can happen if one file is included earlier in the resolve path than
a file explicitly specified on the command line. Any includes will resolve
to the former, and then we'll attempt to parse the latter. Before this
patch, this would result in weird errors, because there would be multiple
protocol types with the same name.

Differential Revision: https://phabricator.services.mozilla.com/D86113
2020-08-06 17:42:13 +00:00
Kartikaya Gupta 39167fa7cd Bug 1251612 - Support the GetFrameUniformity API in content processes. r=botond,froydnj
This moves the IPC mechanism from PCompositorBridge to PLayerTransaction/
PWebRenderBridge, so that it can be used by content processes like the other
test APIs. It still only produces actual data for the layers backend; for
WR it will just return empty datasets.

Differential Revision: https://phabricator.services.mozilla.com/D86016
2020-08-05 21:42:06 +00:00
Ricky Stewart 11e536dbb2 Bug 1655993 - Remove Punion_Comparable::test from sync-messages.ini r=mccr8
This shouldn't have been added in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D85292
2020-07-29 15:02:11 +00:00
Ricky Stewart e8ac99b085 Bug 1655371 - Fix ipdl test breaking Windows ccov builds r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D85067
2020-07-27 22:21:48 +00:00
Ricky Stewart 3419d4de1d Bug 1654589 - Move `libpref` Python unit test to `mozbuild` suite r=froydnj,mccr8
It could go into its own test suite, but it 1) depends on `mozbuild` code, so the `mozbuild` suite as well as this new suite would be running on any push that touches `mozbuild` code anyway, and 2) this is code that runs during the build, so it's not out of place.

Differential Revision: https://phabricator.services.mozilla.com/D84547
2020-07-23 22:00:46 +00:00
Simon Giesecke b0cf19fc3b Bug 1654469 - Fix test protocol names. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D84656
2020-07-23 14:07:02 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Simon Giesecke 548e423dad Bug 1654469 - Stop generating operator==/operator != for IPDL structs/unions by default. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84485
2020-07-22 17:24:33 +00:00
Simon Giesecke d824054ce7 Bug 1654181 - Add uncomparable keyword for structs and unions. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84298
2020-07-22 09:11:52 +00:00
Jeff Gilbert 35f892e782 Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj
* Use clearer pref names.
* Default (and only support) IPDL dispatching.
* Make DispatchCommands async-only.
* Sync ipdl command per sync webgl entrypoint.
  * Eat the boilerplate cost, since there's not too many.
* Run SerializedSize off same path as Serialize.
* All shmem uploads go through normal DispatchCommands.
* Defer pruning of dead code for now so we can iterate quickly.
* Use Read/Write(begin,end) instead of (begin,size).
  * This would have prevented a bug where we read/wrote N*sizeof(T)*sizeof(T).

Differential Revision: https://phabricator.services.mozilla.com/D81495
2020-07-21 22:56:52 +00:00
Cosmin Sabou 3576443b99 Backed out changeset 3229e30f7721 (bug 1649573) as requested by froydnj. CLOSED TREE 2020-07-13 17:18:41 +03:00
Tom Prince 204d796929 Bug 1651731: [lint] Python and shell files without `#!` should not be executable; r=linter-reviewers,perftest-reviewers,geckoview-reviewers,agi,sylvestre,sparky
Differential Revision: https://phabricator.services.mozilla.com/D82954
2020-07-09 20:29:18 +00:00
Ricky Stewart 8fe43501ec Bug 1648129 - Use faster hash for ipdl generator r=froydnj
`adler32` is about 3x as fast overall as `md5` on my machine.

Differential Revision: https://phabricator.services.mozilla.com/D81892
2020-07-01 18:31:01 +00:00
Nathan Froyd 3f6228a465 Bug 1649573 - run IPDL ipdl tests in parallel; r=firefox-build-system-reviewers,rstewart
The speedup here is not great because the Python/IPDL parser overhead is
very high, but this cuts ~10 seconds off a `-j12` build (~15s -> 4s) on
my machine.

Differential Revision: https://phabricator.services.mozilla.com/D81751
2020-07-01 15:49:32 +00:00
Junior Hsu 780b817a08 Bug 1633935 - P4 Remove On[Start|Stop]Request/OnTransportAndData in PHttpChannel, r=mayhemer,nika,necko-reviewers
We move OnStartRequest from PHttpChannel to PHttpBackgroundChannel, thus adjusting
message-metadata.ini

Depends on D76970

Differential Revision: https://phabricator.services.mozilla.com/D76971
2020-06-30 00:33:01 +00:00
Butkovits Atila 6d4dc7f680 Backed out 13 changesets (bug 1633935) as requested by Junior. CLOSED TREE
Backed out changeset 398fc19f5f6a (bug 1633935)
Backed out changeset 25822279ba5b (bug 1633935)
Backed out changeset e87b11c172b9 (bug 1633935)
Backed out changeset 709f8d50aa33 (bug 1633935)
Backed out changeset 3b268ac50692 (bug 1633935)
Backed out changeset ac9c5c1e5162 (bug 1633935)
Backed out changeset 292a5b34e9f7 (bug 1633935)
Backed out changeset 6251c22cc8f1 (bug 1633935)
Backed out changeset 73b51a139c91 (bug 1633935)
Backed out changeset 2a9873ad6856 (bug 1633935)
Backed out changeset be03e0e7b645 (bug 1633935)
Backed out changeset df5abc2c0734 (bug 1633935)
Backed out changeset 19dcca77a1cf (bug 1633935)
2020-06-25 20:25:36 +03:00
Junior Hsu 347250b5c8 Bug 1633935 - P4 Remove On[Start|Stop]Request/OnTransportAndData in PHttpChannel, r=mayhemer,nika,necko-reviewers
We move OnStartRequest from PHttpChannel to PHttpBackgroundChannel, thus adjusting
message-metadata.ini

Depends on D76970

Differential Revision: https://phabricator.services.mozilla.com/D76971
2020-06-23 16:56:53 +00:00
Andrew McCreight afe901a409 Bug 1641090, part 9 - Change IDMap into an alias for nsDataHashtable. r=nika
Now that IDMap is just a thin wrapper around an nsDataHashtable,
it is easy to convert it into an alias.

Differential Revision: https://phabricator.services.mozilla.com/D77169
2020-05-28 15:55:16 +00:00
Csoregi Natalia b4ad19225c Backed out 10 changesets (bug 1641090) for asan bustage on ProtocolFuzzer.h. CLOSED TREE
Backed out changeset 9c5e95745919 (bug 1641090)
Backed out changeset df8809d1542b (bug 1641090)
Backed out changeset 92cde6ee6ade (bug 1641090)
Backed out changeset 23d5d734d0bd (bug 1641090)
Backed out changeset 6af841322f4d (bug 1641090)
Backed out changeset 2ce016edb6fc (bug 1641090)
Backed out changeset a513d47956f9 (bug 1641090)
Backed out changeset 48bc9ce7afeb (bug 1641090)
Backed out changeset 173a1c2e3e55 (bug 1641090)
Backed out changeset c915cb660411 (bug 1641090)
2020-05-28 08:51:13 +03:00
Andrew McCreight c93adfb04f Bug 1641090, part 9 - Change IDMap into an alias for nsDataHashtable. r=nika
Now that IDMap is just a thin wrapper around an nsDataHashtable,
it is easy to convert it into an alias.

Differential Revision: https://phabricator.services.mozilla.com/D77169
2020-05-28 00:54:21 +00:00
Gijs Kruitbosch 38b061ef45 Bug 1638373 - remove js/ipc now that CPOWs are dead, r=mccr8
Depends on D76597

Differential Revision: https://phabricator.services.mozilla.com/D76598
2020-05-24 18:47:04 +00:00
Emilio Cobos Álvarez 7b19f0d6d4 Bug 1609024 - Remove cache mechanism which is not very useful. r=hiro,snorp,mccr8
I don't think all this complexity is worth it for having a
marginally-more-realistic testing story. Using the pref just works and we should
do that, I think.

Differential Revision: https://phabricator.services.mozilla.com/D59980
2020-05-21 17:02:06 +00:00
Peter Van der Beken 1990918ebe Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-20 09:09:06 +00:00
Nika Layzell 533fa5bd14 Bug 1635689 - Part 2: Stop generating 'get' method on IPDL unions, r=jld
This method always copies, and is redundant with the other getter methods on
IPDL unions. As there is only one caller, it can be removed to simplify the
code, and remove a source of complexity.

Differential Revision: https://phabricator.services.mozilla.com/D75349
2020-05-18 19:39:54 +00:00
Csoregi Natalia 517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00
Peter Van der Beken e2a88c491c Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-13 14:24:55 +00:00