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

7504 Коммитов

Автор SHA1 Сообщение Дата
Greg Stoll 8578b985f6 Bug 1744362 - Part 6: use dynamic blocklist file to block third-party DLLs r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D164488
2022-12-27 12:59:09 +00:00
Marco Castelluccio f69e697461 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
Randell Jesup 198eeb0f45 Bug 1806949: Implement WebTransport slots and Reliability() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165373
2022-12-23 02:40:22 +00:00
Randell Jesup 4fc2895ad1 Bug 1806847: Move WebTransport parent-side binding to SocketThread r=nika
Differential Revision: https://phabricator.services.mozilla.com/D165295
2022-12-23 02:40:22 +00:00
Randell Jesup 2f3624de57 Bug 1806694: Support WebTransport constructor options r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165182
2022-12-23 02:40:22 +00:00
Jed Davis 9032cd09be Bug 1806224 - Increase IPC child hang shutdown timeout for sanitizer builds. r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D165426
2022-12-23 00:51:00 +00:00
Sandor Molnar 19cbd7a457 Backed out 3 changesets (bug 1806694, bug 1806949, bug 1806847) for causing bp-hybrid bustages in dist/include/mozilla/RefPtr.h CLOSED TREE
Backed out changeset 96c89b8c8618 (bug 1806949)
Backed out changeset bfe4f637a124 (bug 1806847)
Backed out changeset 395880a2f5df (bug 1806694)
2022-12-23 01:35:29 +02:00
Randell Jesup 1b7a91386d Bug 1806949: Implement WebTransport slots and Reliability() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165373
2022-12-22 23:04:25 +00:00
Randell Jesup 18dbfe8b7b Bug 1806847: Move WebTransport parent-side binding to SocketThread r=nika
Differential Revision: https://phabricator.services.mozilla.com/D165295
2022-12-22 23:04:24 +00:00
Randell Jesup de982608b4 Bug 1806694: Support WebTransport constructor options r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165182
2022-12-22 23:04:24 +00:00
Cosmin Sabou b0844a16d6 Backed out changeset 399888cb68ba (bug 1806694) for causing webtransport wpt failures. CLOSED TREE 2022-12-22 20:52:03 +02:00
Randell Jesup 0896d559e1 Bug 1806694: Support WebTransport constructor options r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165182
2022-12-22 15:51:32 +00:00
Gabriele Svelto 2cb8a79c25 Bug 1752703 - Move the pthread_thread_create() interposer under mozglue and prepare for having a single place where we place interposer functions r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D164470
2022-12-21 10:24:41 +00:00
Norisz Fay 8cf029b070 Backed out 15 changesets (bug 1247687) as requested by dev CLOSED TREE
Backed out changeset 81d052cabf84 (bug 1247687)
Backed out changeset d698041e5174 (bug 1247687)
Backed out changeset 2adf67f910e8 (bug 1247687)
Backed out changeset 0bc871906e97 (bug 1247687)
Backed out changeset 1700d5b79273 (bug 1247687)
Backed out changeset 31888ffde37a (bug 1247687)
Backed out changeset 9153182c650d (bug 1247687)
Backed out changeset 45de9ffeec19 (bug 1247687)
Backed out changeset 59207e959b7c (bug 1247687)
Backed out changeset 49f18430c465 (bug 1247687)
Backed out changeset 0ae1fd421d4f (bug 1247687)
Backed out changeset 7770ec4717fd (bug 1247687)
Backed out changeset 68b476066248 (bug 1247687)
Backed out changeset c94a9dc60dff (bug 1247687)
Backed out changeset 0ab366c6eaaf (bug 1247687)
2022-12-21 10:48:15 +02:00
Marian-Vasile Laza 54d965fe8b Backed out 3 changesets (bug 1532644) for causing wpt failures on credentials.sub.html.
Backed out changeset 380433f77fc0 (bug 1532644)
Backed out changeset e1140838e735 (bug 1532644)
Backed out changeset f58b82a75c29 (bug 1532644)
2022-12-21 04:16:56 +02:00
Sean Feng f3b35814c7 Bug 1532644 - Implement the initial version of the Javascript Validator for ORB r=farre,smaug
For things that can be parsed as Javascript, we need to figure out
if they are JSON, and we want to block opaque JSON resources for ORB.

This initial version just checks the first byte of the response, and
blocks it if it's a curly bracket.

Differential Revision: https://phabricator.services.mozilla.com/D163283
2022-12-20 21:41:08 +00:00
Yulia Startsev dcbacd54c8 Bug 1247687 - Implement csp for Module Workers; r=evilpie,asuth,rpl,ckerschb
Depends on D155691

Differential Revision: https://phabricator.services.mozilla.com/D156102
2022-12-20 20:56:15 +00:00
Nika Layzell fea85dfb01 Bug 1804485 - Part 2: Mark Shmem messages as [LazySend], r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D164275
2022-12-20 20:23:37 +00:00
Nika Layzell 97ad997db9 Bug 1804485 - Part 1: Add support for [LazySend] ipc messages, r=ipc-reviewers,mccr8
This is intended to be used to mark messages which do nothing on the
receiving side other than setting up state for future IPC messages,
meaning that the send can be delayed until other more important work is
complete, or until a non-LazySend IPC message is sent.

This does not break any message ordering guarantees, as the lazy
messages will be sent in order before any non-lazy messages are sent.

