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

7821 Коммитов

Автор SHA1 Сообщение Дата
Joel Maher 99abb50b8d Bug 1853245 - Migrate .ini manifests to .toml (Batch 7.25). r=aryx,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D189221
2023-09-26 17:40:01 +00:00
Paul Bone 0974c51617 Bug 1850887 - Remove GC_WAIT_FOR_IDLE_* telemetry r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D189081
2023-09-26 01:39:58 +00:00
Chris Peterson 221ae0ef66 Bug 1854881 - Fix non-unified build error in ipc/glue/ProtocolUtils.cpp. r=jstutte,andi
ipc/glue/ProtocolUtils.cpp:84:20: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return IPCResult(false);

This error is a regression from bug 1778860.

Differential Revision: https://phabricator.services.mozilla.com/D189082
2023-09-26 00:41:29 +00:00
Landry Breuil b56f46c4ab Bug 1854775: fix build on *BSD after bug 1851095 r=jld
Differential Revision: https://phabricator.services.mozilla.com/D189112
2023-09-25 23:46:48 +00:00
Jed Davis df9fa90f41 Bug 1851095 - Step 2: Connect setproctitle to the fork server. r=nika
This adds a small function that concatenates the args (because not
only does the BSD `setproctitle` take a single string, but also the
Linux kernel code that implements `/proc/{pid}/cmdline` won't allow the
"arguments" to extend past their original length unless it's a single
string), and connects it to the fork server.

Differential Revision: https://phabricator.services.mozilla.com/D187635
2023-09-22 03:41:39 +00:00
Jed Davis c48e55cb24 Bug 1851095 - Step 1: Modify process_title_linux to work in our context, and build it. r=nika,glandium
The major changes:

* Instead of importing `base::ReadFileToString`, which is used only to
  determine if a `/proc` pseudo-file contains more than a certain number
  of characters, we simply `read` enough to determine that information.

