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

7769 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond 25c238ea4e Bug 1845946 - Part 1. Switch GMP process launching IPDL messages from sync to async. r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
When launching the GMP process, or querying its state, via PGMPService,
the design was already asynchronous. As such we can remove the sync
requirement quite easily and allow more flexibility on the parent
process side.

Differential Revision: https://phabricator.services.mozilla.com/D185335
2023-08-15 16:46:12 +00:00
Benjamin VanderSloot 58d36f75d6 Bug 1835907, part 1 - Add has storage access bit and triggering window id to the LoadInfo - r=smaug,necko-reviewers,kershaw,pbz
In the Storage Access API's latest draft, a few items were added to the user-agent state. Relevant here,
the source snapshot params gained two fields that are initialized from the sourceDocument during
snapshotting source params while navigating: "has storage access" and "environment id".

https://privacycg.github.io/storage-access/#ua-state

These are used to identify self-initiated navigations that come from documents that have obtained storage access.
Combined with a same-origin check, this determines if the destination document of the navigation should start
with storage access.

This is stricter than the current behavior, where if the permission is available, all documents start with storage access.
Instead, now a document will only have storage access if it requests it explicitly or if a same-origin document that has
storage access navigates itself to that document. This is seen as a security win.

Security discussion of this change was here: https://github.com/privacycg/storage-access/issues/113
Artur at Google wrote up a great summary here: https://docs.google.com/document/d/1AsrETl-7XvnZNbG81Zy9BcZfKbqACQYBSrjM3VsIpjY/edit#

Differential Revision: https://phabricator.services.mozilla.com/D184821
2023-08-15 13:04:04 +00:00
Cosmin Sabou 4f5ef3986b Backed out 6 changesets (bug 1835907) for causing multiple failures. CLOSED TREE
Backed out changeset 91ef29afec50 (bug 1835907)
Backed out changeset 989479621780 (bug 1835907)
Backed out changeset 86e3f98ceb31 (bug 1835907)
Backed out changeset 4790e44c234c (bug 1835907)
Backed out changeset bb9f48eec5bf (bug 1835907)
Backed out changeset 74f90708260a (bug 1835907)
2023-08-14 22:18:10 +03:00
Benjamin VanderSloot 06a4432ed1 Bug 1835907, part 1 - Add has storage access bit and triggering window id to the LoadInfo - r=smaug,necko-reviewers,kershaw,pbz
In the Storage Access API's latest draft, a few items were added to the user-agent state. Relevant here,
the source snapshot params gained two fields that are initialized from the sourceDocument during
snapshotting source params while navigating: "has storage access" and "environment id".

https://privacycg.github.io/storage-access/#ua-state

These are used to identify self-initiated navigations that come from documents that have obtained storage access.
Combined with a same-origin check, this determines if the destination document of the navigation should start
with storage access.

This is stricter than the current behavior, where if the permission is available, all documents start with storage access.
Instead, now a document will only have storage access if it requests it explicitly or if a same-origin document that has
storage access navigates itself to that document. This is seen as a security win.

Security discussion of this change was here: https://github.com/privacycg/storage-access/issues/113
Artur at Google wrote up a great summary here: https://docs.google.com/document/d/1AsrETl-7XvnZNbG81Zy9BcZfKbqACQYBSrjM3VsIpjY/edit#

Differential Revision: https://phabricator.services.mozilla.com/D184821
2023-08-14 18:02:46 +00:00
Cristian Tuns da1e39f50e Backed out 3 changesets (bug 1845946) for causing bug 1848484. CLOSED TREE
Backed out changeset bad73ceb87dd (bug 1845946)
Backed out changeset f984e69872e4 (bug 1845946)
Backed out changeset af600f0290b6 (bug 1845946)
2023-08-13 15:38:36 -04:00
Manuel Bucher 43f8338f9c Bug 1842754 - Make LoadInfoArgs non-optional over IPC r=necko-reviewers,jesup
This makes all occurences of LoadInfoArgs non-optional also when
converting between nsILoadInfo in BackgroundUtils.h.

Differential Revision: https://phabricator.services.mozilla.com/D185299
2023-08-11 13:45:25 +00:00
Gregory Pappas 731275ba2f Bug 1846641 - Remove Adobe Flash fullscreen IPC handling r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D185110
2023-08-10 18:48:07 +00:00
Andrew Osmond 4ca8d166c5 Bug 1845946 - Part 1. Switch GMP process launching IPDL messages from sync to async. r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
When launching the GMP process, or querying its state, via PGMPService,
the design was already asynchronous. As such we can remove the sync
requirement quite easily and allow more flexibility on the parent
process side.

