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

25091 Коммитов

Автор SHA1 Сообщение Дата
Jake Senne 9cd4a028b6 Bug 1840882 - Remove unused code nsNetworkInfoService r=necko-reviewers,kershaw,jesup
Differential Revision: https://phabricator.services.mozilla.com/D182285
2023-06-30 12:04:25 +00:00
Valentin Gosu f139147694 Bug 1841242 - ObliviousHttpChannel::OnDataAvailable should accept multiple calls r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D182555
2023-06-30 11:14:08 +00:00
Valentin Gosu 75c7895ce1 Bug 1840383 - Respect network.dns.disableIPv6 pref with TRR r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D182467
2023-06-30 08:20:23 +00:00
Manuel Bucher 2b36fbf1bb Bug 1715401 - Fix highly compressed brotli responses with unknown content-type being rejected r=necko-reviewers,valentin
Highly compressed brotli files contain meta blocks that don't produce
output from the first 512 Bytes. That is because the meta block header
might be longer than 512 Bytes.[1] NBLTYPESL, NBLTYPESI, NBLTYPESD,
NTREESL, NTREESD all can blow up the header size. Each at least by
2*256 bits.

With this solution the Content-Type would be always detected as
`octet-stream`. That might not be the correct one. If a different
Content-Type is required, the server can still specify it with the
`Content-Type`-Header.[2]

This solution looks directly at the error code to determine invalid
encoding instead of relying on number of output bytes.

This also doesn't throw an error anymore for truncated brotli documents
that don't produce any output. But since we generally allow truncated
formats[3], it makes the implementation a bit more consistent.

[1]: https://www.rfc-editor.org/rfc/rfc7932#section-9.2
[2]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type
[3]: https://bugzilla.mozilla.org/show_bug.cgi?id=1242904#c4

Differential Revision: https://phabricator.services.mozilla.com/D175460
2023-06-29 14:23:47 +00:00
David Parks f2cc4261be Bug 1840680: Add UNKNOWN to types of network for polling wifi scans r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D182249
2023-06-28 18:27:35 +00:00
Kershaw Chang fc2898f123 Bug 1816677 - Allow to retry diffrent IP family for Http/3, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D180679
2023-06-28 17:20:41 +00:00
Kershaw Chang 705e17a537 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-28 13:21:00 +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 1fdee2314c Bug 1839920 - Rename Get{ASCII,UTF}Origin to GetWebExposedOriginSerialization, r=smaug,necko-reviewers,anti-tracking-reviewers,bvandersloot,jesup
This should make uses of the type more clearly indicating where the
origin came from, and should help avoid potential confusion between this
origin and nsIPrincipal::origin in new code.

This new name is long, but explicit. The string returned from this
function corresponds to the "serialization of an origin" from the WHATWG
html spec:
https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin

Differential Revision: https://phabricator.services.mozilla.com/D181794
2023-06-27 19:59:15 +00:00
Valentin Gosu a1ef551587 Bug 1760123 - Fix test_udp_multicast.js lints r=necko-reviewers,jesup
Depends on D182230

Differential Revision: https://phabricator.services.mozilla.com/D182231
2023-06-27 18:36:37 +00:00
Valentin Gosu 02057abcee Bug 1760123 - Intermittent netwerk/test/unit/test_udp_multicast.js r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D182230
2023-06-27 18:36:37 +00:00
Kershaw Chang 3bb4b89ff8 Bug 1840406 - Add a section for the reason of skipped tests, r=necko-reviewers,valentin DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D182078
2023-06-27 10:25:24 +00:00
Kershaw Chang 58f0c8258b Bug 1840406 - Fix heading in mochitest_with_http3.md, r=necko-reviewers,valentin DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D182075
2023-06-27 10:25:24 +00:00
Tom Ritter 502de3fe32 Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-27 03:31:02 +00:00
Norisz Fay 07a91b8c6a Backed out 2 changesets (bug 1838829) for causing perma mochitest failure with dom/websocket/tests being skipped CLOSED TREE
Backed out changeset 19a5d4f1850a (bug 1838829)
Backed out changeset 97cd8a256954 (bug 1838829)
2023-06-27 02:52:52 +03:00
Kershaw Chang db61659980 Bug 1840300 - cancel async copy with NS_BASE_STREAM_CLOSED during shutdown, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181986
2023-06-26 20:59:05 +00:00
Butkovits Atila fdecfc4373 Backed out 9 changesets (bug 1830070) for causing failures at browser_hwconcurrency_popups_blob_noopener.js. CLOSED TREE
Backed out changeset 62f439f5b2ad (bug 1830070)
Backed out changeset 92b5f8af326f (bug 1830070)
Backed out changeset ae685d3825b7 (bug 1830070)
Backed out changeset 4800b1312e99 (bug 1830070)
Backed out changeset 7ea9676f22ae (bug 1830070)
Backed out changeset 7a86f85ae0e8 (bug 1830070)
Backed out changeset 0a2d5f339e41 (bug 1830070)
Backed out changeset 7e5b72c73304 (bug 1830070)
Backed out changeset e4490bf3d040 (bug 1830070)
2023-06-27 00:12:07 +03:00
David Parks 96bc62185d Bug 1833020: Fix TestWifiMonitor async mock objects r=necko-reviewers,valentin
gMock objects cannot be reused after they receive calls to the mocked functions.  This patch changes the test to establish all of the mock expectations upfront for each network-change notification before running it.  It uses gMock Sequence objects and a checkpoint to maintain (partial) temporal order.

