Commit Graph
219 Commits
Author SHA1 Message Date
Lars Eggert f62994651b Bug 2031594 - Invoke RecvFlushSSLTokensCache resolver on the actor thread r=valentin,necko-reviewers
IPDLResolverInner::ResolveOrReject asserts it runs on the actor's event
target (main thread for PSocketProcessChild). The previous code called
the resolver directly from a background-pool thread, which crashes in
debug builds (hit via bug 2035453). The socket process main thread is
not busy enough to warrant the extra dispatch, so serialize inline.

Differential Revision: https://phabricator.services.mozilla.com/D297312
2026-04-29 14:43:52 +00:00
Lars Eggert f98aa512e7 Bug 2028797 - Probe for and enable Apple fast UDP datapath r=necko-reviewers,kershaw
Forks a child process to safely test Apple's private sendmsg_x/recvmsg_x
APIs via neqo-udp: verifies batched sends, ECN round-trips, and source
address metadata. If the probe succeeds, enables the fast path for all
subsequently created QUIC sockets in the socket process via IPC.
Records the result as a Glean boolean metric.

Differential Revision: https://phabricator.services.mozilla.com/D291709
2026-04-27 06:53:00 +00:00
Sandor Molnar f1d7462802 Revert "Bug 2028797 - Probe for and enable Apple fast UDP datapath r=necko-reviewers,kershaw" for causing crashes @ toolkit/components/glean/api/src/private/boolean.rs
This reverts commit 161b41e0c4.
2026-04-24 17:46:35 +00:00
Lars Eggert 161b41e0c4 Bug 2028797 - Probe for and enable Apple fast UDP datapath r=necko-reviewers,kershaw
Forks a child process to safely test Apple's private sendmsg_x/recvmsg_x
APIs via neqo-udp: verifies batched sends, ECN round-trips, and source
address metadata. If the probe succeeds, enables the fast path for all
subsequently created QUIC sockets in the socket process via IPC.
Records the result as a Glean boolean metric.

Differential Revision: https://phabricator.services.mozilla.com/D291709
2026-04-24 16:13:01 +00:00
Lars Eggert ffb57c074b Bug 2031594 - Forward SSL session tokens between socket and parent process r=kershaw,necko-reviewers
When network.process.enabled is true (the desktop default), TLS handshakes
happen in the socket process, so SSLTokensCache::Put() is called there while
the parent process cache stays empty — nothing is ever persisted to disk and
0-RTT session resumption never fires after a restart.

This patch wires up the three missing data flows:
- Startup: parent loads ssl_tokens_cache.bin and forwards tokens to the
  socket process via LoadSSLTokensCache.
- Runtime: socket process pushes its live cache to the parent on idle-daily
  and application-background via SSLTokensCacheData; parent persists on the
  next scheduled write.
- Shutdown: parent requests a final flush from the socket process via
  FlushSSLTokensCache() before writing the file during ProfileBeforeChange.

Differential Revision: https://phabricator.services.mozilla.com/D294106
2026-04-22 09:38:11 +00:00
Norisz Fay aa2762217b Revert "Bug 2031594 - Forward SSL session tokens between socket and parent process r=kershaw,necko-reviewers" for causing nsIOService.cpp related failures
This reverts commit c257072410.
2026-04-21 21:12:19 +00:00
Lars Eggert c257072410 Bug 2031594 - Forward SSL session tokens between socket and parent process r=kershaw,necko-reviewers
When network.process.enabled is true (the desktop default), TLS handshakes
happen in the socket process, so SSLTokensCache::Put() is called there while
the parent process cache stays empty — nothing is ever persisted to disk and
0-RTT session resumption never fires after a restart.

This patch wires up the three missing data flows:
- Startup: parent loads ssl_tokens_cache.bin and forwards tokens to the
  socket process via LoadSSLTokensCache.
- Runtime: socket process pushes its live cache to the parent on idle-daily
  and application-background via SSLTokensCacheData; parent persists on the
  next scheduled write.
- Shutdown: parent requests a final flush from the socket process via
  FlushSSLTokensCache() before writing the file during ProfileBeforeChange.

Differential Revision: https://phabricator.services.mozilla.com/D294106
2026-04-21 20:24:15 +00:00
Serban Stanca 69fbde744f Revert "Bug 2031594 - Forward SSL session tokens between socket and parent process r=kershaw,necko-reviewers" for causing Linux build bustages.
This reverts commit b38dec6c3f.
2026-04-16 13:38:36 +00:00
Lars Eggert b38dec6c3f Bug 2031594 - Forward SSL session tokens between socket and parent process r=kershaw,necko-reviewers
When network.process.enabled is true (the desktop default), TLS handshakes
happen in the socket process, so SSLTokensCache::Put() is called there while
the parent process cache stays empty — nothing is ever persisted to disk and
0-RTT session resumption never fires after a restart.

