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

3568 Коммитов

Автор SHA1 Сообщение Дата
Norisz Fay 936d025f11 Backed out changeset aaff4b4fd82e (bug 1658072) for causing xpcshell failures on process_watcher_posix_sigchld.cc CLOSED TREE 2022-08-11 01:56:09 +03:00
Jed Davis 6aee29c7dd Bug 1658072 - Rewrite the Unix implementation of IPC process termination handling. r=nika
This patch rewrites the Unix backend of ProcessWatcher for two reasons:

1. To remove the use of libevent's signal handling, which has concurrency
   bugs that can't be easily fixed upstream (see Bugzilla for details)

2. To simplify the code in general; in particular, the new version has one
   place where the process and its exit status are consumed from the OS

The new implementation uses the same pipe-to-self technique as libevent
(and which we use elsewhere) to deal with async signal safety.  Unlike
the previous version, there is a single object which manages all
monitored child processes rather than one each.  (Previously, this
multiplexing was done inside libevent.)

Differential Revision: https://phabricator.services.mozilla.com/D141309
2022-08-10 21:01:32 +00:00
Nika Layzell 96d76af151 Bug 1779792 - Part 5: Add a unique nsID field to each MessageChannel pair, r=ipc-reviewers,mccr8
This won't be used for any security or routing purposes, but can be useful for
debugging. It will be used in the future by the profiler to correlate sent and
received message events across processes.

Differential Revision: https://phabricator.services.mozilla.com/D153621
2022-08-10 14:55:23 +00:00
Nika Layzell 45397cbfdd Bug 1779792 - Part 4: Deduplicate ProcessChild subclass constructors, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,alwu,mccr8
These constructors are unnecessary and can be defined with a `using` statement,
making it easier to change all constructors simultaneously.

Differential Revision: https://phabricator.services.mozilla.com/D153620
2022-08-10 14:55:23 +00:00
Nika Layzell 2ac29a461a Bug 1779792 - Part 3: Use an endpoint to bind the initial actor in parent processes, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,alwu,mccr8
This improves consistency with the child process case, and will make it easier
to attach additional state without needing to thread it through every child
process callsite manually.

Differential Revision: https://phabricator.services.mozilla.com/D153619
2022-08-10 14:55:22 +00:00
Nika Layzell d45df271ec Bug 1779792 - Part 2: Use an Endpoint to bind the initial actor in child processes, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,mccr8,alwu
This type is also used in other places to start non-initial actors, and will
allow us to attach additional state more easily without needing to thread it
through every child process callsite manually.

Differential Revision: https://phabricator.services.mozilla.com/D153618
2022-08-10 14:55:22 +00:00
Nika Layzell 263b5e445b Bug 1779792 - Part 1: Use cached value for log ID generation, r=mccr8
Previously this code read the atomic rather than the cached value (which
was unused). This is inherently racy as the atomic is updated on a
different thread than the read happened on.

Differential Revision: https://phabricator.services.mozilla.com/D153617
2022-08-10 14:55:21 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Christian Holler 53b78333a2 Bug 1782505 - Observe destroyed actors in IPC fuzzing. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D153344
2022-08-02 22:06:28 +00:00
Jens Stutte 3ca1fb43c7 Bug 1777198 - Cancel content JS execution on quit-application-granted or on normal content process shutdown. r=smaug
We want to signal content processes to cancel content JS unconditionally on shutdown.
In the case of parent shutdown this has to happen as early as "quit-application-granted", given that both extensions and session storage shutdown rely on the possibility to interact with content processes (which is not possible when they are inside long running JS).
In addition in the case of a normal child shutdown we cancel content JS execution, too.
For now we put this behind the pref "dom.abort_script_on_child_shutdown" which remains default off.

Depends on D150539

