8219 Commits

Author SHA1 Message Date
Sylvestre Ledru
45030f6970 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Nika Layzell
1ee5073e80 Bug 1907412 - Stop using AlignedStorage in IPDL unions, r=ipc-reviewers,mccr8
In more recent versions of C++, it is possible to declare a C union with
non-POD members, so long as there is an explicit destructor/constructor
responsible for managing the members.

This patch switches to using the variant types directly within the
union, rather than using AlignedStorage to store inline members. This
requires some tweaks to how the union is declared (specifically, it must
be an anonymous inline union so that it shares the main union type's
constructor/destructor, otherwise explicit ctors/dtors would need to be
declared for the bare union type).

Overall, this change should make no functional difference.

Differential Revision: https://phabricator.services.mozilla.com/D216329
2024-07-15 21:33:37 +00:00
Ray Kraesig
5f27dd7061 Bug 1907454 - [1/1] Send ActorDestroyReason up into telemetry r=ipc-reviewers,nika
File-picker telemetry shows that most failures to open the file dialog
remotely arise in `UtilityProcessHost::OnChannelClosed`. This ultimately
derives from `IProtocol::ActorDisconnected()`, which is called from many
points, mostly generated code.

Rather than jumping in and writing error-propagation code all the way
back up the stack, send what little information we can easily access up
to the file-picker failure telemetry; this should narrow down what
portion of the code we need to look at to determine the root cause of
these failures.

Differential Revision: https://phabricator.services.mozilla.com/D216350
2024-07-15 18:43:14 +00:00
Ray Kraesig
491e97395e Bug 1884426 - [4/6] Add test for file-picker crash notification r=Gijs,firefox-desktop-core-reviewers
Test that the file-picker-crashed notification appears when the
file-picker utility process is terminated with a file-picker dialog
active.

Differential Revision: https://phabricator.services.mozilla.com/D215980
2024-07-09 22:16:56 +00:00
Joel Maher
3d4dfe804d Bug 1903845 - Add 'os_integration' tags to test manifests for faster image verification. r=aryx,jgilbert,settings-reviewers,media-playback-reviewers,sessionstore-reviewers,places-reviewers,omc-reviewers,migration-reviewers,padenot,dao,aminomancer,Standard8,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214969
2024-07-09 13:01:55 +00:00
Greg Stoll
6ba11a66b8 Bug 1901197: do synchronous Content Analysis for clipboard operations on a background thread r=dlp-reviewers,ipc-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D215457
2024-07-04 01:24:53 +00:00
Sandor Molnar
3f11cda5a4 Backed out 5 changesets (bug 1672493) for causing serviceworker related perma failures. CLOSED TREE
Backed out changeset a38e64bdda2c (bug 1672493)
Backed out changeset b4e568bfb9c7 (bug 1672493)
Backed out changeset 4f1ee5c1e441 (bug 1672493)
Backed out changeset e05276c441ef (bug 1672493)
Backed out changeset e80cf5cf2fe5 (bug 1672493)
2024-06-27 13:02:33 +03:00
Eden Chuang
b941609cc4 Bug 1672493 - P1 Let PRemoteWorkerService manage PRemoteWorker. r=asuth
Currently, PRemoteWorker is managed by PBackground, which should be the same as the manager of the corresponding PRemoteWorkerService. Since the PBackground is gotten from PRemoteWorkerService.

This patch makes PRemoteWorkerService directly manage the PRemoteWorker.

PRemoteWorker will handle the life-cycle-related operations of RemoteWorkers, it might be renamed in the following patches.

Differential Revision: https://phabricator.services.mozilla.com/D196946
2024-06-27 09:07:40 +00:00
Jan-Niklas Jaeschke
091c1ba3aa Bug 1888756, part 3 - Text Fragments: Preserve information if a load is a same-document load in nsILoadInfo. r=farre,dom-core,necko-reviewers,kershaw,peterv
This commit is a prerequisite for part 5 of this patch set.

