Commit Graph

4182 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
e4ddf24147 Bug 1887719 - More consistently use UTF8String/nsCString for URLs. r=necko-reviewers,webidl,anti-tracking-reviewers,places-reviewers,jari,kershaw,janv,smaug,hsivonen
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...

This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.

Differential Revision: https://phabricator.services.mozilla.com/D205601
2024-04-04 11:49:57 +00:00
Otto Länd
68801409a8 Bug 1881636: apply code formatting via Lando
# ignore-this-changeset
2024-03-26 22:59:25 +00:00
Nika Layzell
ec4f15a4eb Bug 1881636 - Part 3: Implement IosProcessLauncher::DoLaunch. r=glandium,ipc-reviewers,jld
This uses BrowserEngineKit's ExtensionKit-based processes to start content
processes on iOS. These processes are started with an initial xpc connection,
which is then used to communicate a command line, initial file descriptors
and environment variables before invoking content_process_main.

The XPC connection is not used further after the bootstrap message, which seems
to roughly match how WebKit uses these APIs.

Differential Revision: https://phabricator.services.mozilla.com/D202525
2024-03-26 22:56:27 +00:00
Mike Hommey
1848f66b3b Bug 1881636 - Part 2 - Expose SetClientChannelFd, SetPrefsFd and SetPrefMapFd on iOS. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D205270
2024-03-26 22:56:26 +00:00
alwu
c560dfa1f4 Bug 1868482 - part3 : ensure HDCP2.2 compatible would be vaild when the flag contains 'CapabilitesFlag::NeedHDCPCheck'. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D205394
2024-03-26 01:28:30 +00:00
Cristian Tuns
0186696113 Backed out 8 changesets (bug 1883784, bug 1868482) for causing bc failures in /ipc/EnumSerializer.h CLOSED TREE
Backed out changeset 38d3d0010972 (bug 1868482)
Backed out changeset 72de2a649e60 (bug 1868482)
Backed out changeset 5849055ce485 (bug 1868482)
Backed out changeset 396b76ded255 (bug 1883784)
Backed out changeset 3974723c71be (bug 1883784)
Backed out changeset c569adae327d (bug 1883784)
Backed out changeset 8f1acf9322b9 (bug 1883784)
Backed out changeset e112d7db9cbb (bug 1883784)
2024-03-23 02:23:28 -04:00
alwu
2927836b40 Bug 1868482 - part3 : ensure HDCP2.2 compatible would be vaild when the flag contains 'CapabilitesFlag::NeedHDCPCheck'. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D205394
2024-03-23 04:22:37 +00:00
pstanciu
08b840a63f Backed out 8 changesets (bug 1868482, bug 1883784) for causing build bustages on MFCDMParent.cpp CLOSED TREE
Backed out changeset 4f65f68ee848 (bug 1868482)
Backed out changeset 44f7868b7c85 (bug 1868482)
Backed out changeset 9eebfe985d87 (bug 1868482)
Backed out changeset 583a6e5b34d4 (bug 1883784)
Backed out changeset 6a72ba930bd7 (bug 1883784)
Backed out changeset d7ec6f631e8d (bug 1883784)
Backed out changeset b5794c5f581e (bug 1883784)
Backed out changeset c5746d7c29ac (bug 1883784)
2024-03-23 04:47:38 +02:00
alwu
ede1527464 Bug 1868482 - part3 : ensure HDCP2.2 compatible would be vaild when the flag contains 'CapabilitesFlag::NeedHDCPCheck'. r=jolin
Depends on D205393

Differential Revision: https://phabricator.services.mozilla.com/D205394
2024-03-22 20:27:20 +00:00
Cosmin Sabou
04a282cb4b Backed out 2 changesets (bug 1886607) for causing build bustages on ChromeUtils.
Backed out changeset 2fa193524f2c (bug 1886607)
Backed out changeset f77ff6043d75 (bug 1886607)
2024-03-22 00:28:44 +02:00
Sandor Molnar
552c67b1b1 Bug 1886607 - Fix ios build bustages @ dom/base/ChromeUtils.cpp a=fix CLOSED TREE 2024-03-21 23:54:12 +02:00
Alex
64550316b7 Bug 1729044 - Remove ipdl support for intr r=ipc-reviewers,nika
This removes intr support and updates some stale docs as well.