Differential Revision: https://phabricator.services.mozilla.com/D164274
2022-12-20 20:23:37 +00:00
Sandor Molnar 0ad99cb2f6 Backed out 3 changesets (bug 1752703) for causing spider-monkey bustages.
Backed out changeset 6b8d96806ae6 (bug 1752703)
Backed out changeset afbd8f714804 (bug 1752703)
Backed out changeset 1adb41e2eb9b (bug 1752703)
2022-12-20 10:31:04 +02:00
Gabriele Svelto 63bfefbbe7 Bug 1752703 - Move the pthread_thread_create() interposer under mozglue and prepare for having a single place where we place interposer functions r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D164470
2022-12-20 08:07:37 +00:00
Randell Jesup ce30b1ad51 Bug 1790677: Initial WebTransport IPC for creating and closing WebTransport r=webidl,ipc-reviewers,smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D164124
2022-12-20 04:16:59 +00:00
Csoregi Natalia b3a467b55a Backed out changeset 8ed607207dc2 (bug 1790677) for causing bustage on /WebTransport.cpp. CLOSED TREE 2022-12-19 22:20:55 +02:00
Randell Jesup faeae8bbf8 Bug 1790677: Initial WebTransport IPC for creating and closing WebTransport r=webidl,ipc-reviewers,smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D164124
2022-12-19 17:57:59 +00:00
Jed Davis fedfb9b5e3 Bug 1805761 - Increase the child process shutdown timeout for Windows ccov. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D164872
2022-12-17 18:21:34 +00:00
Csoregi Natalia 0bb5625eb3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2022-12-17 11:44:38 +02:00
Csoregi Natalia c382c6a7ca Backed out 16 changesets (bug 1247687) for frequent string bundle related crashes with PDF viewer (bug 1806064). a=backout
Backed out changeset 721f612fd09f (bug 1247687)
Backed out changeset c6c5750cf713 (bug 1247687)
Backed out changeset 5d05ab0c7cde (bug 1247687)
Backed out changeset 2429599729cb (bug 1247687)
Backed out changeset 55f13fb4ee3f (bug 1247687)
Backed out changeset 354711cf113a (bug 1247687)
Backed out changeset 40b8abaf1c0b (bug 1247687)
Backed out changeset 0c9650a1ac48 (bug 1247687)
Backed out changeset e7b103c79b1a (bug 1247687)
Backed out changeset 4dbd510fb042 (bug 1247687)
Backed out changeset 9276c7e1ddd9 (bug 1247687)
Backed out changeset 6ee318df6641 (bug 1247687)
Backed out changeset 6c129bd72b61 (bug 1247687)
Backed out changeset 4b0a4fcc6894 (bug 1247687)
Backed out changeset 34680059b9f0 (bug 1247687)
Backed out changeset 85b827971a48 (bug 1247687)
2022-12-17 11:27:32 +02:00
Andrew McCreight 865f6e802e Bug 1805445 - Centralize defining a new priority in the IPDL compiler. r=nika
This patch makes it so that you only need to add a new element to a list
to add a new priority to the IPDL compiler.

Differential Revision: https://phabricator.services.mozilla.com/D164836
2022-12-16 16:02:42 +00:00
Paul Zuehlcke f3881e933a Bug 1800102 - Dispatch cookiebannerdetected and cookiebannerhandled events after nsICookieInjector handled a banner. r=timhuang,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164378
2022-12-16 08:54:51 +00:00
Jan Varga cb23cc0476 Bug 1791750 - Add a new argument to serialization methods for passing optional callbacks; r=dom-storage-reviewers,ipc-reviewers,nika,jari
This just about adding a new argument to all relevant places.

Differential Revision: https://phabricator.services.mozilla.com/D164340
2022-12-16 06:38:12 +00:00
Jan Varga 323253d8d7 Bug 1791750 - Add support for using QuotaObject in content processes; r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D157822
2022-12-16 06:38:12 +00:00
Chris Martin cfcb9fcb81 Bug 1799470 - Merge old embedding logic into ContentChild r=nika
Differential Revision: https://phabricator.services.mozilla.com/D164596
2022-12-15 03:06:22 +00:00
Yulia Startsev 4916e53611 Bug 1247687 - Implement csp for Module Workers; r=evilpie,asuth,rpl,ckerschb
Depends on D155691

Differential Revision: https://phabricator.services.mozilla.com/D156102
2022-12-14 14:55:38 +00:00
Jed Davis 46dbfb9167 Bug 1793525 - Get crash reports for child processes shutdown hangs on debug/sanitizer/ccov builds. r=nika,yjuglaret
On the build types where child processes need to go through full
shutdown to write some kind of logs or data (debug / refcount logging,
sanitizers, code coverage), the parent process currently waits forever
for them to exit and blocks its own shutdown to do so.  If we were to
time out and kill the child processes, test runs would fail due to
missing the log files they were expected to write; instead, they fail
and blame the parent process for not exiting, which is not especially
helpful.

What we'd like is to know the state of the child process that's failing
to exit.  This patch attempts to get a crash report in that situation; on
Unix we send SIGABRT, and on Windows we inject a thread that calls
DbgBreakPoint, both of which result in invoking our crash reporter.

Differential Revision: https://phabricator.services.mozilla.com/D161098
2022-12-13 22:57:49 +00:00
Sebastian Hengst 9bc20993bc Backed out 3 changesets (bug 1790872) on request of nika for causing regressions. CLOSED TREE
Backed out changeset 6b72e6c8e3bc (bug 1790872)
Backed out changeset 3e53a1922022 (bug 1790872)
Backed out changeset 862b578d462e (bug 1790872)
2022-12-08 23:17:57 +01:00
Adrien Champion 0a3074cd9c Bug 1802159 - Remove `ipc/chromium/src/third_party` dead C++ cluster 2. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D163325
2022-12-06 15:17:59 +00:00
Adrien Champion 738b389553 Bug 1802159 - Remove `ipc/chromium/src/third_party` dead C++ cluster 1. r=sylvestre,jld
Differential Revision: https://phabricator.services.mozilla.com/D163323
2022-12-06 15:17:59 +00:00
Manuel Bucher 6f5875ad8c Bug 1771867 - Early Hints Phase 2 - Part 1: Add ongoing early hint preloads to http IPC channel args r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161172
2022-12-02 16:15:53 +00:00
Csoregi Natalia 5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher a61c8650f9 Bug 1771867 - Early Hints Phase 2 - Part 1: Add ongoing early hint preloads to http IPC channel args r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161172
2022-12-02 09:45:23 +00:00
Nika Layzell c6fde75b19 Bug 1443925 - Part 6: Allow specifying Domain when creating content principals, r=ckerschb,bholley
This is required for deserializing nsIPrincipal instances from PrincipalInfo to
be threadsafe, as setting domain with `SetDomain()` is only safe on the main
thread, due to it enumerating and updating JS wrappers.

Differential Revision: https://phabricator.services.mozilla.com/D163036
2022-12-02 00:53:51 +00:00
Cristian Tuns be4a264992 Backed out 3 changesets (bug 1802159) for causing build bustages CLOSED TREE
Backed out changeset cebac9d69d82 (bug 1802159)
Backed out changeset 3a5a51fb1df4 (bug 1802159)
Backed out changeset 7e4833393b80 (bug 1802159)
2022-12-01 13:12:13 -05:00
Adrien Champion 95a70a212d Bug 1802159 - Remove `ipc/chromium/src/third_party` dead C++ cluster 2. r=jld
Depends on D163324

Differential Revision: https://phabricator.services.mozilla.com/D163325
2022-12-01 17:43:50 +00:00
Adrien Champion 6f19f8e59e Bug 1802159 - Remove `ipc/chromium/src/third_party` dead C++ cluster 3. r=jld
Depends on D163323