There is no changed behavior in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D212818
2024-06-26 14:24:32 +00:00
Jan-Niklas Jaeschke
0221e167ca Bug 1888756, part 1 - Text Fragments: Introduce textDirectiveUserActivation flag. r=edgar,dom-core
This commit is a prerequisite for part 5 of this patch set
and introduces the `text directive user activation` flag
as well as the necessary boilerplate to transport the value
through process boundaries in `nsDocShellLoadState` and `LoadInfo`.

There is no changed behavior in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D212816
2024-06-26 14:24:31 +00:00
Nika Layzell
933bd0ea88 Bug 1901851 - Part 3: Make PRemoteWorkerService a toplevel actor which manages PRemoteWorker, r=dom-worker-reviewers,asuth
This enables the PRemoteWorkerService to be created by the parent process
instead of by the content process, which is useful as the parent process is the
party initiating remote worker actions.

Differential Revision: https://phabricator.services.mozilla.com/D213333
2024-06-24 23:19:26 +00:00
Nika Layzell
c04b7872be Bug 1901851 - Part 1: Add BackgroundParent::GetBackgroundThread, r=dom-worker-reviewers,ipc-reviewers,asuth,mccr8
Previously the identity of the BackgroundParent thread was hidden to encourage
all communication with that thread, including communication within the parent
process, to go over PBackground. This has not born out as effective in
practice, however.

By exposing the thread's identity through a getter available on the background
or main thread, we can simplify the process of dispatching a runnable to the
background thread. This will be useful later in this bug as some actors are
migrated off of PBackground, but still need to run on that thread.

Differential Revision: https://phabricator.services.mozilla.com/D213311
2024-06-24 23:19:26 +00:00
Christoph Kerschbaumer
811a0a736d Bug 1883954: Update, improve and unify HTTPS Telemetry, r=freddyb,kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D212661
2024-06-24 12:56:31 +00:00
Tom Schuster
6613ec7689 Bug 1904004 - Use OriginAttributes::IsPrivateBrowsing instead of open coding PBM checks. r=timhuang,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,necko-reviewers,kershaw,dom-storage-reviewers,janv,canaltinova,dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D214532
2024-06-24 11:06:18 +00:00
Aron Cseh
a18d79db16 Backed out 9 changesets (bug 1901851, bug 1728331) for causing remote worker crashes. a=backout
Backed out changeset 30bbda0eb197 (bug 1728331)
Backed out changeset dabd7d6836c8 (bug 1728331)
Backed out changeset 9e04f49c926e (bug 1728331)
Backed out changeset 779ac735736c (bug 1728331)
Backed out changeset 1d413fe340a0 (bug 1728331)
Backed out changeset 15608efcbeb6 (bug 1901851)
Backed out changeset f711bbec11b2 (bug 1901851)
Backed out changeset 8bb1d267d08f (bug 1901851)
Backed out changeset b29282956a04 (bug 1901851)
2024-06-22 00:52:24 +03:00
Sebastian Hengst
7f7ea528f7 Backed out 7 changesets (bug 1888756) for potentially causing Session History crashes. a=backout
Backed out changeset 85022f2e4129 (bug 1888756)
Backed out changeset 1458ad53d229 (bug 1888756)
Backed out changeset a84d886d8753 (bug 1888756)
Backed out changeset efff3e5e95c2 (bug 1888756)
Backed out changeset 400a8ff57ae4 (bug 1888756)
Backed out changeset 04180e2fb99d (bug 1888756)
Backed out changeset 0eb8b13b0717 (bug 1888756)
2024-06-21 12:08:58 +02:00
Nika Layzell
b129c759f4 Bug 1901851 - Part 3: Make PRemoteWorkerService a toplevel actor which manages PRemoteWorker, r=dom-worker-reviewers,asuth
This enables the PRemoteWorkerService to be created by the parent process
instead of by the content process, which is useful as the parent process is the
party initiating remote worker actions.