Differential Revision: https://phabricator.services.mozilla.com/D150598
2022-08-02 14:02:40 +00:00
Sandor Molnar 646227cd7d Backed out 2 changesets (bug 1777198) for causing build bustage in dom/ipc/ProcessHangMonitor.cpp CLOSED TREE
Backed out changeset 472fe2d7af01 (bug 1777198)
Backed out changeset 0b9cb5b44360 (bug 1777198)
2022-08-02 14:08:45 +03:00
Jens Stutte f9302b34cc Bug 1777198 - Cancel content JS execution on quit-application-granted or on normal content process shutdown. r=smaug
We want to signal content processes to cancel content JS unconditionally on shutdown.
In the case of parent shutdown this has to happen as early as "quit-application-granted", given that both extensions and session storage shutdown rely on the possibility to interact with content processes (which is not possible when they are inside long running JS).
In addition in the case of a normal child shutdown we cancel content JS execution, too.
For now we put this behind the pref "dom.abort_script_on_child_shutdown" which remains default off.

Depends on D150539

Differential Revision: https://phabricator.services.mozilla.com/D150598
2022-08-02 09:08:23 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Jed Davis 501b8ffcd7 Bug 1780312 - Turn off the Linux nvidia driver's shader cache in the RDD process. r=gcp
We were already turning off Mesa's shader cache in the RDD process,
because it's not useful given that we're only using video codec
acceleration and moving images around, and it does a few things related
to trying to access the cache that the sandbox would have to accomodate.

This patch does the equivalent thing for the nvidia proprietary driver;
we don't support it for media codec acceleration, but it can still be
loaded in that process (e.g., on multi-GPU systems) and it's trying to
call `statfs` on startup which may be related.

Differential Revision: https://phabricator.services.mozilla.com/D152932
2022-07-28 19:07:30 +00:00
Sean Feng 288cbe9f46 Bug 1778492 - Add an origin trial for coep: credentialless r=emilio,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151381
2022-07-27 20:33:19 +00:00
Jim Blandy 610404dcde Bug 1779829: Replace `Shmem::PrivateIPDLCaller` with `friend` specifiers. r=nika
Instead of using the public member type `PrivateIPDLCaller` to
restrict access to certain `Shmem` member functions, make them
`private`, and designated `IProtocol` and `ITopLevelProtocol` as
friends of `Shmem`.

Differential Revision: https://phabricator.services.mozilla.com/D151952
2022-07-27 19:13:02 +00:00
Nika Layzell 005eab77f7 Bug 1681359 - Part 1: Introduce the BigBuffer type to IPC, r=ipc-reviewers,jld
This type is inspired by the Chromium BigBuffer type, and acts as a type which
intelligently either allocates a shared memory region or in-memory buffer based
on the size of the payload. The current threshold is 64k bytes, and it can be
somewhat cheaply transferred over IPC.

This is intended to be used in places where we currently create a basic `Shmem`
to transfer a potentially large block of bytes over IPC.

Differential Revision: https://phabricator.services.mozilla.com/D151851
2022-07-26 20:51:25 +00:00
Marian-Vasile Laza 2ab97e789a Backed out 2 changesets (bug 1778492) for causing eslint failures.
Backed out changeset 6c3ac3569d31 (bug 1778492)
Backed out changeset 34227495753a (bug 1778492)
2022-07-26 17:43:53 +03:00
Sean Feng 38f70ee5fc Bug 1778492 - Add an origin trial for coep: credentialless r=emilio,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151381
2022-07-26 14:06:04 +00:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
az 534707da03 Bug 1766307 - Enable PDMFactory::Supports/SupportsMimeType to process+return HW/SW decode info r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147385
2022-07-22 23:08:08 +00:00
Harveer Singh 6b159ffeb4 Bug 1636050 - PCacheOp protocol is now refcounted. r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D85780
2022-07-21 03:22:26 +00:00
Cristian Tuns 296431b106 Backed out 8 changesets (bug 1754239, bug 1766307, bug 1766308, bug 1766310) for causing build bustages on Logging.h CLOSED TREE
Backed out changeset 50918938a839 (bug 1766307)
Backed out changeset 19800bb8974e (bug 1766307)
Backed out changeset 40ec82794497 (bug 1766310)
Backed out changeset 4f860e20098c (bug 1754239)
Backed out changeset f54eac410bfd (bug 1754239)
Backed out changeset c8cc5e0c89dd (bug 1766307)
Backed out changeset d7aab4098f12 (bug 1766308)
Backed out changeset a7ffa6f44fe8 (bug 1766307)
2022-07-19 21:20:07 -04:00
az 5d97400d50 Bug 1766307 - Enable PDMFactory::Supports/SupportsMimeType to process+return HW/SW decode info r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147385
2022-07-19 23:27:38 +00:00
smolnar aad7ba8a33 Backed out 2 changesets (bug 1777198) for causing leakcheck failures. CLOSED TREE
Backed out changeset 1bf944a0828d (bug 1777198)
Backed out changeset 05afbf32acea (bug 1777198)
2022-07-18 15:54:46 +03:00
Jens Stutte 416238d1b5 Bug 1777198 - Cancel content JS execution on quit-application-granted or on normal content process shutdown. r=smaug
We want to signal content processes to cancel content JS unconditionally on shutdown.
In the case of parent shutdown this has to happen as early as "quit-application-granted", given that both extensions and session storage shutdown rely on the possibility to interact with content processes (which is not possible when they are inside long running JS).
In addition in the case of a normal child shutdown we cancel content JS execution, too.
For now we put this behind the pref "dom.abort_script_on_child_shutdown" which remains default off.