Differential Revision: https://phabricator.services.mozilla.com/D180622
2023-06-26 19:54:41 +00:00
Tom Ritter 78fae782d0 Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-26 17:04:40 +00:00
Kershaw Chang 75c68b6864 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-26 14:22:14 +00:00
Kershaw Chang bf87e869ec Bug 1838211 - Add presets for cookie, websocket, and Http3 logging, r=necko-reviewers,fluent-reviewers,valentin,flod
Differential Revision: https://phabricator.services.mozilla.com/D181993
2023-06-26 12:13:02 +00:00
june wilde 7b8235affc Bug 1659763 - Fix failing x-frame-options web platform tests; r=freddyb,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D180234
2023-06-26 11:58:47 +00:00
Stanca Serban afe1b342fe Backed out changeset d925c8d667f1 (bug 1840300) for causing xpcshell failures in test_unix_domain.js. CLOSED TREE 2023-06-26 15:01:19 +03:00
Kershaw Chang 93af2179ad Bug 1840300 - cancel async copy with NS_BASE_STREAM_CLOSED during shutdown, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181986
2023-06-26 11:01:45 +00:00
Em Zhan b6b6fe577b Bug 1798319 - Implement modulepreload in early hints r=manuel,smaug,necko-reviewers,kershaw
The aEarlyHintPreloaderId parameter for StartLoad/StartLoadInternal is changed
to be a member variable of ScriptLoadRequest instead so that an initiator type
of early hints can be set for module requests. Before, ModuleLoader would always
pass in a zero value for the id since ModuleLoaderBase has no concept of early
hints when it calls StartFetch.

As a prerequisite for early hints support, this commit also implements
modulepreload in link headers (Bug 1773056).

Differential Revision: https://phabricator.services.mozilla.com/D180020
2023-06-26 10:49:53 +00:00
Tom Schuster c2eed54197 Bug 1838415 - Use RFPTarget::JSDateTimeUTC for IndexedToHTML date/time formatting. r=tjr,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181244
2023-06-26 07:17:39 +00:00
Mike Hommey 5af31a8886 Bug 1839762 - Cast scoped enums to their underlying type when printing them. r=media-playback-reviewers,necko-reviewers,application-update-reviewers,geckoview-reviewers,handyman,emilio,valentin,bytesized,owlish,karlt
There is no implicit conversion for scoped enums, so using them without
an explicit conversion in varargs functions is undefined behavior. GCC
has had a warning about this for a long while, but clang only gained
this a few days ago on trunk.

Differential Revision: https://phabricator.services.mozilla.com/D181723
2023-06-24 20:14:31 +00:00
Narcis Beleuzu 7ae0c765b0 Backed out changeset dfe0fed4de68 (bug 1816677) for xpcshell failure on test_http3_dns_retry.js . CLOSED TREE 2023-06-24 00:42:37 +03:00
Kershaw Chang 818d909b26 Bug 1816677 - Allow to retry diffrent IP family for Http/3, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D180679
2023-06-23 15:00:48 +00:00
Sandor Molnar 20af0665ba Backed out changeset 5276a2dbe3d2 (bug 1839177) for causing wpt failures in /fetch/content-encoding/bad-gzip-body.any.worker.html CLOSED TREE 2023-06-23 18:11:59 +03:00
Manuel Bucher 71d6172ae6 Bug 1839177 - Always call OnStopRequest after OnStartRequest even with failures in OnDataAvailable in nsUnknownDecoder::ConvertEncodedData r=necko-reviewers,kershaw
The contract is that after calling OnStartRequest once we then MUST call OnStopRequest, once.

Differential Revision: https://phabricator.services.mozilla.com/D181387
2023-06-23 12:14:04 +00:00
Kershaw Chang d975160933 Bug 1835430 - Cancel async copy to avoid leaks, r=necko-reviewers,valentin,jesup
Differential Revision: https://phabricator.services.mozilla.com/D181643
2023-06-23 06:51:02 +00:00
Kershaw Chang 154a3294af Bug 1838829 - Add document for mochitest with Http/2 and Http/3, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181252
2023-06-22 19:44:54 +00:00
Andrew Creskey 2cca592c2d Bug 1838240 - Migrate these probes to glean: DNS_LOOKUP_TIME, DNS_RENEWAL_TIME, DNS_RENEWAL_TIME_FOR_TTL, DNS_FAILED_LOOKUP_TIME r=necko-reviewers,valentin
We want to collect DNS lookup times on Fenix as there is potential for improvement.