Differential Revision: https://phabricator.services.mozilla.com/D213333
2024-06-20 19:24:49 +00:00
Nika Layzell
90885afac2 Bug 1901851 - Part 1: Add BackgroundParent::GetBackgroundThread, r=dom-worker-reviewers,ipc-reviewers,asuth,mccr8
Previously the identity of the BackgroundParent thread was hidden to encourage
all communication with that thread, including communication within the parent
process, to go over PBackground. This has not born out as effective in
practice, however.

By exposing the thread's identity through a getter available on the background
or main thread, we can simplify the process of dispatching a runnable to the
background thread. This will be useful later in this bug as some actors are
migrated off of PBackground, but still need to run on that thread.

Differential Revision: https://phabricator.services.mozilla.com/D213311
2024-06-20 19:24:48 +00:00
Andreas Farre
02ca49e84a Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-06-20 13:22:41 +00:00
Jan-Niklas Jaeschke
bf4be2e041 Bug 1888756, part 1 - Text Fragments: Introduce textDirectiveUserActivation flag. r=edgar,dom-core
This commit is a prerequisite for part 5 of this patch set
and introduces the `text directive user activation` flag
as well as the necessary boilerplate to transport the value
through process boundaries in `nsDocShellLoadState` and `LoadInfo`.

There is no changed behavior in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D212816
2024-06-20 10:24:25 +00:00
Stanca Serban
92d2016aa1 Backed out 2 changesets (bug 1883954) for causing mochitests failures in browser_schemeless.js. CLOSED TREE
Backed out changeset 790cb078bb3b (bug 1883954)
Backed out changeset 6d1d98d0e69c (bug 1883954)
2024-06-20 12:23:53 +03:00
Christoph Kerschbaumer
5d2889b7ba Bug 1883954: Update, improve and unify HTTPS Telemetry, r=freddyb,kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D212661
2024-06-20 07:12:47 +00:00
Cristian Tuns
535119812a Backed out 8 changesets (bug 1901851, bug 1728331) for causing bc failures in browser_docshell_type_editor.js CLOSED TREE
Backed out changeset 2cf5cad90099 (bug 1728331)
Backed out changeset d920c2d72d00 (bug 1728331)
Backed out changeset 9e5bd0186aa6 (bug 1728331)
Backed out changeset 45735575df21 (bug 1728331)
Backed out changeset fbafea1663e3 (bug 1901851)
Backed out changeset 30bdf88d3bb7 (bug 1901851)
Backed out changeset 1d994915bd71 (bug 1901851)
Backed out changeset 0b3249432b9c (bug 1901851)
2024-06-19 20:51:53 -04:00
Nika Layzell
8bae7896ac Bug 1901851 - Part 3: Make PRemoteWorkerService a toplevel actor which manages PRemoteWorker, r=dom-worker-reviewers,asuth
This enables the PRemoteWorkerService to be created by the parent process
instead of by the content process, which is useful as the parent process is the
party initiating remote worker actions.

Differential Revision: https://phabricator.services.mozilla.com/D213333
2024-06-19 20:14:48 +00:00
Nika Layzell
165ac4fbf2 Bug 1901851 - Part 1: Add BackgroundParent::GetBackgroundThread, r=dom-worker-reviewers,ipc-reviewers,asuth,mccr8
Previously the identity of the BackgroundParent thread was hidden to encourage
all communication with that thread, including communication within the parent
process, to go over PBackground. This has not born out as effective in
practice, however.

By exposing the thread's identity through a getter available on the background
or main thread, we can simplify the process of dispatching a runnable to the
background thread. This will be useful later in this bug as some actors are
migrated off of PBackground, but still need to run on that thread.