Differential Revision: https://phabricator.services.mozilla.com/D185335
2023-08-10 14:31:47 +00:00
Jed Davis 583d256da7 Bug 1840515 - Step 2: Preload the omnijars in the fork server. r=nika
This extends the previous support for `-greomni` and `-appomni` to the
fork server, so that it can pre-open the jar files and thus continue
using the correct versions in forked child processes even if the files on
disk are replaced by an update or deleted.

Differential Revision: https://phabricator.services.mozilla.com/D185331
2023-08-09 21:35:50 +00:00
Jed Davis 2ad421aaf8 Bug 1840515 - Step 1: Use -greomni/-appomni for content processes. r=nika,mhowell
Currently, each content process re-derives the path(s) of the omnijar
file(s).  We used to pass it down as a command-line argument, but
those args were also accepted by the parent process and there were
issues with that (CVE-2020-6799) such that they were completely removed
(bug 1531475).  However, content processes can generally trust their
arguments; note that they currently accept `-appDir`.

We were already using `-gredir` for this on Android (it has a unified
omnijar, so there's no `-appdir` in that case); this patch subsumes the
content-process case of that, but not the parent process (which consumes
basically a fake argv constructed in Java code).

Note that only the parent process and content processes use the
omnijars; every other process type uses either minimal XPCOM, which
doesn't include them, or no XPCOM at all (e.g., GMP before bug 1845946).

The end goal of this patch series is to use those flags with the fork
server (so that it can preload the files without needing any XPCOM), but
this patch changes only the case of content processes.

Differential Revision: https://phabricator.services.mozilla.com/D182510
2023-08-09 21:35:49 +00:00
Jed Davis c9012150fb Bug 1840515 - Step 0: Use GeckoArgs for the `-greomni` and `-appomni` flags. r=nika
The `-appomni` flag isn't currently used, but the next patch will bring
it back and change how both flags are processed in child processes.

Differential Revision: https://phabricator.services.mozilla.com/D185330
2023-08-09 21:35:49 +00:00
Natalia Csoregi d2ed1b1ca2 Backed out changeset 3c585e66b44b (bug 1842754) for causing Bug 1847904. CLOSED TREE 2023-08-09 19:35:08 +03:00
Christian Holler (:decoder) c4325468f0 Bug 1847780 - Make RemoteLazyInputStream and DataPipeReceiver non-nullable. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D185721
2023-08-09 15:47:15 +00:00
Manuel Bucher f37405ff24 Bug 1842754 - Make LoadInfoArgs non-optional over IPC r=necko-reviewers,jesup
This makes all occurences of LoadInfoArgs non-optional also when
converting between nsILoadInfo in BackgroundUtils.h.

Differential Revision: https://phabricator.services.mozilla.com/D185299
2023-08-08 14:37:19 +00:00
Paul Adenot 5cc7f12b8c Bug 1823953 - Adjust utility process tests: the expected decoders are now ffmpeg. r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D182369
2023-08-08 12:12:54 +00:00
Iulian Moraru 98f7137dd1 Backed out changeset 05857d2111ba (bug 1842754) for causing build bustages on BackgroundUtils.cpp. CLOSED TREE 2023-08-08 13:51:28 +03:00
Manuel Bucher 25a2f89619 Bug 1842754 - Make LoadInfoArgs non-optional over IPC r=necko-reviewers,jesup
This makes all occurences of LoadInfoArgs non-optional also when
converting between nsILoadInfo in BackgroundUtils.h.

Differential Revision: https://phabricator.services.mozilla.com/D185299
2023-08-08 10:25:04 +00:00
Nika Layzell e21e43e089 Bug 1845146 - Check numberOfBytes{Read,Written} in TestManyHandles, r=ipc-reviewers,handyman
When running GTests on Windows 7, the TestManyHandles test crashes due
to the lpNumberOfBytesWritten argument to WriteFile not being passed.
This argument is required on earlier versions of Windows like Windows 7.

While we no longer support Windows 7 on Nightly, we still support it on
ESR, and are trying to run GTests on Windows 7 there. It also doesn't
hurt to add extra assertions that the full amount of data is
read/written, so checking this could be valuable on m-c as well.

Differential Revision: https://phabricator.services.mozilla.com/D184393
2023-08-02 21:40:19 +00:00
Brad Werth 5c1d5c00b9 Bug 1845144 Part 2: Remove macOS available and builtin_available directives for always-supported versions of macOS. r=mac-reviewers,mstange,keeler,padenot
This also does minimal refactoring of cases where the directives were
protecting a simple expression that could be refactored back to the
callers.

Differential Revision: https://phabricator.services.mozilla.com/D184399
2023-08-02 02:26:14 +00:00
Cristian Tuns 5d6b51256b Backed out 57 changesets (bug 1839389, bug 1840869, bug 1840399, bug 1840402, bug 1823953, bug 1828912, bug 1826382, bug 1837160, bug 1839391, bug 1833654) for causing build bustages in ogg_<something> CLOSED TREE
Backed out changeset 61356e1447e3 (bug 1823953)
Backed out changeset 85785505b6d6 (bug 1823953)
Backed out changeset 46a61cbfe8a8 (bug 1833654)
Backed out changeset 83e3de80337b (bug 1833654)
Backed out changeset 1a10c12874ac (bug 1840399)
Backed out changeset 6b087145b67f (bug 1833654)
Backed out changeset b9ac857ad43f (bug 1840399)
Backed out changeset 4b841e8dd033 (bug 1823953)
Backed out changeset 650e35803834 (bug 1823953)
Backed out changeset c11b58ac0709 (bug 1823953)
Backed out changeset c0249c90bc31 (bug 1823953)
Backed out changeset 8929288d5aec (bug 1823953)
Backed out changeset 828792b886bd (bug 1823953)
Backed out changeset 873f1d4a8875 (bug 1840869)
Backed out changeset a25abd05302c (bug 1823953)
Backed out changeset d4b1eb442c36 (bug 1840399)
Backed out changeset c25509d72a96 (bug 1840399)
Backed out changeset 0f72a0626a28 (bug 1840402)
Backed out changeset 82e7574364ce (bug 1840399)
Backed out changeset 93073105f063 (bug 1840399)
Backed out changeset 56ec8e3405e9 (bug 1840399)
Backed out changeset ff15dad37ab8 (bug 1840399)
Backed out changeset 0655ebd61eda (bug 1840399)
Backed out changeset 7bca1ae06c7d (bug 1828912)
Backed out changeset 8a5a849cfe5f (bug 1828912)
Backed out changeset 3d8422a2038a (bug 1828912)
Backed out changeset f08ee5de9370 (bug 1823953)
Backed out changeset a4eb210620ff (bug 1823953)
Backed out changeset aa8914cd55be (bug 1839391)
Backed out changeset 3ea1f43e4024 (bug 1823953)
Backed out changeset 3efe02ffa1c8 (bug 1826382)
Backed out changeset 81c4553ec23d (bug 1839391)
Backed out changeset 130894e4a781 (bug 1839391)
Backed out changeset 9a0247b0fc85 (bug 1839391)
Backed out changeset 11a923064382 (bug 1839391)
Backed out changeset 98ffb66160c3 (bug 1837160)
Backed out changeset a80dda9a220a (bug 1837160)
Backed out changeset 251b4ef97a2b (bug 1837160)
Backed out changeset 7372632eb32f (bug 1837160)
Backed out changeset c5d54bc3ee26 (bug 1839389)
Backed out changeset b232ec1bbc2d (bug 1833654)
Backed out changeset fc7ba125c2fe (bug 1833654)
Backed out changeset 8a47f6882e61 (bug 1823953)
Backed out changeset e29810541b53 (bug 1828912)
Backed out changeset bcf10730c8c9 (bug 1828912)
Backed out changeset 8df8290b6c33 (bug 1826382)
Backed out changeset 2811d12803cf (bug 1826382)
Backed out changeset 3fc718561ec9 (bug 1826382)
Backed out changeset 7827183776e1 (bug 1823953)
Backed out changeset a3eb5f228d9a (bug 1826382)
Backed out changeset 3113ad2e0987 (bug 1823953)
Backed out changeset 4b1dc01525af (bug 1823953)
Backed out changeset f7f4a7585ceb (bug 1823953)
Backed out changeset 93042f1becec (bug 1823953)
Backed out changeset b9ca30a0a066 (bug 1823953)
Backed out changeset 1000c4a6a92a (bug 1823953)
Backed out changeset 05dc13775fd6 (bug 1823953)
2023-08-01 09:37:39 -04:00
Paul Adenot dc3ade886c Bug 1823953 - Adjust utility process tests: the expected decoders are now ffmpeg. r=gerard-majax DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D182369
2023-08-01 12:41:15 +00:00
Iulian Moraru f8b5b0e9dc Backed out 3 changesets (bug 1845144) for causing py3 failures on test_toolchain_configure.py. CLOSED TREE
Backed out changeset 5168c7b1cf04 (bug 1845144)
Backed out changeset 6afda17fe413 (bug 1845144)
Backed out changeset d233c63f8121 (bug 1845144)
2023-08-01 06:06:53 +03:00
Brad Werth 4280325241 Bug 1845144 Part 2: Remove macOS available and builtin_available directives for always-supported versions of macOS. r=mac-reviewers,mstange,keeler
This also does minimal refactoring of cases where the directives were
protecting a simple expression that could be refactored back to the
callers.

Differential Revision: https://phabricator.services.mozilla.com/D184399
2023-07-31 22:18:09 +00:00
Tom Schuster ed711958ea Bug 1627263 - Propagate nonce attribute from Link header preloads to loaders. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D183968
2023-07-31 14:49:57 +00:00
Masatoshi Kimura 1518105f40 Bug 1844908 - Remove pre-Win10-specific codepath from ipc/. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D184295
2023-07-26 08:52:51 +00:00
Natalia Csoregi 72a7b95555 Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Masatoshi Kimura 83598950c1 Bug 1844908 - Remove pre-Win10-specific codepath from ipc/. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D184295
2023-07-25 14:41:02 +00:00
Alexandre Lissy ef97fd6a47 Bug 1844922 - Use getExtraKey() for proper telemetry validation r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D184322
2023-07-24 09:22:00 +00:00
Alexandre Lissy 6599b6b882 Bug 1844284 - Add utility audio decoding telemetry for EME r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D183978
2023-07-21 08:28:32 +00:00
Nika Layzell aa962084cc Bug 1454808 - Remove SharedMemoryBasic_android, r=jld
The special handling for android is in chromium's SharedMemory type,
meaning we can use SharedMemoryBasic_chromium now on Android.

This patch removes the android special casing to use the chromium
backend on that platform as well.

Differential Revision: https://phabricator.services.mozilla.com/D182808
2023-07-20 20:23:41 +00:00
Masatoshi Kimura 181d1d2914 Bug 1844257 - Remove ipc/glue/LibrarySandboxPreload.(cpp|h). r=glandium
They are leftovers from bug 1572618 and bug 1737733.

Differential Revision: https://phabricator.services.mozilla.com/D183973
2023-07-19 23:29:19 +00:00
Benjamin VanderSloot 19ec221a97 Bug 1805860 - Remove navigator.permissions.revoke dead code - r=anti-tracking-reviewers,ipc-reviewers,webidl,saschanaz,mccr8,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D182242
2023-07-19 14:51:11 +00:00
Stanca Serban 9e82c693d0 Backed out 8 changesets (bug 1805860, bug 1733556) for causing bp-nu bustages in StorageAccessAPIHelper.cpp.
Backed out changeset fa21a55ce837 (bug 1733556)
Backed out changeset 6c09379cdb5a (bug 1733556)
Backed out changeset d8c19265b981 (bug 1733556)
Backed out changeset d48d415fca83 (bug 1805860)
Backed out changeset 3acd0ba1dba6 (bug 1805860)
Backed out changeset d2a6174bbb14 (bug 1805860)
Backed out changeset 48558ba49efe (bug 1805860)
Backed out changeset c8693b9449d3 (bug 1805860)
2023-07-18 23:39:08 +03:00
Benjamin VanderSloot 0530069978 Bug 1805860 - Remove navigator.permissions.revoke dead code - r=anti-tracking-reviewers,ipc-reviewers,webidl,saschanaz,mccr8,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D182242
2023-07-18 19:14:30 +00:00
Alexandre Lissy eccd396194 Bug 1843020 - Re-enable Win32k Lockdown for Utility WMF r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D183861
2023-07-18 13:19:32 +00:00
Nika Layzell bf04b0d8de Bug 1840974 - Part 3: Make sure otherpid is set if known on IPC::Channel, r=ipc-reviewers,jld
This improves the quality of the logging from IPC::Channel, and also
adds extra assertions to ensure that it's aligned with the values
sent/received in the HELLO message.

This patch also makes the other_pid type more consistent, using
base::ProcessId instead of int32_t in IPC::Channel.

Differential Revision: https://phabricator.services.mozilla.com/D183410
2023-07-17 20:32:09 +00:00
Nika Layzell df80b1cacb Bug 1840974 - Part 2: Silence spurious IPC channel errors on Windows, r=ipc-reviewers,jld
There were a few types of errors which could spuriously happen on Windows, and
are being fixed by this patch. The `ERROR_NO_DATA` error is now being silenced
similar to `ERROR_BROKEN_PIPE`. This appears to happen in some specific
edge-cases around the pipe's lifecycle, such as when the pipe has been created
and then destroyed, but no data has been sent yet.

This patch also silences errors when transferring or accepting handles if
`DuplicateHandle` fails due to the target process terminating. In this
situation, `DuplicateHandle` returns `ERROR_ACCESS_DENIED`, which is
unfortunately ambiguous. To avoid that ambiguity, this patch takes the same
approach as Chromium, and uses the `RtlGetLastNtStatus` function from ntdll to
get the true error status, and compare it to `STATUS_PROCESS_IS_TERMINATING`.
This matches the behaviour in Chromium to silence the same error.

Differential Revision: https://phabricator.services.mozilla.com/D183409
2023-07-17 20:32:09 +00:00
Nika Layzell 8b0181289a Bug 1840974 - Part 1: Improve ipc_channel_win HANDLE transfer errors, r=ipc-reviewers,mccr8
Previously these logs would produce misleading errors due to the HANDLE being
duplicated having been clobbered by the failed DuplicateHandle call. This patch
changes them to include more information in the error log, and makes the error
logs more accurate.

Differential Revision: https://phabricator.services.mozilla.com/D183408
2023-07-17 20:32:09 +00:00
kriswright 51331a8ca5 Bug 1834629 - Set main thread QoS Priority from another thread. r=mccr8
This bug uses the existing process hang messaging infrastructure to raise priorities on main threads. To ensure reduced latency, we also increase the priority of ProcessHangMon threads. We also address an edge-case bug where flipping the QoS prefs during use might lead to a tab getting stuck at the wrong priority.

Due to increasing the priority of the hang monitor thread, we may see some increase in its utilization on MacOS during high CPU load. I'm not sure the extent of how this may impact the browser, but as it makes the thread "faster" it may be more responsive than some other threads during this case.

I tested thread responsiveness by using the stress tool and dispatching various numbers of worker threads, up to 250. During these tests, even when other parts of firefox were less responsive under stress, tab switching appeared to remain snappy and responsive.

I captured some updated power profiles using the change. Profile where pref flipped off during use: https://share.firefox.dev/46BksO3 (Note that we start with the prefs on, then we flip off the prefs half way and repeat the same behavior to observe the fix to the previous bug that left tabs trapped in the background)

Profile with the pref fully enabled: https://share.firefox.dev/46EBIC7

In regards to the edge case, to avoid spurious tab wakeups, we won't reinstate normal thread priority when pref is disabled until the tab is interacted with again.

Differential Revision: https://phabricator.services.mozilla.com/D182787
2023-07-14 16:13:00 +00:00
Narcis Beleuzu 060e6a5a23 Backed out changeset 70e3969301b9 (bug 1834629) for bustages on ProcessHangMonitor.cpp . CLOSED TREE 2023-07-13 21:00:46 +03:00
kriswright e6c30dd889 Bug 1834629 - Set main thread QoS Priority from another thread. r=mccr8
This bug uses the existing process hang messaging infrastructure to raise priorities on main threads. To ensure reduced latency, we also increase the priority of ProcessHangMon threads. We also address an edge-case bug where flipping the QoS prefs during use might lead to a tab getting stuck at the wrong priority.

Due to increasing the priority of the hang monitor thread, we may see some increase in its utilization on MacOS during high CPU load. I'm not sure the extent of how this may impact the browser, but as it makes the thread "faster" it may be more responsive than some other threads during this case.

I tested thread responsiveness by using the stress tool and dispatching various numbers of worker threads, up to 250. During these tests, even when other parts of firefox were less responsive under stress, tab switching appeared to remain snappy and responsive.

I captured some updated power profiles using the change. Profile where pref flipped off during use: https://share.firefox.dev/46BksO3 (Note that we start with the prefs on, then we flip off the prefs half way and repeat the same behavior to observe the fix to the previous bug that left tabs trapped in the background)

Profile with the pref fully enabled: https://share.firefox.dev/46EBIC7

In regards to the edge case, to avoid spurious tab wakeups, we won't reinstate normal thread priority when pref is disabled until the tab is interacted with again.

Differential Revision: https://phabricator.services.mozilla.com/D182787
2023-07-13 15:44:03 +00:00
Jan Varga 29600e3ad5 Bug 1840770 - Move PQuotaParent implementation to separate source files; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D182307
2023-07-13 09:57:18 +00:00
Kagami Sascha Rosylight b65d4356c8 Bug 1842825 - Split new Observer() outside of ipc::UtilityProcessManager r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D183260
2023-07-12 13:44:32 +00:00
serge-sans-paille 34f4a08400 Bug 1841085 - Aggregate scalar reading code in ipc pickling r=handyman,jld
Differential Revision: https://phabricator.services.mozilla.com/D182472
2023-07-06 07:20:23 +00:00
Kagami Sascha Rosylight b46a392d48 Bug 1798493 - Part 1: Use nsIPrincipal instead of ContentPrincipalInfo for PLockManager r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D163337
2023-06-28 20:48:14 +00:00
Nika Layzell 4e0633ce16 Bug 1838906 - Part 4: Don't require a listener in IPC::Channel until Connect, r=ipc-reviewers,jld
Depends on D181803

Differential Revision: https://phabricator.services.mozilla.com/D182225
2023-06-27 19:59:47 +00:00
Nika Layzell 1a1cb945e4 Bug 1838906 - Part 3: Clean up ConnectNamedPipe logic, r=ipc-reviewers,jld
This call is no longer required after the other changes in part 1 and 2,
and adds substantial complexity to the type. This just removes all of
the ConnectNamedPipe handling logic from ipc_channel_win now that it is
unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D181803
2023-06-27 19:59:47 +00:00
Nika Layzell 4a72a442c0 Bug 1838906 - Part 2: Simplify the types for IPC::Channel::Listener, r=ipc-reviewers,necko-reviewers,kershaw,jld
Now that we've simplified the startup process somewhat, it is easier to clean
up IPC channel creation for NodeChannel connections. This stops having
GeckoChildProcessHost inherit from IPC::Channel::Listener, as it would never
receive most of the relevant callbacks, and instead implements the one callback
it would receive directly as a method on that type.

Differential Revision: https://phabricator.services.mozilla.com/D181282
2023-06-27 19:59:47 +00:00
Nika Layzell 18d0bf2094 Bug 1838906 - Part 1: Inherit the initial process pipe on Windows, r=bobowen,ipc-reviewers,jld
This allows simplifying how IPC::Channel is created and passed between
processes, as all platforms now inherit the initial handle/fd into the content
process in a similar way. To keep things simple for now, I've continued to use
the base::CommandLine class to pass the HANDLE's identity on Windows, however
we may want to change this to make it a bit easier to follow, perhaps treating
it more like how we handle the IPC fd on Android.

Differential Revision: https://phabricator.services.mozilla.com/D181281
2023-06-27 19:59:46 +00:00
sotaro 50ab537300 Bug 1839314 - Force sync IPC if there are many flushed cmds without calling ClientWebGLContext::GetFrontBuffer() r=ipc-reviewers,nika,gfx-reviewers,lsalzman
There were cases that a lot of cmds messages were sent by WebGLChild::FlushPendingCmds() without calling ClientWebGLContext::GetFrontBuffer(). And the IPC messages were waiting to be handled by WebGLParent, since OpenGL handling could take longer. Then there were cases that pending IPC messages were accumulated and it caused out of file descriptor on Linux. The sync IPC could reduce the pending IPC messages if there are a lot of cmds flashes.

async Ping is used for checking if IPC message is congested at WebGLParent. If a count of flushes since last congestion check reaches maybeIPCMessageCongestion, we think that IPC message is congested at WebGLParent. Then send sync SyncPing message to flush pending IPC messages.

Differential Revision: https://phabricator.services.mozilla.com/D181484
2023-06-27 18:23:41 +00:00