It's not immediately clear what code in MessageChannel can be removed,
though I expect some things could be simplified (there's just not much
alluding to intr/rpc/urgent).

Differential Revision: https://phabricator.services.mozilla.com/D204813
2024-03-20 14:28:15 +00:00
Iulian Moraru
39646463bc Backed out changeset 8a9b63318958 (bug 1729044) for causing linux build bustages. CLOSED TREE 2024-03-19 04:58:49 +02:00
Alex
28e7b97eeb Bug 1729044 - Remove ipdl support for intr r=ipc-reviewers,nika
This removes intr support and updates some stale docs as well.

It's not immediately clear what code in MessageChannel can be removed,
though I expect some things could be simplified (there's just not much
alluding to intr/rpc/urgent).

Differential Revision: https://phabricator.services.mozilla.com/D204813
2024-03-18 17:23:26 +00:00
Mike Hommey
fe9b75aae1 Bug 1884031 - Put UTILITY_AUDIO_DECODING_APPLE_MEDIA tests behind MOZ_APPLEMEDIA. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D203848
2024-03-14 21:04:39 +00:00
alwu
973db5e9bc Bug 1884719 - part1 : init gfxVar when creating a UtilityAudioDecoderParent. r=gerard-majax
Move initializing gfxVar from creating a video bridge to the moment we
create UtilityAudioDecoderParent in order to ensure that we can always
get correct value from gfxVar.

Differential Revision: https://phabricator.services.mozilla.com/D204292
2024-03-13 17:58:03 +00:00
Alex Franchuk
e5e33524cc Bug 1751995 - Add TestOnlyIsTransactionComplete to MessageChannel r=ipc-reviewers,nika
This method (intended to be used only in tests) returns whether the current transaction stack is
complete, and is used by TestHangs to determine when to continue in the HangButReceive subtest.

Differential Revision: https://phabricator.services.mozilla.com/D203964
2024-03-13 13:10:14 +00:00
Alex Franchuk
7e6d22c7b9 Bug 1751995 - Add IPC_TEST_FAIL() and IPCResult::FailForTesting. r=ipc-reviewers,nika
The macro and function are meant to only be used in test circumstances, where we want the failure to
be returned. Normally in `DEBUG` builds the failure causes an immediate crash.