Depends on D150539

Differential Revision: https://phabricator.services.mozilla.com/D150598
2022-07-18 10:56:41 +00:00
Andi-Bogdan Postelnicu 72ba7fb691 Bug 1519636 - Reformat recent changes to the Google coding style. r=media-playback-reviewers,alwu
Updated with clang-format version 14.0.5 (taskcluster-cAkeFEZXQmihHYDO8Y4hRw)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D151003
2022-07-14 08:10:07 +00:00
Norisz Fay 82c8f892b0 Backed out 8 changesets (bug 1754239, bug 1766308, bug 1766307, bug 1766310) for causing build bustages on UtilityAudioDecoderParent.cpp CLOSED TREE
Backed out changeset e383703e28cf (bug 1766307)
Backed out changeset 5fb04c68ae7a (bug 1766307)
Backed out changeset ee76505a46ff (bug 1766310)
Backed out changeset d76eae67ae79 (bug 1754239)
Backed out changeset fed974dcf641 (bug 1754239)
Backed out changeset 67c5fbd546a1 (bug 1766307)
Backed out changeset da49735366d2 (bug 1766308)
Backed out changeset 81ccd31d0f07 (bug 1766307)
2022-07-14 04:03:19 +03:00
az 9eeb816180 Bug 1766307 - Enable PDMFactory::Supports/SupportsMimeType to process+return HW/SW decode info r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147385
2022-07-14 00:32:37 +00:00
Paul Bone ea0c957e8d Bug 1778621 - Re-enable the GC_WAIT_FOR_IDLE_* telemetry r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D151346
2022-07-13 00:46:10 +00:00
Randell Jesup 7960ef17d7 Bug 1768050: Test request handler. r=jesup
Depends on D147273

Differential Revision: https://phabricator.services.mozilla.com/D149983
2022-07-07 09:08:58 +00:00
Randell Jesup 44a231d591 Bug 1768050: Move OPFS operations off PBackground r=janv,nika
Depends on D149260

Differential Revision: https://phabricator.services.mozilla.com/D147273
2022-07-07 09:08:57 +00:00
Jed Davis 54cd467d65 Bug 1777910 - Adjust Mesa environment variables for change/deprecation in 22.1. r=gcp
Mesa 22.1.0 changed the env var name MESA_GLSL_CACHE_DISABLE to
MESA_SHADER_CACHE_DISABLE; it still accepts the old name, but prints a
deprecation warning.  If we set both env vars, then we can support both
old and new Mesas correctly (the warning won't be printed if the new env
var is also set).

Differential Revision: https://phabricator.services.mozilla.com/D151094
2022-07-06 21:20:06 +00:00
Butkovits Atila c27cc6a9d2 Backed out 2 changesets (bug 1768050) for causing gtest failures complaining about function calls. CLOSED TREE
Backed out changeset 52f54c3384db (bug 1768050)
Backed out changeset a3c7a9041511 (bug 1768050)
2022-07-06 22:13:03 +03:00
Randell Jesup 96bbb1edea Bug 1768050: Test request handler. r=jesup
Depends on D147273