This patch wires up the three missing data flows:
- Startup: parent loads ssl_tokens_cache.bin and forwards tokens to the
  socket process via LoadSSLTokensCache.
- Runtime: socket process pushes its live cache to the parent on idle-daily
  and application-background via SSLTokensCacheData; parent persists on the
  next scheduled write.
- Shutdown: parent requests a final flush from the socket process via
  FlushSSLTokensCache() before writing the file during ProfileBeforeChange.

Differential Revision: https://phabricator.services.mozilla.com/D294106
2026-04-16 13:17:58 +00:00
pstanciu 5431ecc7f8 Revert "Bug 2031594 - Forward SSL session tokens between socket and parent process r=kershaw,necko-reviewers" for causing build bustages @ rust.mk
This reverts commit 187d6d7171.
2026-04-16 11:25:44 +00:00
Lars Eggert 187d6d7171 Bug 2031594 - Forward SSL session tokens between socket and parent process r=kershaw,necko-reviewers
When network.process.enabled is true (the desktop default), TLS handshakes
happen in the socket process, so SSLTokensCache::Put() is called there while
the parent process cache stays empty — nothing is ever persisted to disk and
0-RTT session resumption never fires after a restart.

This patch wires up the three missing data flows:
- Startup: parent loads ssl_tokens_cache.bin and forwards tokens to the
  socket process via LoadSSLTokensCache.
- Runtime: socket process pushes its live cache to the parent on idle-daily
  and application-background via SSLTokensCacheData; parent persists on the
  next scheduled write.
- Shutdown: parent requests a final flush from the socket process via
  FlushSSLTokensCache() before writing the file during ProfileBeforeChange.

Differential Revision: https://phabricator.services.mozilla.com/D294106
2026-04-16 11:03:48 +00:00
Byron Campen de5609e40c Bug 2025950: Stop using ManualDealloc for these. r=mjf,kershaw,necko-reviewers,jesup,ipc-reviewers,nika
Also, switch to using ChildImpl/ParentImpl=virtual. We could remove
those entirely, but that would involve moving files around.

Differential Revision: https://phabricator.services.mozilla.com/D290477
2026-04-13 20:27:07 +00:00
rperta e9a373fb93 Revert "Bug 2025950: Stop using ManualDealloc for these. r=mjf,kershaw,necko-reviewers,jesup,ipc-reviewers,nika" for causing ThreadSanitizer frequent failures
This reverts commit 3297245927.
2026-04-09 22:51:56 +00:00
Byron Campen 3297245927 Bug 2025950: Stop using ManualDealloc for these. r=mjf,kershaw,necko-reviewers,jesup,ipc-reviewers,nika
Also, switch to using ChildImpl/ParentImpl=virtual. We could remove
those entirely, but that would involve moving files around.

Differential Revision: https://phabricator.services.mozilla.com/D290477
2026-04-09 19:50:55 +00:00
Sylvestre Ledru a22215a2f9 Bug 2023419 - Remove Emacs/Vim modelines from netwerk/ r=emilio,cookie-reviewers,valentin
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287861
2026-03-17 12:06:31 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
Jed Davis adb9ba0744 Bug 1302711 - Add Linux socket process sandbox level 2, for ioctl lockdown. r=gcp
See the previous commit, about content sandbox level 6, for details;
this is basically the same (except with one more ioctl allowlisted, and
controlled by a different pref).