Differential Revision: https://phabricator.services.mozilla.com/D213311
2024-06-19 20:14:47 +00:00
Bob Owen
caa2cde4ba Bug 1901554 p1: Call CoTaskMemFree directly from combase.dll for MFTEncoder. r=padenot
This prevents us from having to preload ole32.dll and all of its associated
dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D213256
2024-06-14 10:39:55 +00:00
Alexandre Lissy
36d4a7d5b2 Bug 1884378 - SandboxProfiler integration within processes r=padenot,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D213216
2024-06-14 10:17:38 +00:00
Christian Holler (:decoder)
e0ae53527b Bug 1896638 - Export some IPDL information as JSON. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D210326
2024-06-07 10:22:48 +00:00
Gregory Pappas
cbbb4fb827 Bug 1900879 - part 1: Remove unused MessageChannel::SpinInternalEventLoop r=ipc-reviewers,nika
It's not used since bug 1751047

Differential Revision: https://phabricator.services.mozilla.com/D212742
2024-06-06 20:19:19 +00:00
Jed Davis
68fdfb66c4 Bug 1837550 - Re-enable tests. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D212643
2024-06-06 02:15:18 +00:00
Jed Davis
e2a4fdb72f Bug 1837550 - Clean up control flow in WaitableEvent. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D212642
2024-06-06 02:15:18 +00:00
Dana Keeler
777066906a Bug 1900132 - streamline PVerifySSLServerCert protocol r=jschanck
Previously the PVerifySSLServerCert protocol consisted of two functions: one to
call when certificate verification succeeded, and another to call upon failure.
This was unnecessary, as the code before and after this protocol didn't have
the same split. This patch unifies the protocol to better match the surrounding
code. It also takes the opportunity to make use of some IPC helpers to
serialize enums rather than manually casting to and from basic integer types.

Differential Revision: https://phabricator.services.mozilla.com/D212594
2024-06-05 23:58:02 +00:00
Otto Länd
ee23dcd890 Bug 1884221, 1895375: apply code formatting via Lando
# ignore-this-changeset
2024-05-30 18:30:24 +00:00
Ray Kraesig
fce1a86177 Bug 1895375 - [4/4] Propagate ipc::LaunchErrors to callers r=ipc-reviewers,nika
* Adjust UtilityProcess{Host,Manager} to propagate ipc::LaunchErrors for
  their clients, or to create new ones where none previously existed.

* Adjust the various clients of the above to to handle the additional
  information -- mostly by adding the additional failure-location data
  to log messages.

* Fix an unrelated bug wherein the return type of `LaunchProcess` was
  declared as exclusive, despite being cached and reused.

In particular, filedialog::Error objects should now contain -- and report
to telemetry without further adjustment -- the actual error code from
`ipc::LaunchError`s.

(Reporting the original failure location as well will occur in bug
1884221.)

Differential Revision: https://phabricator.services.mozilla.com/D209715
2024-05-30 17:52:09 +00:00
Ray Kraesig
f6411a2366 Bug 1895375 - [1/4] Adjust types associated with ipc::LaunchError r=ipc-reviewers,win-reviewers,gstoll,nika
As the intended use for LaunchError::mFunction is telemetry, avoid the
possibility of accidental exfiltration of PII by requiring that
LaunchError be constructed from `StaticString`.

Additionally, remove the Windows-specific constructor overloads in favor
of an explicit factory function, and explicitly document that `mError`
is a generic bag of bits rather than any kind of strict error type.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D209712
2024-05-30 17:52:07 +00:00
alwu
6a5f6b7c2a Bug 1898588 - part5 : remove encryption scheme per key system. r=jolin
As we've added encryption scheme per content type in previous patches,
there is no need to keep this old encryption scheme.

Differential Revision: https://phabricator.services.mozilla.com/D211793
2024-05-29 18:27:04 +00:00
alwu
01ff3ac17a Bug 1898588 - part2 : remove duplicated method 'EncryptionSchemeStr'. r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D211643
2024-05-29 18:27:03 +00:00
alwu
7560a3726d Bug 1898588 - part1 : add encryptionSchemes in MFCDMMediaCapability in order to support scheme per type r=jolin
Currently our implementation is the scheme support per key system,
not per content type. As each content type can have different supported
scheme, eg. type A only supports cenc, but type B only supports cbcs,
only having scheme per key system can't return a precise result.