Differential Revision: https://phabricator.services.mozilla.com/D149983
2022-07-06 18:00:04 +00:00
Randell Jesup 3a934f66ac Bug 1768050: Move OPFS operations off PBackground r=janv,nika
Depends on D149260

Differential Revision: https://phabricator.services.mozilla.com/D147273
2022-07-06 18:00:04 +00:00
Jim Blandy 2f5eb12516 Bug 1777656: Delete mozilla::ipc::SharedMemory::SharedMemorytype. r=nika,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D150852
2022-07-05 20:08:31 +00:00
Nika Layzell 933e0ff56a Bug 1777181 - Use cancelable runnables for DataPipe notifications, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D150611
2022-06-30 00:44:06 +00:00
Dana Keeler a998171379 Bug 696976 - asynchronously handle client auth certificate requests from TLS servers r=necko-reviewers,ipc-reviewers,nika,kershaw,rmf
Differential Revision: https://phabricator.services.mozilla.com/D146367
2022-06-29 16:29:28 +00:00
Jan Varga f9c71105e5 Bug 1758055 - Add PrincipalInfo to PBackgroundFileSystem construction; r=dom-storage-reviewers,jari
These changes are partially copied from D148179 (created by jesup). We need to
be able to create correct origin directories from the very beginning.

Differential Revision: https://phabricator.services.mozilla.com/D149259
2022-06-29 09:43:12 +00:00
Jari Jalkanen 516845de8f Bug 1758055 - Establish file system content and parent process IPC. r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D140486
2022-06-28 16:04:17 +00:00
Sean Feng 6acee53f6c Bug 1731778 - Implement COEP: credentialless r=smaug,necko-reviewers,kershaw
Spec: https://html.spec.whatwg.org/multipage/#coep:coep-credentialless

Credentialless is a new cross-origin embedder policy which allows us
to not enforcing CORP when loading cross-origin resources while
providing SharedArrayBuffer.

There are two main things involved here:
  1. Fetching cross-origin no-CORS resources omits credentials
     - This is done by applying `LOAD_ANONYMOUS` flag to the request
  2. Other requests sent with credentials require the server's explicit
  permission through the CORS protocol or the CORS header
     - This is done by expanding `ProcessCrossOriginResourcePolicyHeader`
     function to apply the necessary checks.

Differential Revision: https://phabricator.services.mozilla.com/D147802
2022-06-27 17:07:15 +00:00
serge-sans-paille 896a2f9a5f Bug 1775148 - Cleanup ipc/ includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D149802
2022-06-23 15:49:57 +00:00
smolnar 7d35618a19 Backed out changeset 8e304bf129b7 (bug 1758055) for causing build bustages in nsISupportsImpl CLOSED TREE 2022-06-23 17:08:04 +03:00
Jari Jalkanen 8ded57a34e Bug 1758055 - Establish file system content and parent process IPC. r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D140486
2022-06-23 12:24:57 +00:00
Iulian Moraru 672f2cb672 Backed out 3 changesets (bug 1731778) for causing COEP related failures on embedding.tentative.https.window.html.
Backed out changeset c30f5751d54c (bug 1731778)
Backed out changeset 0eec19308453 (bug 1731778)
Backed out changeset 7c14fa8a4804 (bug 1731778)
2022-06-22 22:00:17 +03:00
Sean Feng 80b0c0f55b Bug 1731778 - Implement COEP: credentialless r=smaug,necko-reviewers,kershaw
Spec: https://html.spec.whatwg.org/multipage/#coep:coep-credentialless

Credentialless is a new cross-origin embedder policy which allows us
to not enforcing CORP when loading cross-origin resources while
providing SharedArrayBuffer.

There are two main things involved here:
  1. Fetching cross-origin no-CORS resources omits credentials
     - This is done by applying `LOAD_ANONYMOUS` flag to the request
  2. Other requests sent with credentials require the server's explicit
  permission through the CORS protocol or the CORS header
     - This is done by expanding `ProcessCrossOriginResourcePolicyHeader`
     function to apply the necessary checks.

Differential Revision: https://phabricator.services.mozilla.com/D147802
2022-06-22 13:13:39 +00:00