Differential Revision: https://phabricator.services.mozilla.com/D163324
2022-12-01 17:43:49 +00:00
Adrien Champion fc6b6ae9b8 Bug 1802159 - Remove `ipc/chromium/src/third_party` dead C++ cluster 1. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D163323
2022-12-01 17:43:49 +00:00
Alexandre Lissy 5d0257721a Bug 1798711 - Remove duplication of DisableCrashReporter on gtest r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D162972
2022-11-30 14:41:42 +00:00
Alexandre Lissy 239ea2a241 Bug 1802513 - Augment utility audio tests with ffmpeg/ffvpx r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D163228
2022-11-30 10:10:23 +00:00
Otto Länd 5b55d67f75 No bug: apply code formatting via Lando
# ignore-this-changeset
2022-11-29 23:20:39 +00:00
Nika Layzell ca638b64ea Bug 1790872 - Part 3: Add a unit test for the IPC sent/recvd message telemetry, r=ipc-reviewers,mccr8
This is done using the gtest framework, and adds a new protocol which has its
messages counted. As the IPDLUnitTest process doesn't count IPC messages with
glean, this only counts messages on the parent process side.

This test also checks that we don't count this information outside of nightly,
and that it isn't counted for messages sent within the same process.

Differential Revision: https://phabricator.services.mozilla.com/D158275
2022-11-29 22:24:32 +00:00
Nika Layzell a41bb651f6 Bug 1790872 - Part 2: Make the process mode available to IPDL gtests, r=ipc-reviewers,mccr8
This will be useful in the next part to write a test with different behaviour
depending on whether it's cross-process.

Differential Revision: https://phabricator.services.mozilla.com/D158274
2022-11-29 22:24:32 +00:00
Nika Layzell b40577784e Bug 1790872 - Part 1: Report glean telemetry about which IPC messages are being sent, r=florian,ipc-reviewers,mccr8
This will provide us with more information with which to discover what
IPC messages are being sent extremely frequently, especially from
background processes, and what we can do to avoid unnecessary wakeups.

This is intended for power usage work, and is being tracked in a similar
way to the thread wakeups work, based on process types, such that the
data can be compared between the two.

Differential Revision: https://phabricator.services.mozilla.com/D157855
2022-11-29 22:24:31 +00:00
Nika Layzell f001853338 Bug 1799692 - Part 1: Introduce ThreadsafeContentParentHandle, r=asuth
This introduces a new type to ContentParent which acts as a weak handle to the
actor and is safe to hold and manipulate from any thread.

This replaces accesses of the `ContentParent` type from the background thread,
as they were error-prone due to ContentParent not being threadsafe-refcounted.

The bulk of this patch is piping the new type through to the places it is
required, and removing now-unecessary extra complexity.

Differential Revision: https://phabricator.services.mozilla.com/D162346
2022-11-29 20:41:46 +00:00
Nika Layzell 34e62a0d9c Bug 1538028 - Part 2: Track TriggeringRemoteType through nsDocShellLoadState and LoadInfo, r=smaug,ckerschb,necko-reviewers,valentin
This is done using slightly different mechanisms for each of LoadInfo and
nsDocShellLoadState, and will be used in the next part to validate document
loads based on the RemoteType responsible for the load.

For subresource loads, the TriggeringRemoteType is fairly straightforward - it
is the process which created the channel. We can handle this by getting the
current remote type when creating the channel, and then using the remote type
of the sending process when receiving the LoadInfo over IPC to either replace
the triggering remote type, or validate it.

For document loads, the situation is a bit more complex, as there are at least
3 (potentially-)different processes responsible for different parts of the
navigation:

 1. The "Triggering Process" is the process which provided the URI to load.
    This is also the process which provides the Triggering Principal. This is
    the process being tracked in this patch.

 2. The "Loading Process" is the process which actually creates the channel and
    starts the load. This may be the same as the triggering process, or may be
    a different process starting the navigation on behalf of the triggering
    process. In general this is the process hosting the current docshell,
    though it may be the parent process in the case of parent-initiated loads.

 3. The "Final Process" is the process which receives the response and renders
    the final document. This isn't known at channel creation time, and is
    determined by the result principal and process isolation policy.

This change uses a serializer and special field on nsDocShellLoadState to track
the "Triggering Process" for the load, even as the load state is serialized
between processes by tracking which loads were sent into which content
processes, and matching them up when the parent process sees them again. The
information is then copied into the LoadInfo before configuring the real
channel, so it can be used for security checks.

The "Triggering Process" is overridden to be the parent process for history
loads, as history loads are often started in processes which wouldn't normally
be able to navigate to those pages. This is OK thanks to the changes in part 1
which validate history loads against the real session history when SHIP is
enabled.

Differential Revision: https://phabricator.services.mozilla.com/D161198
2022-11-29 20:41:45 +00:00
Kelsey Gilbert 7671a9d5a4 Bug 1801021 - Use BigBuffer for DispatchCommands. r=gfx-reviewers,lsalzman
Using ipc::Shmem causes unbounded shmem use growth until e.g. a Worker
yields to the event loop. If a Worker never yields, Shmems sent to WebGLParent
are never released.

Specifically the manager (PCanvasManager) for WebGLParent calls
DestroySharedMemory, which sends/enqueues for WebGLChild's manager a
matching call to ShmemDestroyed. However, while WebGLChild refuses to spin its
event loop (such as a no-return WASM Worker), the ShmemDestroyed events
will just pile up. Closing e.g. the tab frees the shmems, but they accumulate
unbounded until the Worker yields to the event loop.

This is true for other users of ipc::Shmem (or RaiiShmem) as well, but
entrypoints other than DispatchCommands are rarer and can be handled
later similarly.

Differential Revision: https://phabricator.services.mozilla.com/D162946
2022-11-25 22:20:38 +00:00
Marian-Vasile Laza 04d15c479b Backed out changeset fa04ef087c24 (bug 1801021) for causing bustages on WebGLChild.cpp. CLOSED TREE 2022-11-25 20:38:32 +02:00
Kelsey Gilbert cfebc1bd3c Bug 1801021 - Use BigBuffer for DispatchCommands. r=gfx-reviewers,lsalzman
Using ipc::Shmem causes unbounded shmem use growth until e.g. a Worker
yields to the event loop. If a Worker never yields, Shmems sent to WebGLParent
are never released.

Specifically the manager (PCanvasManager) for WebGLParent calls
DestroySharedMemory, which sends/enqueues for WebGLChild's manager a
matching call to ShmemDestroyed. However, while WebGLChild refuses to spin its
event loop (such as a no-return WASM Worker), the ShmemDestroyed events
will just pile up. Closing e.g. the tab frees the shmems, but they accumulate
unbounded until the Worker yields to the event loop.