Differential Revision: https://phabricator.services.mozilla.com/D201158
2024-03-13 13:10:09 +00:00
Stanca Serban
865f99f379 Backed out 42 changesets (bug 1751995) for causing bp-nu failures in PTestDataStructuresSubChild.cpp. CLOSED TREE
Backed out changeset 5c26a10bf169 (bug 1751995)
Backed out changeset 02a074f96ccd (bug 1751995)
Backed out changeset f92cf21f54f5 (bug 1751995)
Backed out changeset e705865cf95f (bug 1751995)
Backed out changeset a3e4d1d2d709 (bug 1751995)
Backed out changeset 7384f5e7c454 (bug 1751995)
Backed out changeset d4ca13c89783 (bug 1751995)
Backed out changeset 96b164a065d4 (bug 1751995)
Backed out changeset c5a817f91355 (bug 1751995)
Backed out changeset 07dd40554527 (bug 1751995)
Backed out changeset ad9de08d7d4a (bug 1751995)
Backed out changeset 2d6b7a804db6 (bug 1751995)
Backed out changeset 52df9813a7a2 (bug 1751995)
Backed out changeset ca02c22179f1 (bug 1751995)
Backed out changeset 9543f729a08a (bug 1751995)
Backed out changeset b21677448d49 (bug 1751995)
Backed out changeset 66ca72b00da6 (bug 1751995)
Backed out changeset ece2f3b3e8b8 (bug 1751995)
Backed out changeset 913a95850424 (bug 1751995)
Backed out changeset 37aec76598c8 (bug 1751995)
Backed out changeset 64612f9a6dfe (bug 1751995)
Backed out changeset b3010b0f7b54 (bug 1751995)
Backed out changeset 534d39c27249 (bug 1751995)
Backed out changeset 4eade6ed42ae (bug 1751995)
Backed out changeset 88fee9cbf094 (bug 1751995)
Backed out changeset 943649ddc765 (bug 1751995)
Backed out changeset 6f5df39ac299 (bug 1751995)
Backed out changeset ee06381e3e1b (bug 1751995)
Backed out changeset 72caae243596 (bug 1751995)
Backed out changeset 9fce3d8543f4 (bug 1751995)
Backed out changeset a979771464dc (bug 1751995)
Backed out changeset 280122d631c0 (bug 1751995)
Backed out changeset 164df42eab65 (bug 1751995)
Backed out changeset 13f5be69033e (bug 1751995)
Backed out changeset 5e7f7bdd2743 (bug 1751995)
Backed out changeset 04d16fbe2bab (bug 1751995)
Backed out changeset 7184b5bfe2d2 (bug 1751995)
Backed out changeset bb0dda055124 (bug 1751995)
Backed out changeset fc3107b98ec6 (bug 1751995)
Backed out changeset 56233032dd1a (bug 1751995)
Backed out changeset c104ceccb708 (bug 1751995)
Backed out changeset 2412e5735361 (bug 1751995)
2024-03-12 18:17:27 +02:00
Alex Franchuk
bcd68af30d Bug 1751995 - Add TestOnlyWaitForTransactionCompletion to MessageChannel r=ipc-reviewers,nika
This method (intended to be used only in tests) blocks until the current transaction stack is
complete, and is used by TestHangs to determine when to continue in the HangButReceive subtest.

Differential Revision: https://phabricator.services.mozilla.com/D203964
2024-03-12 14:07:27 +00:00
Alex Franchuk
2bb092351b Bug 1751995 - Add IPC_TEST_FAIL() and IPCResult::FailForTesting. r=ipc-reviewers,nika
The macro and function are meant to only be used in test circumstances, where we want the failure to
be returned. Normally in `DEBUG` builds the failure causes an immediate crash.

Differential Revision: https://phabricator.services.mozilla.com/D201158
2024-03-12 14:07:20 +00:00
alwu
e085c179d6 Bug 1884209 - part3 : add 'media.wmf.media-engine.channel-decoder.enabled=false' r=gerard-majax
When disabling the audio utility pref, there are some tests testing the
fallback mechanism, which means the audio decoding would happen either
on the RDD process or the content process.

However, on wmfme, the pref `media.wmf.media-engine.channel-decoder.enabled`
is enabled [1] in order to run non-mse playback on the MFCDM process,
that causes failure for those tests.

As that pref is a test-only pref and won't be used on the production, we
should simply disable that pref for those tests in order to get the
expected behavior.

[1] https://searchfox.org/mozilla-central/rev/b55a24116575b1b6c17f1aa56a0b142d86dfa41c/taskcluster/ci/test/variants.yml#343

Depends on D203953

Differential Revision: https://phabricator.services.mozilla.com/D203954
2024-03-08 22:39:47 +00:00
alwu
16764c5fd5 Bug 1884209 - part2 : run audio utility tests in wmfme. r=gerard-majax
Add these tests into wmfme task in order to verify whether they can run
well when the media engine related prefs are enabled.

Depends on D203952

Differential Revision: https://phabricator.services.mozilla.com/D203953
2024-03-08 22:39:47 +00:00
alwu
ec0be3c395 Bug 1884209 - part1 : move audio utility tests to subsuite 'media-bc' and 'media'. r=gerard-majax
These tests are more related to media than IPC, so we should move them
into the default media test suite.

Differential Revision: https://phabricator.services.mozilla.com/D203952
2024-03-08 22:39:47 +00:00
Ray Kraesig
99a762fcd7 Bug 1884107 - conditionalize private variable mUseSandbox r=ipc-reviewers,mccr8
Minor cleanup performed during bug 1878993 revealed this issue.