* Instead of importing `base::NoDestructor` and wrapping it around STL
  containers, we simply `strdup` the strings we need to copy out of
  the initial arg/env area.  (In theory this could set off LSan if the
  copied string later becomes unreachable, but in practice that doesn't
  seem to happen, and it's easily fixable if that changes.)

* Chromium copies only the environment strings and allows the argv
  strings to be overwritten; this may be safe for how they access the
  command line arguments but it may not be for us, so this patch changes
  it to copy all of the strings.

Differential Revision: https://phabricator.services.mozilla.com/D187634
2023-09-22 03:41:39 +00:00
Jed Davis 6bd46092cc Bug 1851095 - Step 0: Import `set_process_title_linux.cc` from Chromium. r=nika
This is `content/common/set_process_title_linux.cc` from Chromium git
revision 5df26a3c960c011f068cea1fa9bc5866aaaa8aa2.  This patch includes
only the file and doesn't attempt to build it or modify it to work with
our codebase; future patches will do that.

`about:license` already includes `ipc/chromium/` as a location that may
include code covered by the Chromium license, so this shouldn't need any
additional license acknowledgements.

Differential Revision: https://phabricator.services.mozilla.com/D187633
2023-09-22 03:41:38 +00:00
Lee Salzman f793972d4c Bug 1553691 - Implement CrossProcessSemaphore on macOS using Mach semaphores. r=nika
Unnamed POSIX semaphores are not supported on macOS, nor is timed wait supported on
named POSIX semaphores. SysV semaphores have similar limitations.

Mach semaphores are one of the only clean ways to create unnamed, shareable semaphores
on macOS. As of bug 1734735, we now can transparently send the mach ports across to
other processes without much added code, overall making this implementation of Mach
semaphores fairly easy.

Differential Revision: https://phabricator.services.mozilla.com/D188429
2023-09-19 21:16:46 +00:00
Alexandre Lissy 67cbfc151a Bug 1853627 - Preload ole32.dll only on NS_FREE_PERMANENT_DATA r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D188608
2023-09-19 16:18:58 +00:00
Iulian Moraru 87c1675542 Backed out 10 changesets (bug 1837079) for causing build bustages on UtilityProcessManager.cpp. CLOSED TREE
Backed out changeset b36fd9deb165 (bug 1837079)
Backed out changeset 0253a50d16a9 (bug 1837079)
Backed out changeset 799ea189e748 (bug 1837079)
Backed out changeset 70eab0533b00 (bug 1837079)
Backed out changeset 488707a84723 (bug 1837079)
Backed out changeset d56484304ec3 (bug 1837079)
Backed out changeset 36d3afd881b4 (bug 1837079)
Backed out changeset 3f2fd4d7a511 (bug 1837079)
Backed out changeset 078b848cd09e (bug 1837079)
Backed out changeset 64390c163748 (bug 1837079)
2023-09-15 22:17:21 +03:00
Ray Kraesig 8dfb30cd32 Bug 1837079 - [8/10] Implement file-dialog utility-process-crash tests r=handyman,ipc-reviewers,mstange,gerard-majax,nika,profiler-reviewers
Implement a mochitest confirming the stability of Firefox when the
file-picker crashes (patterned loosely off the existing geolocation
crash tests).

Differential Revision: https://phabricator.services.mozilla.com/D184723
2023-09-15 18:10:01 +00:00
Ray Kraesig 647025e296 Bug 1837079 - [7/10] Open Windows file picker out-of-process r=gstoll,handyman,ipc-reviewers,nika
When opening a new Windows file dialog, open it out-of-process if
possible. Fall back to opening it in-process if that fails. (This
behavior is configurable with a pref.)

Differential Revision: https://phabricator.services.mozilla.com/D180343
2023-09-15 18:10:01 +00:00
Ray Kraesig 5631927f07 Bug 1837079 - [6/10] Properly destroy actors and utility processes r=ipc-reviewers,nika
The IPC subsystem effectively owns IPC actors, and requires an explicit
call to `Close()` to destroy a toplevel actor: releasing the last RefPtr
doesn't cut it. Similarly, the UtilityProcessManager owns the utility
processes it creates, and one must explicitly call `DestroyProcess()`.

Handle both of these lifetime issues by using a custom meta-RefPtr for
WinFileDialogParent which will close the actor and kill the process upon
its final `Release()`.

Differential Revision: https://phabricator.services.mozilla.com/D180345
2023-09-15 18:10:01 +00:00
Ray Kraesig 2e9d3b7548 Bug 1837079 - [5/10] Create WinFileDialog IPDL protocol and implementation r=gstoll,handyman,ipc-reviewers,nika
Create and implement a new top-level IPC protocol, `PWinFileDialog`,
using the primitives from bug 1833450 and the new sandboxing type from
the previous commit.

Again, this commit does not actually create any instances of the new
protocol; that will come in a later commit in this patchset.

Differential Revision: https://phabricator.services.mozilla.com/D180342
2023-09-15 18:10:01 +00:00
Ray Kraesig 17f411796e Bug 1837079 - [4/10] Create WINDOWS_FILE_DIALOG utility process type r=gerard-majax,ipc-reviewers,fluent-reviewers,bobowen,handyman,nika
Create a new utility-process type for the sole use of out-of-process
instantiation of the Windows file dialog.

We do not sandbox this process type, as in certain test environments
sandboxing has been found to prevent the child process from interacting
with any other windows on the desktop -- including the parent process
window which it will need to assign as the parent of the file dialog.

Technically, no functional changes, as this commit adds no uses of this
type. (That will come later in the patchset.)

Differential Revision: https://phabricator.services.mozilla.com/D180341
2023-09-15 18:10:00 +00:00
Nika Layzell ee8d9f9c70 Bug 1852082 - Part 2: Avoid fallible operations during DataPipe serialization, r=ipc-reviewers,mccr8
Before this change, the shared memory region handle was stored in a
shared object, meaning that it needed to be cloned when serializing to
create an owned copy of the handle to serialize over IPC. As cloning a
file descriptor or HANDLE is fallible, this meant that serializing a
DataPipe could crash if file descriptors were exhausted.

This change pre-clones the file descriptors and closes the original
descriptor at creation, removing that fallible operation from DataPipe
serialization.

Differential Revision: https://phabricator.services.mozilla.com/D187683
2023-09-15 15:26:51 +00:00
Nika Layzell d3bbcb77cb Bug 1852082 - Part 1: Allow stealing ownership of the shared memory handle from SharedMemoryBasic, r=ipc-reviewers,mccr8
This is not the ideal form of this API, but avoids unnecessary handle
cloning and the corresponding fallible calls in some situations. In the
future we still want to do something more like bug 1797039, which will
provide a proper separation of handles from mappings for shared memory
regions.

Differential Revision: https://phabricator.services.mozilla.com/D187682
2023-09-15 15:26:50 +00:00
Masatoshi Kimura 0a7dc6a618 Bug 1852806 - Remove macros for older Windows SDK from ipc/. r=handyman,mccr8,ipc-reviewers
Depends on D188024

Differential Revision: https://phabricator.services.mozilla.com/D188025
2023-09-15 03:19:27 +00:00
Cosmin Sabou f8c16a8f94 Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_power_telemetry.html. CLOSED TREE
Backed out changeset faea1f4cb9a9 (bug 1852806)
Backed out changeset 4db93c374f9b (bug 1852806)
Backed out changeset 7e40e0e04921 (bug 1852806)
Backed out changeset b0a66c4269ce (bug 1852806)
Backed out changeset 4ff3545936f9 (bug 1852806)
Backed out changeset 02c0a8eb3fd6 (bug 1852806)
Backed out changeset ae2c7b33acfb (bug 1852806)
Backed out changeset 2b89ba254a1a (bug 1852806)
Backed out changeset dfa4f73fc548 (bug 1852806)
Backed out changeset daffcc4c1877 (bug 1852806)
Backed out changeset 33855bcdf15e (bug 1852806)
Backed out changeset 694f29707f3e (bug 1852806)
Backed out changeset 1891eda22a59 (bug 1852806)
Backed out changeset 1b854941389c (bug 1852806)
Backed out changeset 2f7cfe04be59 (bug 1852806)
2023-09-15 09:48:27 +03:00
Masatoshi Kimura de1f5d602e Bug 1852806 - Remove macros for older Windows SDK from ipc/. r=handyman,mccr8,ipc-reviewers
Depends on D188024

Differential Revision: https://phabricator.services.mozilla.com/D188025
2023-09-15 03:19:27 +00:00
Jed Davis 49d5ee8a3a Bug 1851271 - Avoid leaking the omnijar in the fork server. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D187528
2023-09-14 20:47:37 +00:00
az fa4078ca78 Bug 1809570 - Part 2 - Request and process per-codec SW/HW decode support for Android PDMs using JNI calls r=jolin
Depends on D166238

Differential Revision: https://phabricator.services.mozilla.com/D166240
2023-09-08 21:49:43 +00:00
Jed Davis 0f78858199 Bug 1805788 - Use the fork server for all (non-forkserver) child processes if enabled. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D187332
2023-09-07 18:57:05 +00:00
Emilio Cobos Álvarez 0cfa3eed35 Bug 1851465 - Remove dead code in message_pump_glib. r=nika,ipc-reviewers
This was added for plugins in bug 544882 and has been dead code for a
while.

Differential Revision: https://phabricator.services.mozilla.com/D187381
2023-09-07 16:59:30 +00:00
Masatoshi Kimura dd444d46f2 Bug 1849927 - Fix MinGW build errors. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D186837
2023-09-06 21:25:09 +00:00
Logan Rosen f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Otto Länd f15bc097df Bug 1850865: apply code formatting via Lando
# ignore-this-changeset
2023-09-05 18:12:20 +00:00
Jim Blandy ead739b02b Bug 1850865: Add helpers for stringifying protocol sides. r=ipc-reviewers,nika
Depends on D187167

Differential Revision: https://phabricator.services.mozilla.com/D187213
2023-09-05 18:09:30 +00:00
Jim Blandy 7262779e1f Bug 1850865: Improve MOZ_IPC_MESSAGE_LOG. r=ipc-reviewers,nika
Use MOZ_IPC_MESSAGE_LOG to filter GOODBYE_MESSAGE_TYPE messages.

Interpret MOZ_IPC_MESSAGE_LOG elements without the "Child" or "Parent"
suffix as a request to log both sides of the given protocol.

Differential Revision: https://phabricator.services.mozilla.com/D187167
2023-09-05 18:09:30 +00:00
Alexandre Lissy 6d7aed1a40 Bug 1850904 - Expand media.allow-audio-non-utility to early beta r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D187174
2023-09-05 11:27:50 +00:00
Mike Hommey 9331b9fb07 Bug 1851529 - Set clang-format ColumnLimit consistently. r=sylvestre,necko-reviewers,kershaw
For some reason, its value in the Google style we use is 80... except
for Objective-C, where it's 100, which led to things like:
https://hg.mozilla.org/mozilla-central/rev/31bf68247e6e
https://hg.mozilla.org/mozilla-central/rev/64ceb33533a4.

There's probably a discussion to have about whether 80 is the right
limit, but since it's what's used for everything except ObjC, let's roll
with it.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D187409
2023-09-05 11:23:01 +00:00
Butkovits Atila 4a1506d653 Backed out changeset 1f709b0dc718 (bug 1850904) for causing Bug 1851299. CLOSED TREE 2023-09-02 15:51:32 +03:00
Alexandre Lissy df1a55c759 Bug 1850904 - Expand media.allow-audio-non-utility to early beta r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D187174
2023-09-01 10:47:38 +00:00
Sandor Molnar 2828231d57 Backed out changeset bbe68f1bb46f (bug 1850904) for causing lint failures in ipc/glue/test/browser/browser_utility_audio_locked.js CLOSED TREE 2023-09-01 12:03:01 +03:00
Alexandre Lissy 7fef0fa64d Bug 1850904 - Expand media.allow-audio-non-utility to early beta r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D187174
2023-09-01 08:31:43 +00:00
Kershaw Chang 08e047c5e7 Bug 1758155 - Allow empty top-level IPC protocol, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D187060
2023-08-31 11:45:05 +00:00
Kershaw Chang 50d42b6dc3 Bug 1758155 - PBackground clenup, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D185032
2023-08-31 11:45:05 +00:00
Kershaw Chang da7bf5ad67 Bug 1758155 - Make PWebSocketConnection a toplevel actor, r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D185031
2023-08-31 11:45:04 +00:00
Kershaw Chang bda80165c9 Bug 1758155 - Remove some PSM actos from PBackground, r=keeler,nika,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D182996
2023-08-31 11:45:04 +00:00
Kershaw Chang a3445b4bca Bug 1758155 - Make PMediaTransport and PBackgroundDataBridge toplevel actors, r=nika,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D182995
2023-08-31 11:45:04 +00:00
Alexandre Lissy ded1182e37 Bug 1845666 - Lock the media.utility-* prefs r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D184734
2023-08-31 10:56:55 +00:00
Cosmin Sabou c321c3ae21 Backed out changeset b31464975bb4 (bug 1845666) for causing media.utility related bc failures. CLOSED TREE 2023-08-31 11:23:35 +03:00
Alexandre Lissy e75a23ba94 Bug 1845666 - Lock the media.utility-* prefs r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D184734
2023-08-31 06:55:22 +00:00
Dana Keeler 101100dc72 Bug 1401466 - make the client auth certificate selection dialog tab modal r=jschanck,necko-reviewers,bolsson,kershaw,valentin
Previously, the client authentication certificate selection dialog could show
up unexpectedly. Because it was modal, it would prevent user interaction with
the browser. It could even get in a state where the dialog couldn't be
interacted with, and neither could anything else, so the entire browser would
be locked and the user would have to quit and restart.

This patch associates a top-level outer content window ID (called "browserId"
in networking code) with each NSSSocketControl. When a peer asks for a client
authentication certificate, the NSSSocketControl can use the ID to find the
relevant tab and open a tab-modal dialog, which allows other browser UI to be
interacted with.

Some loads cannot be associated with browser tabs, and so the implementation
falls back to opening a window-modal dialog on the most recently active window.
This is still better than the previous implementation, since the dialog is
connected to a window rather than being its own separate dialog.

Differential Revision: https://phabricator.services.mozilla.com/D183775
2023-08-30 03:05:35 +00:00
Cosmin Sabou 29d8a2cb52 Backed out changeset 16c71fac6426 (bug 1401466) for causing SocketControl related fuzzing build bustages. CLOSED TREE 2023-08-30 00:37:21 +03:00
Dana Keeler 8ee5ec3bbb Bug 1401466 - make the client auth certificate selection dialog tab modal r=jschanck,necko-reviewers,bolsson,kershaw,valentin
Previously, the client authentication certificate selection dialog could show
up unexpectedly. Because it was modal, it would prevent user interaction with
the browser. It could even get in a state where the dialog couldn't be
interacted with, and neither could anything else, so the entire browser would
be locked and the user would have to quit and restart.

This patch associates a top-level outer content window ID (called "browserId"
in networking code) with each NSSSocketControl. When a peer asks for a client
authentication certificate, the NSSSocketControl can use the ID to find the
relevant tab and open a tab-modal dialog, which allows other browser UI to be
interacted with.

Some loads cannot be associated with browser tabs, and so the implementation
falls back to opening a window-modal dialog on the most recently active window.
This is still better than the previous implementation, since the dialog is
connected to a window rather than being its own separate dialog.

Differential Revision: https://phabricator.services.mozilla.com/D183775
2023-08-29 20:47:45 +00:00
Jens Stutte 806b8e59f7 Bug 1778860 - Use the where and why message when crashing on IPC_FAIL in DEBUG. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D186621
2023-08-23 10:30:02 +00:00
Cristian Tuns bc5116b463 Backed out 4 changesets (bug 1758155) for causing build bustages in NetworkConnectivityService.cpp CLOSED TREE
Backed out changeset bec8e6762e2a (bug 1758155)
Backed out changeset 230add1b5bb5 (bug 1758155)
Backed out changeset 4bc26c75c26a (bug 1758155)
Backed out changeset 7b628b437e19 (bug 1758155)
2023-08-16 10:32:03 -04:00
Kershaw Chang e247e6006d Bug 1758155 - PBackground clenup, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D185032
2023-08-16 13:13:31 +00:00
Kershaw Chang 37b27a28d1 Bug 1758155 - Make PWebSocketConnection a toplevel actor, r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D185031
2023-08-16 13:13:31 +00:00