This is true for other users of ipc::Shmem (or RaiiShmem) as well, but
entrypoints other than DispatchCommands are rarer and can be handled
later similarly.

Differential Revision: https://phabricator.services.mozilla.com/D162946
2022-11-25 15:46:53 +00:00
Magnus Melin 14fc57b869 Bug 1800033 - mozavcodec and mozavutil should be ifdef MOZ_FFPVX. r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D162654
2022-11-24 09:18:55 +00:00
Noemi Erli 83e66b2826 Backed out changeset 41bebff09700 (bug 1800033) for causing failures in browser_utility_audioDecodeCrash.js CLOSED TREE 2022-11-23 14:31:14 +02:00
Magnus Melin 2ff302c8fa Bug 1800033 - mozavcodec and mozavutil should be ifdef MOZ_FFPVX. r=gerard-majax DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D162654
2022-11-23 09:15:45 +00:00
Marco Castelluccio 2d8a5d819f Bug 1790816 - Reformat ipc/ with isort. r=mccr8 DONTBUILD
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162644
2022-11-22 11:07:46 +00:00
Barret Rennie 81c2567091 Bug 1772733 - Change directory in xpcshell without OS.File r=jmaher,nika
Instead of relying on OS.File.setCurrentDirectory in the xpcshell test harness
we instead provide a function to directly change directory.

Differential Revision: https://phabricator.services.mozilla.com/D148977
2022-11-21 23:49:39 +00:00
Dana Keeler 1a2ff46b6e Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-16 16:37:29 +00:00
Marian-Vasile Laza 9c44d165bb Backed out 3 changesets (bug 1791633) for causing bustages on TransportSecurityInfo.cpp. CLOSED TREE
Backed out changeset 23b864e14db0 (bug 1791633)
Backed out changeset 0bcba3375ec0 (bug 1791633)
Backed out changeset ab0ea0d68f5c (bug 1791633)
2022-11-15 23:51:58 +02:00
Dana Keeler 0a13b94a8f Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-15 20:03:29 +00:00
Jan Varga 7390297678 Bug 1790207 - Fix the function for comparing storage keys; r=dom-storage-reviewers,jesup,asuth
Differential Revision: https://phabricator.services.mozilla.com/D162089
2022-11-15 17:13:02 +00:00
Jan Varga f40ce49b02 Bug 1790207 - Forward declaration of mozilla::Result in nsIGlobalObject.h and other cleanup; r=dom-storage-reviewers,jesup
Depends on D162087

Differential Revision: https://phabricator.services.mozilla.com/D162088
2022-11-15 17:13:02 +00:00
Randell Jesup 229303901a Bug 1790207: Provide cross-origin security checks for OPFS r=nika,asuth
Differential Revision: https://phabricator.services.mozilla.com/D157892
2022-11-15 17:13:01 +00:00
Butkovits Atila f3f66bf7e5 Backed out 3 changesets (bug 1791633) for causing build bustages at nsHttpConnectionMgr.cpp:. CLOSED TREE
Backed out changeset ee9744982673 (bug 1791633)
Backed out changeset f5a4bfdaba40 (bug 1791633)
Backed out changeset f57131b9cfe2 (bug 1791633)
2022-11-15 08:07:16 +02:00
Dana Keeler a7fbd7a3a0 Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-15 05:34:40 +00:00
Nika Layzell fbe1612f10 Bug 1794282 - Part 2: Reduce locking contention in IPC::Channel, r=ipc-reviewers,mccr8
In profiles of the regressing benchmarks, it appears that there is some amount
of locking contention when large numbers of small messages messages over IPC.
While the bulk of this contention is probably caused by the OnIOCompleted
callbacks on the IO thread, there's not much we can do about those wake-ups.

This patch tries to reduce the contention by avoiding acquiring the mutex when
receiving IPC messages using the ChannelCapability introduced in part 1.

I am hopeful that this will slightly improve performance, however it seems
likely that there will still be slowdowns due to other parts (like NtWriteFile)
not being easy to optimize.

Future changes such as using a shared memory ring buffer for IPC on windows, or
an approach like ipcz which uses shared memory to avoid signalling messages in
some situations, may improve performance here in the future.

Differential Revision: https://phabricator.services.mozilla.com/D161855
2022-11-14 18:48:49 +00:00
Nika Layzell 4c109c60e7 Bug 1794282 - Part 1: Introduce IPC::ChannelCapability, r=ipc-reviewers,mccr8
This patch introduces a new combined capability, ChannelCapability, which
combines the previous Mutex and IOThread capabilities into a single common
capability. This capability can be asserted using the `Note` methods when
holding the specific inner capabilities to either allow shared access to
guarded variables while holding a single capability, or exclusive access when
holding all capabilities.

This is similar to the MutexSingleWriter pattern, however this implementation
is more flexible, as it also allows interacting with each individual inner
capability individually.

This patch just migrates existing attributes and mutex accesses to their new
names. Changes to behaviour will happen in part 2.

Differential Revision: https://phabricator.services.mozilla.com/D160532
2022-11-14 18:48:48 +00:00
Alexandre Lissy 47ba0361d4 Bug 1800226 - Force enable gtest DisableCrashReporter() on XP_WIN r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D161930
2022-11-14 11:17:09 +00:00
Nicolas Silva a1971c2e74 Bug 1795311 - A new shared memory class with more flexible memory management. r=nika,jld
Differential Revision: https://phabricator.services.mozilla.com/D159398
2022-11-10 15:52:31 +00:00
Cristian Tuns 239d775bde Backed out 2 changesets (bug 1795311) for causing build bustages on WebGPUParent.cpp CLOSED TREE
Backed out changeset 71697f876d88 (bug 1795311)
Backed out changeset 60b9bfda2e8b (bug 1795311)
2022-11-09 11:17:43 -05:00
Nicolas Silva 29b09614fe Bug 1795311 - A new shared memory class with more flexible memory management. r=nika,jld
Differential Revision: https://phabricator.services.mozilla.com/D159398
2022-11-09 14:30:14 +00:00
Alexandre Lissy 12d9aae669 Bug 1797301 - Rework preloading for WMF r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D161440
2022-11-08 18:41:57 +00:00
Alexandre Lissy 7d5a6e7545 Bug 1797301 - Move Utility process to check preloading failures r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160686
2022-11-08 18:41:56 +00:00
Alexandre Lissy 5b97fe29cd Bug 1797301 - Add lib with failure handling r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160685
2022-11-08 18:41:56 +00:00
Kagami Sascha Rosylight cff2152b51 Bug 1794581 - Add base::LaunchOptions::start_independent for Windows use r=jld
This for now only applies to Windows. macOS/Linux support may follow as a separate effort.