Differential Revision: https://phabricator.services.mozilla.com/D203925
2024-03-08 20:19:13 +00:00
alwu
f9dd49ba7c Bug 1884016 - part6 : avoid re-initialize the video bridge. r=gerard-majax
There is a timing issue where we would re-initialize the video bridge
causing an assertion, which is discovered by
`browser_utility_multipleAudio.js`.

Differential Revision: https://phabricator.services.mozilla.com/D203518
2024-03-07 00:29:15 +00:00
Ray Kraesig
53b6a1a652 Bug 1878993 - [1/1] Inform Windows about different process types r=win-reviewers,ipc-reviewers,yjuglaret,nika
Windows has an ill-documented subsystem known as the Application Launch
Prefetcher, which apparently preloads DLLs for a binary based on what
DLLs that binary loaded last time.

For Firefox, that's not a great heuristic; we relaunch ourselves as a
subprocess with potentially completely different DLL settings. We're not
the only such application, though, and Windows _does_ have a way to
signal the ALPF to load different DLL sets depending on launch context.

Differential Revision: https://phabricator.services.mozilla.com/D202275
2024-03-06 22:55:23 +00:00
Chris Martin
69ebdb9e56 Bug 1883919 - Remove unused sandbox prefs r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D203772
2024-03-06 15:40:04 +00:00
Natalia Csoregi
98a58e605d Backed out 7 changesets (bug 1881620) for causing frequent media crashes. CLOSED TREE
Backed out changeset d07acf022aad (bug 1881620)
Backed out changeset c58d5ba5c317 (bug 1881620)
Backed out changeset 5f23b23fc038 (bug 1881620)
Backed out changeset 1d7ec3e9b00f (bug 1881620)
Backed out changeset fab988ca73ff (bug 1881620)
Backed out changeset dcafb1fadf9b (bug 1881620)
Backed out changeset 7a2fb26876e1 (bug 1881620)
2024-03-06 11:50:52 +02:00
Mike Hommey
61f6597ef5 Bug 1883565 - Use ProcessUtils_none.cpp on iOS. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D203556
2024-03-05 22:41:32 +00:00
Mike Hommey
11193e6e9d Bug 1834921 - Add a stub ProcessLauncher for iOS. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D203558
2024-03-05 21:01:05 +00:00
Paul Adenot
d2f6ed95cf Bug 1878503 - Remove MOZ_FFVPX and the associated pref. r=glandium,media-playback-reviewers,geckoview-reviewers,alwu
ffvpx is now always compiled in, this is part a rationalization of the codec
libraries we're using.

Differential Revision: https://phabricator.services.mozilla.com/D202813
2024-03-05 16:06:49 +00:00
alwu
54229dd5af Bug 1881620 - part7 : avoid re-initialize the video bridge. r=gerard-majax
There is a timing issue where we would re-initialize the video bridge
causing an assertion, which is discovered by
`browser_utility_multipleAudio.js`.

Depends on D203307

Differential Revision: https://phabricator.services.mozilla.com/D203518
2024-03-05 02:03:47 +00:00
Gabriele Svelto
aa43fa218e Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
Peter Van der Beken
394646db56 Bug 1640839 - Stop using UtilityActorName::EndGuard_. r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D201342
2024-03-02 07:50:24 +00:00
Peter Van der Beken
cc2209dab3 Bug 1640839 - Provide helpers for converting a string to a WebIDL enum value. r=mccr8,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201338
2024-03-02 07:50:21 +00:00
Peter Van der Beken
6d4c6fde36 Bug 1640839 - Make WebIDL enum helper function to convert to string return an actual string. r=mccr8,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201337
2024-03-02 07:50:21 +00:00
Peter Van der Beken
2b747df80a Bug 1640839 - Add some helpers for enums to calculate the size and use it in EnumeratedArray. r=glandium,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201334
2024-03-02 07:50:19 +00:00
Peter Van der Beken
9c8d00b7fb Bug 1640839 - Move size template parameter for EnumeratedArray to the end. r=glandium,jgilbert,media-playback-reviewers,credential-management-reviewers,padenot,dimi
This will allow us to provide a default value for the size when some enum
helper traits are defined.