Differential Revision: https://phabricator.services.mozilla.com/D211642
2024-05-29 18:27:03 +00:00
Narcis Beleuzu
0cf79ef540 Backed out 5 changesets (bug 1898588) for bustages on MediaData.cpp . CLOSED TREE
Backed out changeset d23ba62a5165 (bug 1898588)
Backed out changeset dd7a777b034f (bug 1898588)
Backed out changeset 62c4a3361e00 (bug 1898588)
Backed out changeset 2643cfcd1ba7 (bug 1898588)
Backed out changeset 940fca861f93 (bug 1898588)
2024-05-29 02:15:25 +03:00
alwu
a865b4d648 Bug 1898588 - part5 : remove encryption scheme per key system. r=jolin
As we've added encryption scheme per content type in previous patches,
there is no need to keep this old encryption scheme.

Differential Revision: https://phabricator.services.mozilla.com/D211793
2024-05-28 21:10:39 +00:00
alwu
e794fecb4e Bug 1898588 - part2 : remove duplicated method 'EncryptionSchemeStr'. r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D211643
2024-05-28 21:10:38 +00:00
alwu
8f5cfaebbf Bug 1898588 - part1 : add encryptionSchemes in MFCDMMediaCapability in order to support scheme per type r=jolin
Currently our implementation is the scheme support per key system,
not per content type. As each content type can have different supported
scheme, eg. type A only supports cenc, but type B only supports cbcs,
only having scheme per key system can't return a precise result.

Differential Revision: https://phabricator.services.mozilla.com/D211642
2024-05-28 21:10:38 +00:00
Cristian Tuns
fc392b89ab Backed out changeset 9b708a1dc402 (bug 1890748) for causing bc failures in browser_permission_delegate_geo.js CLOSED TREE 2024-05-27 12:25:10 -04:00
Andreas Farre
ec8d5be38a Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-05-27 10:06:58 +00:00
Butkovits Atila
f967675ec8 Backed out changeset a710fd347db2 (bug 1890748) for causing bustages at Document.cpp. CLOSED TREE 2024-05-24 18:06:30 +03:00
Andreas Farre
031a90d97c Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-05-24 14:28:47 +00:00
Gabriele Svelto
80f0c61cf5 Bug 1896650 - Remove sequence numbers from crash reports r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D210309
2024-05-21 19:58:18 +00:00
serge-sans-paille
a1106cbc85 Bug 1883720 - (re)Move checks for socket, gethostbyname_r and demangle to moz.configure r=glandium
Actually remove the check for demangle, no supported target need that
check.

Also make library dependencies explicit instead of relying on "$LIBS".

Differential Revision: https://phabricator.services.mozilla.com/D203637
2024-05-17 07:35:09 +00:00
Nika Layzell
20ef7e892a Bug 1895358 - Part 2: Handle ManagedContainer membership more centrally, r=ipc-reviewers,mccr8
This patch adjusts ManagedContainer to have a common base class, and exposes
methods for interacting with this base class from generic code on IProtocol.
This avoids the need for some specialized methods which were previously
required in order to manipulate the managed lists which allows the ordering to
be more precisely controlled in generic actor lifecycle methods.

Differential Revision: https://phabricator.services.mozilla.com/D209855
2024-05-15 20:36:28 +00:00
Nika Layzell
4388b2bf77 Bug 1895358 - Part 1: Improve formatting of long multiline argument lists, r=ipc-reviewers,mccr8
This changes the way that StmtCode handles the pattern `$,{list}` alone on a
line, adjusting it such that each item on the list is printed onto its own
line, and then indented. This helps the formatting of large lists such as the
ones generated in part 2.

Differential Revision: https://phabricator.services.mozilla.com/D209854
2024-05-15 20:36:28 +00:00