Differential Revision: https://phabricator.services.mozilla.com/D160052
2022-11-08 15:42:23 +00:00
Cosmin Sabou 0b1543e85d Backed out 3 changesets (bug 1790872) for causing linux build timeouts. CLOSED TREE
Backed out changeset e4a4e7668efb (bug 1790872)
Backed out changeset 99c09dfae9a7 (bug 1790872)
Backed out changeset 15a5a67c1cee (bug 1790872)
2022-11-08 07:34:48 +02:00
Nika Layzell 798a46bd64 Bug 1790872 - Part 3: Add a unit test for the IPC sent/recvd message telemetry, r=ipc-reviewers,mccr8
This is done using the gtest framework, and adds a new protocol which has its
messages counted. As the IPDLUnitTest process doesn't count IPC messages with
glean, this only counts messages on the parent process side.

This test also checks that we don't count this information outside of nightly,
and that it isn't counted for messages sent within the same process.

Differential Revision: https://phabricator.services.mozilla.com/D158275
2022-11-08 01:11:12 +00:00
Nika Layzell a190397bee Bug 1790872 - Part 2: Make the process mode available to IPDL gtests, r=ipc-reviewers,mccr8
This will be useful in the next part to write a test with different behaviour
depending on whether it's cross-process.

Differential Revision: https://phabricator.services.mozilla.com/D158274
2022-11-08 01:11:12 +00:00
Nika Layzell 40c26a2ea0 Bug 1790872 - Part 1: Report glean telemetry about which IPC messages are being sent, r=florian,ipc-reviewers,mccr8
This will provide us with more information with which to discover what
IPC messages are being sent extremely frequently, especially from
background processes, and what we can do to avoid unnecessary wakeups.

This is intended for power usage work, and is being tracked in a similar
way to the thread wakeups work, based on process types, such that the
data can be compared between the two.

Differential Revision: https://phabricator.services.mozilla.com/D157855
2022-11-08 01:11:11 +00:00
Sandor Molnar 4c4f24bd35 Backed out changeset 87d747a7a020 (bug 1795158) at Alex's (dev) request. CLOSED TREE 2022-11-07 20:14:13 +02:00
ahochheiden 2688f5b8c9 Bug 1795158 - Strip the two leading path segments to resolve an issue on Windows Rust builds caused by comparing paths from two different mount points r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D161359
2022-11-07 02:30:21 +00:00
Iulian Moraru cf06f2778f Backed out 3 changesets (bug 1790872) for causing build bustages. CLOSED TREE
Backed out changeset 4f712ee19854 (bug 1790872)
Backed out changeset c7a5a591b885 (bug 1790872)
Backed out changeset 575d2e57ab31 (bug 1790872)
2022-11-05 00:18:49 +02:00
Ray Kraesig 4100b41970 Bug 1772908 - [4/6] Abjure against casual use of base::ObjectWatcher r=ipc-reviewers,nika
Add a few relevant caveats to ObjectWatcher documentation, in the hope
of keeping someone else from following it down to a dead end.

Differential Revision: https://phabricator.services.mozilla.com/D159561
2022-11-04 21:04:19 +00:00
Greg Stoll d44f201e8f Bug 1760668 - part 1: add ability to blocklist DLLs in socket process. r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D160586
2022-11-04 18:12:59 +00:00
Nika Layzell 20d18c07d7 Bug 1790872 - Part 3: Add a unit test for the IPC sent/recvd message telemetry, r=ipc-reviewers,mccr8
This is done using the gtest framework, and adds a new protocol which has its
messages counted. As the IPDLUnitTest process doesn't count IPC messages with
glean, this only counts messages on the parent process side.

This test also checks that we don't count this information outside of nightly,
and that it isn't counted for messages sent within the same process.

Differential Revision: https://phabricator.services.mozilla.com/D158275
2022-11-04 17:02:59 +00:00
Nika Layzell 5484c32db3 Bug 1790872 - Part 2: Make the process mode available to IPDL gtests, r=ipc-reviewers,mccr8
This will be useful in the next part to write a test with different behaviour
depending on whether it's cross-process.

Differential Revision: https://phabricator.services.mozilla.com/D158274
2022-11-04 17:02:59 +00:00
Nika Layzell c5f9bbfbdc Bug 1790872 - Part 1: Report glean telemetry about which IPC messages are being sent, r=florian,ipc-reviewers,mccr8
This will provide us with more information with which to discover what
IPC messages are being sent extremely frequently, especially from
background processes, and what we can do to avoid unnecessary wakeups.

This is intended for power usage work, and is being tracked in a similar
way to the thread wakeups work, based on process types, such that the
data can be compared between the two.

Differential Revision: https://phabricator.services.mozilla.com/D157855
2022-11-04 17:02:59 +00:00
Sandor Molnar bbf835c6d5 Backed out 2 changesets (bug 1797301) for causing windows build bustage in mozilla::wmf::MediaFoundationInitializer::HasInitialized() CLOSED TREE
Backed out changeset 2ad5f267bbf2 (bug 1797301)
Backed out changeset 4bb66adab63a (bug 1797301)
2022-11-03 01:13:48 +02:00
Alexandre Lissy c9ac344bd0 Bug 1797301 - Move Utility process to check preloading failures r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160686
2022-11-02 21:29:36 +00:00
Alexandre Lissy 7dd24b84ab Bug 1797301 - Add lib with failure handling r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160685
2022-11-02 21:29:35 +00:00
Jeff Muizelaar e63cdeb5e9 Bug 1798600 - Use Created() during creation instead of Mapped(). r=nika
This is less of lie and avoids calling Mapped() twice. Once during
SharedMemoryBasic::Create and once during SharedMemoryBasic::Map.

This fixes shmem-mapped giving the appearence of leaking because
of the double counting.