Differential Revision: https://phabricator.services.mozilla.com/D201333
2024-03-02 07:50:19 +00:00
Jed Davis
48864d54a3 Bug 1880590 - Fix benign data race during fork server shutdown. r=nika
There's a race between `ProcessWatcher` checking if the fork server is
in use (via `ForkServiceChild::Get`) and the fork server shutdown path
(`ForkServerLauncher::Observe` calling `StopForkServer`).  The race
seems to be benign, but it causes test failures under TSan.

As a relatively simple fix, this patch changes `ProcessWatcher` to check
an atomic flag which is true if the fork server has ever been run.
(This also means that, in the case where the fork server has been shut
down but some of its child processes are still running, we will continue
to use the `kill(pid, 0)` fallback.)

Differential Revision: https://phabricator.services.mozilla.com/D203077
2024-03-02 01:44:38 +00:00
Dave Townsend
77bec461b9 Bug 1864896: Autofix unused function arguments (ipc). r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D202969
2024-03-01 20:52:26 +00:00
Natalia Csoregi
8c2521e9d5 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken
bdf064697e Bug 1640839 - Stop using UtilityActorName::EndGuard_. r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D201342
2024-03-01 14:31:14 +00:00
Peter Van der Beken
e0ed150b44 Bug 1640839 - Provide helpers for converting a string to a WebIDL enum value. r=mccr8,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201338
2024-03-01 14:31:12 +00:00
Peter Van der Beken
a1122e9bfc Bug 1640839 - Make WebIDL enum helper function to convert to string return an actual string. r=mccr8,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201337
2024-03-01 14:31:11 +00:00
Peter Van der Beken
f295b0c979 Bug 1640839 - Add some helpers for enums to calculate the size and use it in EnumeratedArray. r=glandium,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201334
2024-03-01 14:31:09 +00:00
Peter Van der Beken
8d1c9ad39c Bug 1640839 - Move size template parameter for EnumeratedArray to the end. r=glandium,jgilbert,media-playback-reviewers,credential-management-reviewers,padenot,dimi
This will allow us to provide a default value for the size when some enum
helper traits are defined.

Differential Revision: https://phabricator.services.mozilla.com/D201333
2024-03-01 14:31:09 +00:00
Jan Varga
67a8ed7ac0 Bug 1855142 - Ensure IndexedDabaseManager::mLocale separately; r=dom-storage-reviewers,jari
mLocale is currently initialized in IndexedDatabaseManager::Init which is
called from IndexedDatabaseManager::GetOrCreate if the manager doesn't exist.
This can be a problem when IndexedDatabaseManager::GetOrCreate is called very
early,for example in nsLayoutStatics::Initialize in the parent process.

This is a preparation for moving IndexedDatabaseManager::GetOrCreate from
FactoryOp::Open to InitializeQuotaManager.

Differential Revision: https://phabricator.services.mozilla.com/D189891
2024-02-29 15:28:47 +00:00
Gregory Pappas
1dfbfcfd07 Bug 1878401 - part 7 - Pass BrowsingContext to nsIFilePicker::Init in tests r=extension-reviewers,settings-reviewers,credential-management-reviewers,anti-tracking-reviewers,devtools-reviewers,sgalich,pbz,nchevobbe,zombie,migration-reviewers,mconley
Depends on D200551

Differential Revision: https://phabricator.services.mozilla.com/D200552
2024-02-28 21:29:39 +00:00
Sandor Molnar
3951121cc6 Backed out 8 changesets (bug 1878401, bug 1879041) for causing build bustages on widget/nsBaseFilePicker.cpp CLOSED TREE
Backed out changeset 2e2b8df3bdd6 (bug 1879041)
Backed out changeset 6d6952f9df2c (bug 1878401)
Backed out changeset 30b5bb590d3e (bug 1878401)
Backed out changeset 9a4b830334b9 (bug 1878401)
Backed out changeset 3c3d67f1fcb7 (bug 1878401)
Backed out changeset c83ba4026822 (bug 1878401)
Backed out changeset 6bcb670ce475 (bug 1878401)
Backed out changeset f263b196df96 (bug 1878401)
2024-02-28 17:56:48 +02:00