This patch also adds some plumbing to get the socket sandbox level into
the code that constructs the policy, modeled on how it works for content
processes.  (Previously the only levels of the socket process sandbox
were "on" and "off" so that wasn't necessary until now.)

Differential Revision: https://phabricator.services.mozilla.com/D249018
2025-05-22 05:48:29 +00:00
Kershaw Chang efaf5f09c7 Bug 1953856 - Expose Http3 stats, r=necko-reviewers,valentin,mxinden
Differential Revision: https://phabricator.services.mozilla.com/D241639
2025-04-17 08:38:47 +00:00
Florian Quèze 9609e47f62 Bug 1879329 - script generated replacement of the GleanMetrics.h includes, r=chutten,valentin,media-playback-reviewers,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,rkraesig,emz,aabh,padenot.
Differential Revision: https://phabricator.services.mozilla.com/D234744
2025-01-21 11:21:45 +00:00
Kershaw Chang 22016f5120 Bug 1937522 - Introduce a mock network layer that supports overwriting NetAddr, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D232207
2024-12-20 13:49:31 +00:00
Goloman Adrian 66ab95ad7c Backed out 2 changesets (bug 1937522) for causing build bustages @MockNetworkLayerController.h. CLOSED TREE
Backed out changeset 5e14601b04cc (bug 1937522)
Backed out changeset 897b51f29229 (bug 1937522)
2024-12-19 16:47:45 +02:00
Kershaw Chang 3f1fc1b902 Bug 1937522 - Introduce a mock network layer that supports overwriting NetAddr, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D232207
2024-12-19 13:49:26 +00:00
Florian Quèze c87fefdb44 Bug 1931901 - remove scalar C++ API, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D229365
2024-11-27 18:09:18 +00:00
Stanca Serban 98a9c38fb5 Backed out 2 changesets (bug 1931901) for causing build bustages in TelemetryScalar.cpp. CLOSED TREE
Backed out changeset f6b042d46afc (bug 1931901)
Backed out changeset 54d0cd358eea (bug 1931901)
2024-11-27 15:52:02 +02:00
Florian Quèze 07db2f01fa Bug 1931901 - remove scalar C++ API, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D229365
2024-11-27 12:10:41 +00:00
Kershaw Chang bf78339b45 Bug 1929368 - Part1: Revert changes done in bug 1925014, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D228087
2024-11-06 13:34:39 +00:00
Kershaw Chang 1d9b94b0ed Bug 1925014 - Test case, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D225819
2024-10-18 15:58:13 +00:00
Adi 4a82ac2ee8 Backed out 3 changesets (bug 1925014) for causing xpcshell fails @ test_http3.js. CLOSED TREE
Backed out changeset e09635a1801e (bug 1925014)
Backed out changeset 15c56a7463ec (bug 1925014)
Backed out changeset 5df6b73dcb6c (bug 1925014)
2024-10-18 15:52:59 +03:00
Kershaw Chang 3e9ae2d7d5 Bug 1925014 - Test case, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D225819
2024-10-18 08:11:35 +00:00
Sandor Molnar c4a30164f5 Backed out 2 changesets (bug 1925014) for causing perma android xpc failures @ test_http3.js CLOSED TREE
Backed out changeset 197f9b5798d6 (bug 1925014)
Backed out changeset 548b916ef37d (bug 1925014)
2024-10-17 22:49:58 +03:00
Kershaw Chang e1e37d77c4 Bug 1925014 - Test case, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D225819
2024-10-16 22:03:50 +00:00
Alexandre Lissy 01de72ed38 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
Sean 944abb3335 Bug 1895232 - Convert do_GetService to using components::*::service in netwerk/ r=valentin,cookie-reviewers,places-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D209747
2024-05-30 21:18:43 +00:00
Iulian Moraru 82b68bb040 Backed out changeset 9a295c851c2e (bug 1895232) for causing multiple failures. CLOSED TREE 2024-05-22 21:03:20 +03:00
Sean f1a6b31988 Bug 1895232 - Convert do_GetService to using components::*::service in netwerk/ r=valentin,cookie-reviewers,places-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D209747
2024-05-22 17:13:29 +00:00
Jan de Mooij 039b884017 Bug 1877193 part 18 - Assert startup prefs are set before JS_Init*. r=mgaudet,necko-reviewers,valentin
Looking at bug 1877605 made me realize we should define better when (startup) prefs
are set exactly.

This patch adds assertions to check startup prefs can only be set before `JS_Init` and
also fixes the embeddings to follow this new rule. This makes the JS shell and browser
behavior more consistent, and makes it possible to rely on pref values during startup.

Differential Revision: https://phabricator.services.mozilla.com/D200148
2024-02-06 12:51:34 +00:00
Kershaw Chang ad1dc2beb3 Bug 1758155 - PBackground clenup, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D185032
2023-08-31 11:45:05 +00:00
Kershaw Chang 2da9cfd52a 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 cae3070441 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
Cristian Tuns 50a8a1c2aa 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 b61c7786d5 Bug 1758155 - PBackground clenup, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D185032
2023-08-16 13:13:31 +00:00
Kershaw Chang f058b39b78 Bug 1758155 - Remove some PSM actos from PBackground, r=keeler,nika,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D182996
2023-08-16 13:13:31 +00:00
Kershaw Chang 9659494741 Bug 1758155 - Make PMediaTransport and PBackgroundDataBridge toplevel actors, r=nika,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D182995
2023-08-16 13:13:30 +00:00
Nika Layzell 055008d917 Bug 1824465 - Part 18: Make PSocketProcess refcounted, r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D173733
2023-04-19 22:10:10 +00:00