Differential Revision: https://phabricator.services.mozilla.com/D160990
2022-11-02 19:27:49 +00:00
Bobby Holley e8d791fac7 Bug 1797020 - Add an API to determine if there are any midi devices. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D160974
2022-11-02 17:35:51 +00:00
Sandor Molnar 9b37cccb99 Backed out 2 changesets (bug 1797301) for causing bp-hybrid bustages in ipc/glue/test/gtest/TestUtils.h
Backed out changeset 7268493e86bd (bug 1797301)
Backed out changeset 4f523653d387 (bug 1797301)
2022-11-02 21:04:14 +02:00
Alexandre Lissy 81d94ff7ed Bug 1797301 - Move Utility process to check preloading failures r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160686
2022-11-02 16:06:37 +00:00
Alexandre Lissy 36a553ccd5 Bug 1797301 - Add lib with failure handling r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160685
2022-11-02 16:06:37 +00:00
Stanca Serban 344193e4bd Backed out 2 changesets (bug 1797301) for causing Bp-Hybrid bustages. CLOSED TREE
Backed out changeset 2552990ed77e (bug 1797301)
Backed out changeset 147777c37f57 (bug 1797301)
2022-11-02 15:34:39 +02:00
Alexandre Lissy 994d8a149b Bug 1797301 - Move Utility process to check preloading failures r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160686
2022-11-02 09:54:54 +00:00
Alexandre Lissy 5c49227af4 Bug 1797301 - Add lib with failure handling r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160685
2022-11-02 09:54:53 +00:00
Jens Stutte 48c751b622 Bug 1797688 - Part 7: Substitute gXPCOMThreadsShutDown with InOrBeyond checks in IdleSchedulerParent. r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D160625
2022-11-01 14:08:45 +00:00
Valentin Gosu 00b54695c2 Bug 1793521 - Handle RHEntryInfoToRHEntry returning nullptr in BackgroundUtils.cpp r=ckerschb,freddyb
It seems RHEntryInfoToRHEntry may sometimes fail because deserializing the
principal fails. However, in this case `NS_ENSURE_SUCCESS(rv, rv);` does
nothing and is probably just a left-over from a refactoring.

If we don't bail early we may wind up with a nullptr in the redirectHistory
chain, which is most unexpected.