Differential Revision: https://phabricator.services.mozilla.com/D181570
2023-06-22 16:02:57 +00:00
Kershaw Chang 1fc6178253 Bug 1828537 - Use MOZ_RELEASE_ASSERT to check if HttpChannelChild is always released on main thread, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181642
2023-06-22 14:38:24 +00:00
serge-sans-paille ab13de4ec4 Bug 1839325 - Add missing header dependency on mozilla/PSandboxTestingChild.h r=bobowen,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D181446
2023-06-22 12:40:14 +00:00
Norisz Fay e86f1fa0e9 Backed out 5 changesets (bug 1838829) for causing mochitest failures CLOSED TREE
Backed out changeset 693d34c8447d (bug 1838829)
Backed out changeset 903d9ff4afaa (bug 1838829)
Backed out changeset 5e51feff7467 (bug 1838829)
Backed out changeset e125be49d2a6 (bug 1838829)
Backed out changeset 1a8cf3c83dc4 (bug 1838829)
2023-06-22 03:37:07 +03:00
Norisz Fay c009bc1dee Backed out changeset 7d29150fa9f6 (bug 1835430) for causing dt failures on nsCOMPtr.h 2023-06-22 00:47:36 +03:00
Kershaw Chang 149fad568d Bug 1838829 - Add document for mochitest with Http/2 and Http/3, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181252
2023-06-21 19:43:33 +00:00
Kershaw Chang 2cdb6b3a96 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-21 19:43:33 +00:00
Kershaw Chang d325869b9a Bug 1835430 - Cancel async copy to avoid leaks, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181643
2023-06-21 19:18:42 +00:00
Mike Hommey d8456fd716 Bug 1836230 - Update bindgen to 0.66.1. r=emilio,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D179656
2023-06-21 08:52:22 +00:00
Mike Hommey 39ed3add07 Bug 1838354 - Change how the rust workspace hack is added. r=firefox-build-system-reviewers,webdriver-reviewers,ahochheiden,whimboo
First, instead of using a path, use a version, which is more convenient
(via a patch in the top-level Cargo.toml).

Second, we make the build system itself enforce its presence for any
crate that is hooked to the build system as a program or library.

Finally, for each crate depending on the workspace hack, we add a
feature named after it, and make the build system enforce that the
feature is set. For now, this remains unused, but the end goal is to
have each of those features enable the dependencies each of these
crates need, so that if crate A and B need dependency D, but crate C
doesn't, building crate C doesn't build D.

Differential Revision: https://phabricator.services.mozilla.com/D180910
2023-06-21 07:31:44 +00:00
Tooru Fujisawa 65f42a1084 Bug 1839360 - Part 2: Remove remaining more consumers of Services.jsm. r=kmag,necko-reviewers,geckoview-reviewers,m_kato,valentin
Differential Revision: https://phabricator.services.mozilla.com/D156922
2023-06-20 12:36:16 +00:00
Mike Kaply 3332079ecd Bug 1772503 - Keep policy locked preferences locked. r=mhowell,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D181100
2023-06-20 12:17:49 +00:00
sunil mayya 4a5b60e488 Bug 1812505 - add test to verify conditional requests are sent for stale responses with immutable cache-control extension. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181151
2023-06-20 05:57:32 +00:00
sunil mayya e483756252 Bug 1812505 - conditional request must be sent for stale responses with immutable cache-control extension. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181044
2023-06-20 05:57:32 +00:00
Natalia Csoregi 37db79aab5 Backed out 8 changesets (bug 1830070) for causing assertion failures on nsAboutProtocolUtils.h. CLOSED TREE
Backed out changeset 05c4b06857fb (bug 1830070)
Backed out changeset f264c5b9c200 (bug 1830070)
Backed out changeset 45032e474c29 (bug 1830070)
Backed out changeset fa89c51ef6fc (bug 1830070)
Backed out changeset f0f70e7c8250 (bug 1830070)
Backed out changeset 785e1775c13d (bug 1830070)
Backed out changeset 582e28b83b50 (bug 1830070)
Backed out changeset de379bee27d0 (bug 1830070)
2023-06-19 23:51:04 +03:00
Tom Ritter bc2e6a72ad Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-19 20:03:27 +00:00
Cristian Tuns 56fde7fc95 Backed out 8 changesets (bug 1830070) for causing build bustages in nsContentUtils.cpp CLOSED TREE
Backed out changeset e1fea00fd3d4 (bug 1830070)
Backed out changeset 2b18a4962ce4 (bug 1830070)
Backed out changeset db1529c19fb3 (bug 1830070)
Backed out changeset c84325c71e91 (bug 1830070)
Backed out changeset dc7d31b22ca7 (bug 1830070)
Backed out changeset 7cf935920d9a (bug 1830070)
Backed out changeset e41d8c2f85df (bug 1830070)
Backed out changeset e962979d701e (bug 1830070)
2023-06-19 14:25:09 -04:00