Differential Revision: https://phabricator.services.mozilla.com/D159373
2022-11-01 09:50:17 +00:00
Alexandre Lissy 2d00f7d25f Bug 1798017 - Only run AsyncBlockers death test on builds where MOZ_ASSERT crashes r=nika
Differential Revision: https://phabricator.services.mozilla.com/D160672
2022-10-29 10:48:08 +00:00
Jed Davis 2d803a76e0 Bug 1797175 - Assert that `base::GetProcId` isn't given an invalid handle. r=nika
This is an adaptation of an improvement that landed upstream in Chromium
(https://crbug.com/869154), to assert that `GetProcessId` doesn't fail
with an invalid handle error; it apparently helped them track down some
use-after-close bugs, so it might be useful.  There are two changes:

1. The assertion is enabled only if `MOZ_DIAGNOSTIC_ASSERT` would be.

2. This patch allows both `kInvalidProcessHandle` as well as null
   handles to simply fail, rather than passing them to the OS and
   setting off the assertion.  Upstream uses only nullptr for optional
   handles (and we should too, but that's beyond the scope of this
   patch).

Differential Revision: https://phabricator.services.mozilla.com/D160297
2022-10-28 20:45:45 +00:00
Nika Layzell f8e46f7fb5 Bug 1797354 - Allow specifying capability type in thread-safety macros, r=jesup,media-playback-reviewers,alwu
It is possible to specify full names for capabilities when using the clang
thread-safety analysis which will be used in error messages. We should use that
form of the attribute rather than the legacy lockable attribute.

Differential Revision: https://phabricator.services.mozilla.com/D160531
2022-10-28 19:55:30 +00:00
Greg Stoll e74b38cd42 Bug 1788271 - Part 3: richer logging for a bunch of Windows messages r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D159199
2022-10-28 18:19:40 +00:00
Alexandre Lissy 399dbc0fe6 Bug 1792636 - Make Utility process crash a non fatal error r=alwu,nika
Differential Revision: https://phabricator.services.mozilla.com/D160268
2022-10-28 16:12:51 +00:00
Jed Davis ded5f3772e Bug 1794200 - Reduce the Windows `base::GetProcId` to just calling `::GetProcessId`. r=nika
This patch is effectively two upstream fixes to `base::GetProcId` on Windows:

1. Removing the fallback to NtQueryInformationProcess, which we haven't
   needed since I think 2012, and which was thread-unsafe; this could have
   resulted in spurious failures if two threads raced to be the first call
   to the function.

2. No longer calling DuplicateHandle to get the `PROCESS_QUERY_INFORMATION`
   access right; the process handles that we open should already have it.

Bug 1794200 has links to Chromium's code reviews for these changes.

Differential Revision: https://phabricator.services.mozilla.com/D160296
2022-10-27 23:22:50 +00:00
Jed Davis 45d35caf61 Bug 1797391 - Avoid process handle use-after-close in GeckoChildProcessHost dtor. r=nika
ProcessWatcher takes ownership of the handle and may close it
immediately if the process has already exited, so that needs to
happen last; currently, because GetProcessId returns 0 for errors,
DeregisterChildCrashAnnotationFileDescriptor will be passed 0 in that
case, and will silently fail and leak resources.

Differential Revision: https://phabricator.services.mozilla.com/D160295
2022-10-27 22:26:07 +00:00
Jan Varga b1ffbdb845 Bug 1791734 - Add nsIRandomAccessStream serialization support; r=ipc-reviewers,necko-reviewers,dom-storage-reviewers,nika,jesup
Only nsFileRandomAccessStream is supported for now.

Differential Revision: https://phabricator.services.mozilla.com/D157794
2022-10-27 16:12:30 +00:00
Alexandre Lissy c66cce0581 Bug 1792203 - Immediately resolve AsyncBlockers when no blocker are registered r=nika
Differential Revision: https://phabricator.services.mozilla.com/D158028
2022-10-26 13:11:43 +00:00
Alexandre Lissy 907f1a352b Bug 1792203 - Add gtest coverage for AsyncBlockers r=nika
Differential Revision: https://phabricator.services.mozilla.com/D158025
2022-10-26 13:11:42 +00:00
Mark Banner 7f3cba09e8 Bug 1795322 - Update toolkit modules references in remaining places. r=mossop,zeid,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D160036
2022-10-26 08:06:37 +00:00
Csoregi Natalia 5f9da7b301 Backed out 12 changesets (bug 1795322) for causing multiple failures e.g. test_deletion_request_ping.py. CLOSED TREE
Backed out changeset aba25cbcda51 (bug 1795322)
Backed out changeset a4a35005ada9 (bug 1795322)
Backed out changeset 8e8d790eb0f4 (bug 1795322)
Backed out changeset db8903454bd3 (bug 1795322)
Backed out changeset 60cc71c61cad (bug 1795322)
Backed out changeset bc6a674994ad (bug 1795322)
Backed out changeset 6ac8a611f8c7 (bug 1795322)
Backed out changeset 9fb873ecfb31 (bug 1795322)
Backed out changeset c8a7a40c2a2f (bug 1795322)
Backed out changeset f2c118b6c6ce (bug 1795322)
Backed out changeset 38df43b4a70f (bug 1795322)
Backed out changeset 89aea8373411 (bug 1795322)
2022-10-25 23:47:58 +03:00
Jed Davis f9aff9e98e Bug 1796758 - Don't try to use `waitid` on OpenBSD. r=nika
OpenBSD, uniquely (as far as I know) of our Unix targets, doesn't
support the function `waitid`, which means that the fix for bug 1793523
broke the build.  However, OpenBSD isn't affected by bug 1793523 because
the crash reporter isn't supported, so it can continue to use `waitpid`.

This patch restores the `waitpid` version of `IsProcessDead` under an
ifdef.  I've tested it locally on Linux (by changing the ifdef), and as
expected it does exhibit bug 1793523 but otherwise seems to work, so it
should work on OpenBSD.

Differential Revision: https://phabricator.services.mozilla.com/D160113
2022-10-25 20:01:52 +00:00
Mark Banner fc7befc08d Bug 1795322 - Update toolkit modules references in remaining places. r=mossop,zeid,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D160036
2022-10-25 19:49:28 +00:00
Iulian Moraru 4f4e6e1160 Backed out 2 changesets (bug 1792203) for causing gtest failures.
Backed out changeset d9048386628e (bug 1792203)
Backed out changeset 119c65339140 (bug 1792203)
2022-10-25 22:35:35 +03:00
Alexandre Lissy b8bc940e27 Bug 1792203 - Immediately resolve AsyncBlockers when no blocker are registered r=nika
Differential Revision: https://phabricator.services.mozilla.com/D158028
2022-10-25 07:31:46 +00:00
Alexandre Lissy 5956c400ec Bug 1792203 - Add gtest coverage for AsyncBlockers r=nika
Differential Revision: https://phabricator.services.mozilla.com/D158025
2022-10-25 07:31:45 +00:00
Butkovits Atila 3d14ccb418 Backed out 2 changesets (bug 1792203) for causing Gtest failures. CLOSED TREE
Backed out changeset b597f145ec59 (bug 1792203)
Backed out changeset 862f59a3f38c (bug 1792203)
2022-10-25 01:08:19 +03:00
Alexandre Lissy b0d5f602e9 Bug 1792203 - Immediately resolve AsyncBlockers when no blocker are registered r=nika
Differential Revision: https://phabricator.services.mozilla.com/D158028
2022-10-24 19:16:23 +00:00
Alexandre Lissy 381ec5381c Bug 1792203 - Add gtest coverage for AsyncBlockers r=nika
Differential Revision: https://phabricator.services.mozilla.com/D158025
2022-10-24 19:16:23 +00:00
Alexandre Lissy d89e679267 Bug 1792952 - Do not instance new UtilityProcessChild during shutdown r=nika,alwu
Differential Revision: https://phabricator.services.mozilla.com/D159687
2022-10-24 17:20:07 +00:00
Andrew McCreight fb4438c096 Bug 1796013 - Clean up defunct protocols in sync-messages.ini. r=nika
The PTest protocols are only built for the C++ unit tests, which we
never want to build as part of a regular build.

The PPlugin protocols were removed along with NPAPI.

PLayerTransaction was removed at some point.

For the PDocAccessible messages I removed, I added logging to
checkFixedSyncMessages to make it print out everything in "fixed",
and I manually checked the dozen or so messages to see if there
were any messages with that name in .ipdl files in the tree. The
ones I removed aren't present.

Differential Revision: https://phabricator.services.mozilla.com/D159653
2022-10-18 23:54:14 +00:00
Jed Davis 9964ac8e24 Bug 1793523 - Replace IPC's use of waitpid with waitid to avoid racing with the crash reporter. r=nika
When IPC is waiting for a process to exit at the same time the crash
reporter is trying to attach to the main thread with `ptrace`, both of
them will use `waitpid` for their respective state changes, and these
calls can race: the ptrace-stop is delivered to IPC, while the crash
reporter and crashed child process hang forever.

This patch changes IPC to use `waitid` with `WNOWAIT`, which allows us to
check the process status without side-effecting it; if it is an exit, the
call is reissued without that flag to obtain the status as before.

(This may not be a problem on macOS, where we use Mach APIs instead of
`ptrace`, but `waitid` has been in POSIX long enough that we should be
safe using it on all Unix platforms.)

This patch also adds some logging when child processes exit with a
failure status or due to a signal.

Differential Revision: https://phabricator.services.mozilla.com/D159186
2022-10-18 23:36:18 +00:00
Jed Davis fb2ce68a73 Bug 1793523 - Remove dead code from DidProcessCrash, leaving a Unix-only IsProcessDead. r=nika
Bug 1277705 removed most of the callers of the IPC helper function
DidProcessCrash.  Currently the only use is on Unix (so the Windows
implementation is dead) and only to check if the process exited; the
return value (i.e., did the process crash) is ignored.

To simplify things for the next patch, this patch removes the unused
functionality and leaves a Unix-only IsProcessDead (the name of the
wrapper that was previously the only call site).

No functional change is intended.

Differential Revision: https://phabricator.services.mozilla.com/D159185
2022-10-18 23:36:18 +00:00
Jed Davis a975ba1c4c Bug 1793523 - Add some tests to increase coverage of IPC child process exit handling. r=nika
The IPC code that deals with waiting for child processes to exit has some
special cases that happen only if the processes take some time to exit.
Currently we're not making any attempt to run that code at all; this
patch attempts to fix that, although it doesn't do anything to verify
that any particular behavior (other than the absence of crashes) happens
in those cases.

Specifically, if the build has tests enabled, the environment variable
`MOZ_TEST_CHILD_EXIT_HANG` now introduces an artificial delay on child
process exit (in a different place for debug vs. opt builds; see
comments for details), and a test case has been added that runs content
processes with that env var set.

Differential Revision: https://phabricator.services.mozilla.com/D159184
2022-10-18 23:36:17 +00:00
Dana Keeler 9c1b9475f3 Bug 1793841 - deserialize nsITransportSecurityInfo without already having an instance of it r=jschanck,necko-reviewers,dragana
This is an important step in making nsITransportSecurityInfo constant.

Depends on D157994

Differential Revision: https://phabricator.services.mozilla.com/D157995
2022-10-18 21:25:03 +00:00
Noemi Erli 5a21645f73 Backed out 2 changesets (bug 1793841) for causing Gtest failures CLOSED TREE
Backed out changeset 4d39c423b92e (bug 1793841)
Backed out changeset 5cfb5f595add (bug 1793841)
2022-10-18 04:29:44 +03:00
Dana Keeler 0d78f1f283 Bug 1793841 - deserialize nsITransportSecurityInfo without already having an instance of it r=jschanck,necko-reviewers,dragana
This is an important step in making nsITransportSecurityInfo constant.

Depends on D157994

Differential Revision: https://phabricator.services.mozilla.com/D157995
2022-10-18 00:18:09 +00:00
Benjamin VanderSloot 066e83f229 Bug 1793647, part 1 - Create new Sec-Fetch-Dest value for WebIdentity (FedCM), r=freddyb,webdriver-reviewers,whimboo
This is to keep up with WHATWG Fetch https://github.com/whatwg/fetch/pull/1495 .
Also revised to not include the new destination type in the RequestDestination enum, per https://github.com/whatwg/fetch/pull/1500 .

I added an element to nsIContentPolicy::nsContentPolicyType as my starting point and
proceeded from there, following the instructions at the end of the internal enum.

Differential Revision: https://phabricator.services.mozilla.com/D158657
2022-10-17 16:07:50 +00:00
Alexandre Lissy 441cf62eed Bug 1794409 - Tests for Telemetry on Utility r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D159042
2022-10-13 13:16:18 +00:00
Alexandre Lissy 435a90663a Bug 1794409 - Add UtilityProcess support for Telemetry r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D158960
2022-10-13 13:16:18 +00:00
Iulian Moraru 69ad012e92 Backed out 2 changesets (bug 1794409) for causing xpcshell failures on test_UtilityScalars.js. CLOSED TREE
Backed out changeset 8f59c21f474c (bug 1794409)
Backed out changeset dfb200d5ae75 (bug 1794409)
2022-10-13 10:07:15 +03:00
Alexandre Lissy 41d4db4ed9 Bug 1794409 - Tests for Telemetry on Utility r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D159042
2022-10-13 06:08:29 +00:00
Alexandre Lissy 3b6b8e904e Bug 1794409 - Add UtilityProcess support for Telemetry r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D158960
2022-10-13 06:08:28 +00:00
Alexandre Lissy a71bf65582 Bug 1794461 - Skip audioDecoderCrash test on Ccov builds r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D158976
2022-10-11 06:54:36 +00:00
Henri Sivonen cce698d0cd Bug 1794401 - Use UTF-8 instead of Latin1 for XPCShell output. r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D158958
2022-10-11 06:10:27 +00:00
alwu b30bf6accf Bug 1791892 - part7 : shutdown gfxconfig and device manager, and use `mKind` to avoid leaking. r=jolin,gerard-majax
We didn't close gfxconfig and the device manager properly before, which
causes a leak.

Also, using `mKind` to store the kind in the beginning helps us not need
to call `UtilityProcessChild::GetSingleton()` again to check the type,
which would also cause leaking and that would be addressed in bug 1792952.

Depends on D158072

Differential Revision: https://phabricator.services.mozilla.com/D158386
2022-10-10 20:13:31 +00:00
Greg Stoll 7950aa0894 Bug 1783304 - Simplify DLL blocklist init r=handyman
Now that SetGeckoProcessType() is called earlier, we can use that to determine if we are a utility process instead of parsing command-line arguments

Differential Revision: https://phabricator.services.mozilla.com/D158811
2022-10-07 19:22:45 +00:00
Nika Layzell f5d6df8915 Bug 1792474 - Part 4: Avoid the IO thread hop when sending IPC messages, r=ipc-reviewers,jld
This involves some changes to IPC::Channel::ChannelImpl on all platforms in
order to ensure that they are threadsafe.

1. The ChannelImpl is now internally refcounted, making the correctness
   of parts of its lifecycle more clear.
2. Members of the channel are all annotated with `MOZ_GUARDED_BY` for either
   the `io_thread_` or `mutex_` depending on if they are required in order to
   send a message. This gives us some static checks that we won't deadlock.
3. The `closed_` field is removed, as thanks to the mutex, `pipe_` can now be
   checked directly from any thread instead. This reduces the risk of
   forgetting to update `closed_`.
4. `NodeChannel` now calls `Send()` without dispatching, which also required
   updating some other members to also be accessible from any thread, including
   changes to allow asynchronously reporting a channel error when `Send()`
   fails.
5. The Windows handling for `Connect()` was made more thread-safe to queue
   calls to `Send()` performed before `Connect()` returns. The posix
   `Connect()` handler already did this.

Differential Revision: https://phabricator.services.mozilla.com/D158162
2022-10-07 01:51:29 +00:00
Nika Layzell f51f359297 Bug 1792474 - Part 3: Stop using IPC::Channel to create the pipe for ForkServer, r=ipc-reviewers,jld
Previously the channel used by the ForkServer would be created using
IPC::Channel, and then stolen after the launch was successful. Unfortunately,
this required invoking IPC::Channel methods (such as `Close()`) from the wrong
thread, and so would be racy and hit assertions with the new checks being
added. This patch instead skips creating the IPC::Channel for the fork server,
and allows it to create and configure its own pipe as needed.

This may be used in the future to change out the IPC strategy for the fork
server to something more appropriate, which supports features like async
replies as forked processes die.

Differential Revision: https://phabricator.services.mozilla.com/D158161
2022-10-07 01:51:29 +00:00
Nika Layzell 4b0d8ed93e Bug 1792474 - Part 2: Remove a couple of unused IPC::Channel members, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D158160
2022-10-07 01:51:28 +00:00
Alexandre Lissy 86c49e5acd Bug 1788596 - Force audio element load to avoid edge case on media error handling r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D158076
2022-10-06 15:52:00 +00:00
Alexandre Lissy 6d1c22012d Bug 1788596 - Assert CleanShutown() of audioDecoder_* actor shuts down fine r=nika
Differential Revision: https://phabricator.services.mozilla.com/D157480
2022-10-06 15:52:00 +00:00
Alexandre Lissy 9b9e327700 Bug 1788596 - Release UtilityProcessChild later to allow mShutdownBlockers to act r=nika
Differential Revision: https://phabricator.services.mozilla.com/D157938
2022-10-06 15:51:59 +00:00
Alexandre Lissy 2173169002 Bug 1788596 - Kill audioDecoder_Generic if hanging r=nika
Differential Revision: https://phabricator.services.mozilla.com/D157479
2022-10-06 15:51:59 +00:00
Alexandre Lissy 06ac7c2582 Bug 1788596 - Release UtilityProcessManager at the right moment r=nika
Differential Revision: https://phabricator.services.mozilla.com/D156847
2022-10-06 15:51:59 +00:00