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

23780 Коммитов

Автор SHA1 Сообщение Дата
Tom Schuster 934b379383 Bug 1763073 - Add telemetry (and messaging) for SameSite cookies blocked due to redirects. r=freddyb,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D143034
2022-06-15 14:51:16 +00:00
Dimi 9e6c641b2c Bug 1773043 - Remove flashblock from necko r=kershaw,necko-reviewers
Depends on D149130

Differential Revision: https://phabricator.services.mozilla.com/D149131
2022-06-15 12:55:26 +00:00
Dimi fad84601a8 Bug 1773043 - Remove flashblock from url-classifier r=timhuang
Depends on D149128

Differential Revision: https://phabricator.services.mozilla.com/D149129
2022-06-15 12:55:25 +00:00
Manuel Bucher 9576ffa343 Bug 1744822 - Make early hint preloads also preload cross origin requests r=necko-reviewers,ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D143739
2022-06-15 09:59:46 +00:00
Manuel Bucher 64e0803487 Bug 1761252 - Parse anchor attribute in Link-header r=necko-reviewers,dragana,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142442
2022-06-15 09:59:46 +00:00
Manuel Bucher 223d2198f9 Bug 1761242 - Test early hint preloads for all implemented asset types r=necko-reviewers,dragana,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142202
2022-06-15 09:59:45 +00:00
Manuel Bucher b0235f2c18 Bug 1761242 - Generalize the EarlyHintPreloader to cover all assets intended to preload r=necko-reviewers,ckerschb,dragana,kershaw
Previously covered: images
Added: script, script modules, font, style, fetch

Differential Revision: https://phabricator.services.mozilla.com/D142201
2022-06-15 09:59:45 +00:00
Manuel Bucher 01c412729d Bug 1765652 - Fix early hints still preloading with parent controlled loads r=necko-reviewers,kershaw
Fixes early hint preloads always getting cancelled with
browser.tabs.documentchannel.parent-controlled set to true

Differential Revision: https://phabricator.services.mozilla.com/D147274
2022-06-14 10:06:36 +00:00
Sebastian Hengst d0dce2754d Backed out 2 changesets (bug 1772092) for causing frequent crashes (bug 1774118 and bug 1774125). a=backout
Backed out changeset ec91915d325c (bug 1772092)
Backed out changeset 1aadfdf2c854 (bug 1772092)
2022-06-14 10:16:35 +02:00
Cristian Tuns 5a686457aa Backed out 2 changesets (bug 1767609) for causing build bustages on Http2StreamBase.h CLOSED TREE
Backed out changeset dcb265c0e791 (bug 1767609)
Backed out changeset ad580df59f14 (bug 1767609)
2022-06-13 10:54:38 -04:00
Dragana Damjanovic dd5a25a686 Bug 1767609 - Move functions specific to regular HTTP/2 requests, connect requests and server push requests into the appropriate classes. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D148153
2022-06-13 12:05:45 +00:00
Dragana Damjanovic cf69013d30 Bug 1767609 - Create Http2StreamBase r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D145480
2022-06-13 12:05:44 +00:00
Manuel Bucher 1b8bae7ee7 Bug 1773234 - Network testing docs: fix code box formatting r=necko-reviewers,dragana DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D149052
2022-06-13 11:54:22 +00:00
Dennis Jackson 1c8c0c17ed oBug 1770907 - Disable ECH GREASE when retrying connections. r=dragana,keeler,necko-reviewers
Add a preference for whether to remove ECH GREASE extensions when retrying a connection. This repurposes the  flag which was previously present but not actually functional.

Differential Revision: https://phabricator.services.mozilla.com/D147191
2022-06-13 11:29:41 +00:00
Dragana Damjanovic 76b5fcfba7 Bug 1772092 - Adjust neqo-glue code to the new neqo version r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D148053
2022-06-13 11:05:08 +00:00
Dragana Damjanovic 0141e578c4 Bug 1772092 - Update neqo to version 0.6.0 r=necko-reviewers,kershaw,glandium
Differential Revision: https://phabricator.services.mozilla.com/D147855
2022-06-13 11:05:08 +00:00
criss c6b2c5db61 Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell b3c13bf114 Bug 1772006 - Part 6: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-06-10 21:12:08 +00:00
Nika Layzell 1475267b8c Bug 1772006 - Part 5: Simplify and move the string comparison APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,dragana,barret
In addition to moving these methods to a more appropriate file, they were
simplified to make them easier to maintain in the future.
nsTStringRepr::Compare was extended to also work on char16_t strings, and the
case insensitive and other options were removed as they aren't necessary. This
required some changes to callers in the tree.

The EqualsIgnoreCase method was also simplified by using `std::string_view`.

Differential Revision: https://phabricator.services.mozilla.com/D148299
2022-06-10 21:12:07 +00:00
Iulian Moraru 4cd2cbcfa4 Backed out 3 changesets (bug 1767974, bug 1771479) for causing xpcshell failures on test_httpssvc_retry_with_ech.js. CLOSED TREE
Backed out changeset 9bcda147affa (bug 1771479)
Backed out changeset 4455b5bf1282
Backed out changeset f973baf1403a (bug 1767974)
2022-06-10 16:58:28 +03:00
Dennis Jackson 55801f5de7 oBug 1770907 - Disable ECH GREASE when retrying connections. r=dragana,keeler,necko-reviewers
Add a preference for whether to remove ECH GREASE extensions when retrying a connection. This repurposes the  flag which was previously present but not actually functional.

Differential Revision: https://phabricator.services.mozilla.com/D147191
2022-06-10 11:10:27 +00:00
Markus Stange 01d0f7dcc5 Bug 1770485 - Make content process socket threads use a regular event loop, with a pref r=necko-reviewers,kershaw
The custom event loop is only needed in the parent process or socket
process, where it is used to interleave runnable processing with
socket response processing.
But in content processes, we don't get any data from any socket directly.

Pref added, and pref disabled for many necko xpcshell tests

Differential Revision: https://phabricator.services.mozilla.com/D147094
2022-06-09 11:59:38 +00:00
criss 44a8e72bfb Backed out 2 changesets (bug 1772092) for causing build bustages. CLOSED TREE
Backed out changeset 30a2c0f4c97f (bug 1772092)
Backed out changeset 7dd164e9428c (bug 1772092)
2022-06-09 13:29:59 +03:00
Dragana Damjanovic cebccb13b0 Bug 1772092 - Adjust neqo-glue code to the new neqo version r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D148053
2022-06-09 10:09:52 +00:00
Dragana Damjanovic c530c7b6b8 Bug 1772092 - Update neqo to version 0.6.0 r=necko-reviewers,kershaw,glandium
Differential Revision: https://phabricator.services.mozilla.com/D147855
2022-06-09 10:09:52 +00:00
Benjamin VanderSloot eeed1b8c84 Bug 1765313, part 3 - Rename ContentBlocking to StorageAccessAPIHelper, r=anti-tracking-reviewers,necko-reviewers,dragana,timhuang
The only functions that remain are used as helper functions in the various variants of the Storage Access API.
To make this clearer, I have renamed this class and file that contains it.

Differential Revision: https://phabricator.services.mozilla.com/D148286
2022-06-08 21:57:17 +00:00
Benjamin VanderSloot 5157d54b3b Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 21:57:16 +00:00
Marian-Vasile Laza 0189a61570 Backed out changeset 9c3f8e19266c (bug 1635092) as requested by the dev. CLOSED TREE 2022-06-08 22:47:34 +03:00
Marian-Vasile Laza a0f6973887 Backed out 5 changesets (bug 1765313, bug 1770403) for causing bc failures on browser_storageAccessPrivilegeAPI.js. CLOSED TREE
Backed out changeset 22153c8641e1 (bug 1765313)
Backed out changeset 588d54f796a0 (bug 1765313)
Backed out changeset 2376ca53eb9c (bug 1765313)
Backed out changeset 9cf02ec5657a (bug 1770403)
Backed out changeset 7d8147ba25e8 (bug 1770403)
2022-06-08 22:07:37 +03:00
Benjamin VanderSloot a9c9c02c9c Bug 1765313, part 3 - Rename ContentBlocking to StorageAccessAPIHelper, r=anti-tracking-reviewers,necko-reviewers,dragana,timhuang
The only functions that remain are used as helper functions in the various variants of the Storage Access API.
To make this clearer, I have renamed this class and file that contains it.

Differential Revision: https://phabricator.services.mozilla.com/D148286
2022-06-08 17:11:19 +00:00
Benjamin VanderSloot b52e3e14a8 Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 17:11:19 +00:00
Molnar Sandor 1fc858a96d Backed out 5 changesets (bug 1761242, bug 1744822, bug 1761252) for causing browser-chrome failures in netwerk/test/browser/browser_103_assets.js CLOSED TREE
Backed out changeset 33cc08eb51b3 (bug 1744822)
Backed out changeset b70697d24e75 (bug 1761252)
Backed out changeset 4a5e10110c6a (bug 1761242)
Backed out changeset 7cda175b833d (bug 1761242)
Backed out changeset 4f5ed111093b (bug 1761242)
2022-06-08 18:56:35 +03:00
Emilio Cobos Álvarez 81630e9bf5 Bug 1604562 - Use wrapped principal as needed for CORS requests triggered by expanded principals. r=necko-reviewers,freddyb,kershaw
As long as they only wrap one principal, we have a meaningful origin to
use for the CORS request.

This is another alternative for the fix.

Differential Revision: https://phabricator.services.mozilla.com/D148396
2022-06-08 15:30:08 +00:00
Manuel Bucher ba8ab9dfa9 Bug 1744822 - Make early hint preloads also preload cross origin requests r=necko-reviewers,ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D143739
2022-06-08 14:33:12 +00:00
Manuel Bucher fd7447e198 Bug 1761252 - Parse anchor attribute in Link-header r=necko-reviewers,dragana,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142442
2022-06-08 14:33:12 +00:00
Manuel Bucher a61ce15502 Bug 1761242 - Test early hint preloads for all implemented asset types r=necko-reviewers,dragana,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142202
2022-06-08 14:33:11 +00:00
Manuel Bucher c01168264a Bug 1761242 - Generalize the EarlyHintPreloader to cover all assets intended to preload r=necko-reviewers,ckerschb,dragana,kershaw
Previously covered: images
Added: script, script modules, font, style, fetch

Differential Revision: https://phabricator.services.mozilla.com/D142201
2022-06-08 14:33:11 +00:00
Molnar Sandor 4012088f05 Backed out 5 changesets (bug 1765313, bug 1770403) for causing lint failure in tools/lint/rejected-words.yml CLOSED TREE
Backed out changeset c76671d99573 (bug 1765313)
Backed out changeset f0895e88c27e (bug 1765313)
Backed out changeset 81a0f8c40381 (bug 1765313)
Backed out changeset a11f5453e441 (bug 1770403)
Backed out changeset df452028881c (bug 1770403)
2022-06-08 15:48:57 +03:00
Benjamin VanderSloot b49966ba21 Bug 1765313, part 3 - Rename ContentBlocking to StorageAccessAPIHelper, r=anti-tracking-reviewers,necko-reviewers,dragana,timhuang
The only functions that remain are used as helper functions in the various variants of the Storage Access API.
To make this clearer, I have renamed this class and file that contains it.

Differential Revision: https://phabricator.services.mozilla.com/D148286
2022-06-08 12:18:23 +00:00
Benjamin VanderSloot b99dc899f7 Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 12:18:22 +00:00
Kershaw Chang abd6895dcb Bug 1762724 - Don't use HTTPS RR for upgrade requests, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D144414
2022-06-08 08:07:18 +00:00
Mark Banner 254a0dc016 Bug 1770727 - Fix remaining ESLint rules for sjs files. r=Gijs,necko-reviewers,kershaw
Depends on D147082

Differential Revision: https://phabricator.services.mozilla.com/D147083
2022-06-07 19:14:09 +00:00
Mark Banner 61c02dadbe Bug 1770727 - Fix ESLint rule mozilla/use-services on sjs files and expose Services to sjs files. r=Gijs
Depends on D147080

Differential Revision: https://phabricator.services.mozilla.com/D147081
2022-06-07 19:14:08 +00:00
Sylvestre Ledru 42f6811d95 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148375
2022-06-07 12:32:55 +00:00
Kershaw Chang 1d3eabcafc Bug 1770123 - Clear PAC loader when the load is failed, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D147861
2022-06-07 12:32:45 +00:00
Neil Deakin a49aa34d6d Bug 1761265, don't show the downloads panel when a download was started by user action that they expect will save the file, r=mhowell,necko-reviewers,kershaw
The download panel should still appear when clicking on download links or those with content-disposition: attachment

Differential Revision: https://phabricator.services.mozilla.com/D147875
2022-06-06 22:23:58 +00:00
ffxbld 6e462c9969 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D148384
2022-06-06 13:05:41 +00:00
Haik Aftandilian 4591ba72b4 Bug 1770484 - Make Mac processes not depend on DYLD_LIBRARY_PATH to load libraries r=glandium,gsvelto,mac-reviewers,necko-reviewers,dragana,spohl
Change XUL and other dylibs to be built with an @rpath/<dylib> install name (LC_ID_DYLIB) instead of @executable_path/<dylib>.

Change executables to be built with an @rpath dyld search path set to @executable_path by default so that @rpath/<dylib> dylibs in the same directory can be resolved. For executables not in the same directory as @rpath dylibs, such as plugin-container, set a relative @rpath such as @executable_path/../../../.

Previously, dylib install names were set as @executable_path/<dylib> allowing them to be resolved by dyld for the loading executable if the executable resided in the same directory as the dylib. For executables not in the same directory as the dylibs, dyld resolved these dylibs using DYLD_LIBRARY_PATH set before launching the process by Firefox code. With this change, loading does not rely on DYLD environment variables. Instead, dylibs have an install name set as @rpath/<dylib> and each executable loading a dylib has its @rpath set at compile-time to refer to dylib directory.

Differential Revision: https://phabricator.services.mozilla.com/D147360
2022-06-03 21:14:01 +00:00
Mike Conley 32c1db2b09 Bug 1354248 - Part 4: Make PageIconProtocolHandler use RemoteStreamGetter. r=necko-reviewers,nika,mak,ckerschb,kershaw
This makes it so that PageIconProtocolHandler uses RemoteStreamGetter in the event that the
privileged about content process attempts to use the page-icon: protocol. This allows the parent
to then remotely stream the favicons down to the privileged about content process.

This also adds a test to check that only the privileged about content process can use this
protocol, and that "normal" web content processes cannot.

Differential Revision: https://phabricator.services.mozilla.com/D147335
2022-06-03 15:17:34 +00:00
Mike Conley 545db4aaa0 Bug 1354248 - Part 3: Supply LoadInfoArgs through the RemoteStreamGetter mechanism. r=necko-reviewers,kershaw
The LoadArgs are wrapped in a Maybe, since that seems to be what the conversion utilities
(LoadInfoToLoadInfoArgs and LoadInfoArgsToLoadInfo) seem to expect. It's really up to the
users of RemoteStreamGetter to determine whether or not they're willing to accept requests
without LoadArgs.

Differential Revision: https://phabricator.services.mozilla.com/D147334
2022-06-03 15:17:33 +00:00
Mike Conley 9162e50177 Bug 1354248 - Part 2: Abstract out the IPC message that RemoteStreamGetter uses. r=necko-reviewers,kershaw
This will allow the PageIconProtocolHandler to also use RemoteStreamGetter, using
its own IPC message.

Differential Revision: https://phabricator.services.mozilla.com/D147181
2022-06-03 15:17:33 +00:00
Mike Conley 2ff2484102 Bug 1354248 - Part 1: Split PageThumbStreamGetter into a common utility class. r=necko-reviewers,kershaw
This utility class is called RemoteStreamGetter, and will be used for the PageIconProtocolHandler
in a later patch in this series.

Differential Revision: https://phabricator.services.mozilla.com/D147180
2022-06-03 15:17:32 +00:00
Butkovits Atila d98f94c8ad Bug 1772209 - disable browser_post_auth.js on socketprocess_networking for perma failures. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D148067
2022-06-03 08:18:20 +00:00
Dana Keeler 9e12ff8e96 Bug 1770869 - remove nsISSLSocketControl.clientCert r=jschanck,necko-reviewers,kershaw
This field isn't used any longer and removing it will make future changes
eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D147227
2022-06-01 23:20:58 +00:00
Dana Keeler 82c73ec75d Bug 1770869 - remove nsILocalCertService and implementation r=necko-reviewers,jschanck,pbz,kershaw
nsILocalCertService was used in FlyWeb, which was removed in Firefox 59 in bug
1374574.

Depends on D147121

Differential Revision: https://phabricator.services.mozilla.com/D147122
2022-06-01 23:20:58 +00:00
Butkovits Atila 2b78c018fd Backed out 3 changesets (bug 1770869) for causing xpcshell failures at test_tls_server.js. CLOSED TREE
Backed out changeset 5c95392b800d (bug 1770869)
Backed out changeset 149d04a209b6 (bug 1770869)
Backed out changeset 5a138d047be1 (bug 1770869)
2022-06-02 00:18:26 +03:00
Dana Keeler 39015f9d16 Bug 1770869 - remove nsISSLSocketControl.clientCert r=jschanck,necko-reviewers,kershaw
This field isn't used any longer and removing it will make future changes
eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D147227
2022-06-01 20:00:57 +00:00
Dana Keeler 0f6879c125 Bug 1770869 - remove nsILocalCertService and implementation r=necko-reviewers,jschanck,pbz,kershaw
nsILocalCertService was used in FlyWeb, which was removed in Firefox 59 in bug
1374574.

Depends on D147121

Differential Revision: https://phabricator.services.mozilla.com/D147122
2022-06-01 20:00:57 +00:00
Tooru Fujisawa 3afd363d47 Bug 1772105 - Use plain object for lazy getter in netwerk/url-classifier/. r=mccr8
Depends on D147892

Differential Revision: https://phabricator.services.mozilla.com/D147893
2022-06-01 16:41:16 +00:00
Dragana Damjanovic a240dc8f04 Bug 1759292 - Clear the coalescing key mapping on hard-refresh r=necko-reviewers,kershaw
AltSvc mapping is cleared and if we do not clear the coalescing mapping it may happen that AltSvc cannot be validated because an alternative connection using DNS mapping already exists.

We clear AltSvc mapping because hard-refresh is a sign of a problem loading a page and we should start fresh, that should mean for the coalescing hashmap as well.

Differential Revision: https://phabricator.services.mozilla.com/D147827
2022-06-01 11:01:53 +00:00
Kershaw Chang 7acc8a02b7 Bug 1769754 - Networking Test Guidelines, r=necko-reviewers,eguloien,dragana DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D146565
2022-05-31 11:41:36 +00:00
Dragana Damjanovic 462541fa3d Bug 1770742 - Disable 0RTT properly for SSL_ERROR_BAD_MAC_ALERT error r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D147711
2022-05-31 11:22:06 +00:00
Mike Hommey 37b0d690e7 Bug 1770894 - Update http3server to base64 0.13. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D147253
2022-05-30 21:37:35 +00:00
Mike Hommey 7b06b12d90 Bug 1770894 - Update in-tree crates to bindgen 0.59. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147221
2022-05-30 21:37:31 +00:00
criss cfdd8e542e Merge mozilla-central to autoland. a=merge CLOSED TREE 2022-05-30 23:42:51 +03:00
Tooru Fujisawa 38dd293152 Bug 1610653 - Part 4: Do not use global this property assignment to define global variable in netwerk/. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D144111
2022-05-30 15:19:36 +00:00
Serge Guelton daee4de4d2 Bug 1769027 - Cleanup netwerk includes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D146164
2022-05-30 14:21:13 +00:00
Sebastian Hengst 32ca4fc265 Bug 1771744 - disable test_http3_large_post_telemetry.js because telemetry probe expired. a=permanent-failure 2022-05-30 16:06:35 +02:00
Andrew Creskey 55c5c3944d Bug 1635092 - Save one main thread loop to nsHttpChannel::AsyncOpen of IPC'ed channels r=necko-reviewers,dragana,barret
Adds a new serial event target that executes the runnable immediately if already on the main thread. This allows then ThenValue to execute immediately instead of being dispatched to the back of the main thread event target, when possible.

Differential Revision: https://phabricator.services.mozilla.com/D146481
2022-05-25 18:44:12 +00:00
Kershaw Chang 390e62f9b7 Bug 1769267 - Record HTTP_CHANNEL_PAGE_ONSTART_SUCCESS_TRR3 when TRR is confirmed, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D146312
2022-05-24 21:32:08 +00:00
Paul Zuehlcke 3cf0011c96 Bug 1762374 - Part 1: Add a Histogram to count amount of query parameters stripped per navigation. r=anti-tracking-reviewers,necko-reviewers,dragana,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D146592
2022-05-24 18:57:17 +00:00
Hannah Peuckmann f96337e925 Bug 1770881 - Mapping active logins to privacy.clearOnShutdown.sessions instead of -session . r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D147130
2022-05-24 17:37:53 +00:00
Molnar Sandor 05e3775a6c Backed out 4 changesets (bug 1770727) for causing mochitest failures in test_bug1180105/test_access_control. CLOSED TREE
Backed out changeset 6323b526b0ac (bug 1770727)
Backed out changeset fc7ea80aa2ff (bug 1770727)
Backed out changeset 2a358ba86652 (bug 1770727)
Backed out changeset 464d1af6523b (bug 1770727)
2022-05-24 17:24:40 +03:00
Mark Banner 5364458f47 Bug 1770727 - Fix remaining ESLint rules for sjs files. r=Gijs,necko-reviewers,kershaw
Depends on D147082

Differential Revision: https://phabricator.services.mozilla.com/D147083
2022-05-24 12:59:10 +00:00
Mark Banner dac6401c3b Bug 1770727 - Fix ESLint rule mozilla/use-services on sjs files and expose Services to sjs files. r=Gijs
Depends on D147080

Differential Revision: https://phabricator.services.mozilla.com/D147081
2022-05-24 12:59:09 +00:00
Manuel Bucher 409fc3ee88 Bug 1768924 - Fix intermittent timeout in early hint test code by splitting up the test case r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D146680
2022-05-24 09:09:36 +00:00
Tim Huang bebf6a1109 Bug 1768193 - Part 1: Use maybe to hold mIsThirdPartyContextToTopWindow in LoadInfo. r=anti-tracking-reviewers,necko-reviewers,bvandersloot,kershaw
In order to know if the mIsThirdPartyContextToTopWindow was set in the
loadInfo of the channel, we use maybe to hold the value. So, we can know
if it was set before.

This patch also addes two methods in LoadInfo to clear and know if the
value is set.

Differential Revision: https://phabricator.services.mozilla.com/D146491
2022-05-24 08:17:28 +00:00
Dragana Damjanovic 6aad873dae Bug 1768090 - Ignore error from UDP soocket. r=necko-reviewers,kershaw
A UDP socket may receive a ConnecionReset error if a packet is sent to an unreachable port. This is not a reason to close the soccket.

Differential Revision: https://phabricator.services.mozilla.com/D146951
2022-05-24 04:19:20 +00:00
Tom Schuster 6ba489c180 Bug 1763367 - Flush HttpBaseChannel console reports using the WindowID. r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D143039
2022-05-23 13:51:58 +00:00
Cristian Tuns 828f93231b Backed out 2 changesets (bug 1763367) as requested by evilpie on element. CLOSED TREE
Backed out changeset 9b27117a24c8 (bug 1763367)
Backed out changeset cd28d8497f99 (bug 1763367)
2022-05-23 06:53:28 -04:00
Tom Schuster b6fe750086 Bug 1763367 - Flush HttpBaseChannel console reports using the WindowID. r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D143039
2022-05-23 09:07:50 +00:00
Bryan Thrall edc0fa2360 Bug 1757833 - Add PerfStat probes for bytecode cache reads, writes, compression, and decompression r=nbp,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D145012
2022-05-20 18:25:42 +00:00
Butkovits Atila 10ef6010a2 Backed out changeset 6fe984120bd9 (bug 1769267) as requested by dev. CLOSED TREE 2022-05-20 17:42:15 +03:00
Kershaw Chang 21075e5057 Bug 1769267 - Record HTTP_CHANNEL_PAGE_ONSTART_SUCCESS_TRR3 when TRR is confirmed, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D146312
2022-05-20 11:26:01 +00:00
Kershaw Chang 87c297c9e2 Bug 1768140 - Reset mTRRSuccess before a new lookup, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D145718
2022-05-20 11:24:26 +00:00
Kershaw Chang c3e54c97d3 Bug 1745150 - Don't report DNS error for NS_BASE_STREAM_CLOSED, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D146288
2022-05-19 21:20:18 +00:00
Cosmin Sabou 1a2450d947 Bug 1744028 - disable browser_103_telemetry.js also on linux debug for frequent fails. r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D146810
2022-05-19 15:48:17 +00:00
Hannah Peuckmann ab8129c686 Bug 1681498 - Migrate users from network.cookie.lifetimePolicy to sanitize on shutdown prefs. r=pbz,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139102
2022-05-19 14:08:15 +00:00
ffxbld 1677fb63f8 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D146796
2022-05-19 11:57:24 +00:00
Kagami Sascha Rosylight 2b7f799d55 Bug 1659025 - Implement [Transferable] for ReadableStream r=smaug,sfink
Differential Revision: https://phabricator.services.mozilla.com/D139525
2022-05-19 11:54:31 +00:00
Iulian Moraru c49f9ffda3 Backed out 6 changesets (bug 1757833) for causing multiple crashes with MOZ_Z_inflateInit2_. CLOSED TREE
Backed out changeset 6a7d3034db0a (bug 1757833)
Backed out changeset faa0393886db (bug 1757833)
Backed out changeset 4bffe0cf490e (bug 1757833)
Backed out changeset 189b81cc13fd (bug 1757833)
Backed out changeset a59c66e4fb68 (bug 1757833)
Backed out changeset 2b5d9869fbcb (bug 1757833)
2022-05-19 01:14:05 +03:00
Bryan Thrall 98850ac71c Bug 1757833 - Add PerfStat probes for bytecode cache reads, writes, compression, and decompression r=nbp,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D145012
2022-05-18 21:03:49 +00:00
Kershaw Chang ed4399816c Bug 1754975 - Introduce a new error code for blocking a non-local connection, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D146281
2022-05-18 15:31:07 +00:00
criss 53019d89e5 Backed out 2 changesets (bug 1659025) for causing wpt failures. CLOSED TREE
Backed out changeset 9442f1d617ea (bug 1659025)
Backed out changeset a7f050ab968d (bug 1659025)
2022-05-18 16:30:39 +03:00
Kershaw Chang 9153fef79a Bug 1766137 - Avoid holding the lock when calling nsThread::Shutdown, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D146280
2022-05-18 13:01:32 +00:00
Kagami Sascha Rosylight e8a0067bcc Bug 1659025 - Implement [Transferable] for ReadableStream r=smaug,sfink
Differential Revision: https://phabricator.services.mozilla.com/D139525
2022-05-18 12:01:01 +00:00
Kershaw Chang 0d4befa6dc Bug 1715960 - Remove sanity check from nsStandardURL's destructor, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D144259
2022-05-18 11:52:49 +00:00
Mark Banner 7c198e01fd Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-18 08:13:19 +00:00
Andrew McCreight fa8bfd1245 Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D146457
2022-05-17 20:24:19 +00:00
Andrew McCreight c8c5c819df Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance. r=xpcom-reviewers,preferences-reviewers,nika,Gijs
This patch won't actually build, because a few bits of code are used
for both nsIFactory::createInstance and static components, and static
components are not fixed until the next patch.

The first place is nsLoadGroupConstructor, which uses an nsIFactory
macro to create a static component constructor. (This could be worked
around by expanding the macro to the state before this patch.)

The other issue is that nsAppShellConstructor is used in an nsIFactory
on OSX, but as a static component on all other platforms. This could
be worked around by wrapping nsAppShellConstructor in an adaptor that
passes in the extra null argument to nsAppShellConstructor.

Differential Revision: https://phabricator.services.mozilla.com/D146456
2022-05-17 20:24:19 +00:00
Sebastian Hengst c552340e0c Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Sebastian Hengst 825a31e539 Backed out 6 changesets (bug 1757833) for Linux base toolchains build failure
Backed out changeset c8117edaf054 (bug 1757833)
Backed out changeset a46efd9967d0 (bug 1757833)
Backed out changeset f33955b6a7cc (bug 1757833)
Backed out changeset 71f1afa82581 (bug 1757833)
Backed out changeset 868407dccba9 (bug 1757833)
Backed out changeset 79873d83d02b (bug 1757833)
2022-05-17 19:46:50 +02:00
Mark Banner 5865f044db Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-17 16:50:33 +00:00
Bryan Thrall 47bd5772df Bug 1757833 - Add PerfStat probes for bytecode cache reads, writes, compression, and decompression r=nbp,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D145012
2022-05-17 16:29:05 +00:00
Paul Zuehlcke ff73626bba Bug 1763660 - Enable query parameter stripping in Private Browsing Mode. r=anti-tracking-reviewers,necko-reviewers,timhuang,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D143760
2022-05-17 10:42:16 +00:00
Andrew McCreight 01913de302 Bug 1769442 - Remove nsIFactory::lockFactory, breaking compatibility with IClassFactory. r=xpcom-reviewers,Jamie,necko-reviewers,kershaw,nika
nsIFactory is binary compatible with Windows COM's IClassFactory,
but nothing seems to depend on it. This patch removes the test
for compatibility, TestCOM, and removes the lockFactory
method that isn't otherwise needed.

Differential Revision: https://phabricator.services.mozilla.com/D146386
2022-05-16 22:38:51 +00:00
Andrew McCreight 6ec8054b0b Bug 1769380 - Remove the unused nsSOCKSSocketProvider::CreateV4 and CreateV5. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D146378
2022-05-16 14:03:33 +00:00
ffxbld 9a53228116 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D146422
2022-05-16 13:40:00 +00:00
Nika Layzell 873e958e4f Bug 1754004 - Part 18: Ensure AsyncWait callbacks are cleared when NS_AsyncCopy completes, r=xpcom-reviewers,mccr8
When the NS_AsyncCopy completes, there may still be outstanding
AsyncWait callbacks which have not been invoked yet, due to two
AsyncWait callbacks being registered each time Process() yields (one to
wait for the blocked stream, and the other with WAIT_CLOSURE_ONLY to
handle errors), and only one callback being needed to resume processing.

This change ensures that any outstanding AsyncWait callbacks are
cancelled, breaking references from the streams to the
nsAStreamCallback. Some streams (such as nsPipe and DataPipe) may also
leak if there are oustanding AsyncWait callbacks, due to the need to
keep the stream alive so it can be passed into the callback, which this
helps avoid.

Previously leaks were largely avoided due to the call to `Close()`
cancelling the callbacks for us, however not all callsites specify to
close the source/sink.

This should also help avoid an unnecessary dispatch after the copy
completes due to our AsyncWait callback being invoked when the
source/sink stream is closed.

Differential Revision: https://phabricator.services.mozilla.com/D146130
2022-05-13 14:16:16 +00:00
Nika Layzell b3b52935aa Bug 1696894 - Clear active logins after browser_post_auth.js, r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142127
2022-05-13 14:16:14 +00:00
Nika Layzell 6556d0e4eb Bug 1754004 - Part 13: Relax interface check in nsHttpTransaction, r=necko-reviewers,kershaw
Previously, the check when reporting progress from a nsHttpTransaction would
always report no progress when a non-seekable input stream is used as the
request data stream. Before Part 5, we incorrectly always reported the
nsBufferedStream which we wrap request streams with as seekable, meaning that
this check would pass and the progress reporting would work.

This change relaxes the check to instead check for nsITellableStream which is
actually guaranteed by the nsBufferedStream wrapper, and provides the Tell
method being used.

Differential Revision: https://phabricator.services.mozilla.com/D144450
2022-05-13 14:16:14 +00:00
Nika Layzell b0d3c502e9 Bug 1754004 - Part 12: Update browser_post_auth.js assertions, r=necko-reviewers,kershaw
Previously this test was failing due to issues with upload streams not
being seekable. With the other changes in this bug, we now always
ensure that upload streams are consistently cloneable and seekable,
meaning that this issue should no longer occur, and we don't need to
re-start the request for it to succeed.

I also removed various pieces of dead code, as well as some logic
disabling bfcacheInParent, as that seems to no longer be required.

Differential Revision: https://phabricator.services.mozilla.com/D141777
2022-05-13 14:16:13 +00:00
Nika Layzell 1aa11ffed6 Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-13 14:16:13 +00:00
Nika Layzell 33c017ff93 Bug 1754004 - Part 9: Remove PartiallySeekableInputStream, r=asuth,necko-reviewers,kershaw
This interface is misleading, as it doesn't allow seeking the entire type
despite providing a `nsISeekableStream` interface, and is no longer necessary
due to the changes in an earlier part.

Differential Revision: https://phabricator.services.mozilla.com/D141046
2022-05-13 14:16:12 +00:00
Nika Layzell 89567e0ee9 Bug 1754004 - Part 8: Remove SeekableStreamWrapper, r=asuth,necko-reviewers,kershaw
This type is no longer necessary, and has various issues due to behaving
incorrectly when used with async streams or streams which are not nsIPipe.

Differential Revision: https://phabricator.services.mozilla.com/D141045
2022-05-13 14:16:12 +00:00
Nika Layzell 76b98a65e4 Bug 1754004 - Part 7: Consistently normalize upload streams passed to HTTP channels, r=asuth,necko-reviewers,dragana
Unfortunately, upload streams used by necko have various odd behaviours
and requirements which happened to be usually preserved by the previous
IPC serialization logic, but were not consistently preserved. This
includes requiring the stream to be synchronous (as some consumers such
as WebExtensions and DevTools appear to read it assuming Available() is
the stream length), seekable (as it needs to be rewound in various
places), and cloneable (as the stream information is often handed out to
other components).

In addition, the WebExtension WebRequest code makes assumptions about
the specific topology of the input stream for optimization purposes,
meaning that nsMultiplexInputStreams need to be preserved.

The way this was previously handled was by copying the entire payload
into a nsStorageStream as an async operation. This happened very
infrequently in out test suite, however, and had some issues. It could
lead to data loss if the stream was a nsMIMEInputStream (as the metadata
would be lost), and would destroy the topology required by WebRequest.

This patch changes the code to instead manually walk and replace streams
in the input stream's data structure, to efficiently copy only the
required data, preserve the invariants, and make the type seekable
before AsyncOpen continues. This helps keep the complexity of the
invariants HTTPChannel depends on out of generic input stream handling
code.

In addition, due to how early this happens, it replaces the need for
PartiallySeekableInputStream which will be removed a later part.

Differential Revision: https://phabricator.services.mozilla.com/D141044
2022-05-13 14:16:11 +00:00
Nika Layzell 2f75f0a9bd Bug 1754004 - Part 5: Only implement nsISeekableStream on nsBufferedStreams if it's implemented by the underlying stream, r=asuth,necko-reviewers,dragana
Previously, nsBufferedStreams would always implement nsISeekableStream, whether
or not the underlying stream did, and would only fail when trying to seek. This
makes it much more difficult to compensate and correctly transform streams when
they need to be seekable.

Differential Revision: https://phabricator.services.mozilla.com/D141042
2022-05-13 14:16:10 +00:00
Nika Layzell 0dbdab7c49 Bug 1754004 - Part 4: Stop requiring nsMIMEInputStream to be seekable, r=asuth,necko-reviewers,dragana
This type was originally made to be required to be seekable because a
non-seekable stream would lose the nsMIMEInputStream metadata information when
it was wrapped by the HTTP channel using PartiallySeekableInputStream, leading
to potential bugs.

Changes in a later part will change HTTP channel wrapping to ensure that this
metadata is preserved in all relevant cases, so this requirement can be
relaxed. This is important, as the check was previously being bypassed for
RemoteLazyInputStream in the content process, as nsBufferedInputStream would
incorrectly report that it implemented nsISeekableStream even if the underlying
stream wasn't seekable.

Differential Revision: https://phabricator.services.mozilla.com/D141041
2022-05-13 14:16:10 +00:00
Nika Layzell 95a883d65d Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-13 14:16:10 +00:00
Nika Layzell 2b307c5cea Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-13 14:16:09 +00:00
Nika Layzell ef3794b3c5 Bug 1754004 - Part 1: Switch IPCStream to use DataPipe instead of P{ChildToParent,ParentToChild}Stream, r=asuth,necko-reviewers,kershaw
This gives us various positive benefits, such as using a shared memory ring
buffer for faster communication, not having data streaming being bound to the
thread which transferred the nsIInputStream (which is often the main thread),
and the ability for some backpressure to be applied to data streaming.

After this change, the "delayed start" parameter for IPCStream serialization is
less relevant, as backpressure will serve a similar purpose. It will still be
used to determine whether or not to use RemoteLazyInputStream when serializing
from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D141038
2022-05-13 14:16:09 +00:00
Nika Layzell 7fb91b57a3 Bug 1759563 - Add SerializedComplexity to limit the complexity of serialized IPCStream instances, r=asuth,necko-reviewers,dragana
This will improve the efficiency of serializing large data pipes, which in bad
cases can end up serializing very small amounts of data in individual pipes
over IPC, and acts as a compliment to the existing logic for limiting
serialized message sizes. It is also necessary for the changes in bug 1754004,
which require the ability to include FileDescriptor inline in the message,
which could blow out our FileDescriptor count limits if pipe creation was
unlimited.

In some tests, this change reduces the number of pipes required to serialize a
nsIInputStream from over 5000 to 1.

Differential Revision: https://phabricator.services.mozilla.com/D141036
2022-05-13 14:16:08 +00:00
Nika Layzell a906eaf6b2 Bug 1754031 - AsyncWait implementations should support updating flags on an existing listener, r=asuth,necko-reviewers,dragana
This operation is often performed by nsAStreamCopier when switching
between the source and sink streams, in order to enable or disable the
WAIT_CLOSURE_ONLY flag. Failing to reset the wait flags can lead to a
NS_AsyncCopy hanging until the source or sink are closed when is
alternating between waiting on input and output streams. This patch
relaxes the incorrect checks on various input streams.

Differential Revision: https://phabricator.services.mozilla.com/D141034
2022-05-13 14:16:07 +00:00
Bogdan Szekely 659aec3f84 Merge mozilla-central to autoland. CLOSED TREE 2022-05-13 12:38:20 +03:00
Bogdan Szekely f2c042e0e7 Merge autoland to mozilla-central. a=merge 2022-05-13 12:34:36 +03:00
Kagami Sascha Rosylight 8209aad0db Bug 1767997 - Apply readability-make-member-function-const on dom/network r=andi
Differential Revision: https://phabricator.services.mozilla.com/D145625
2022-05-13 05:35:25 +00:00
Nika Layzell b8bbcfbc33 Bug 1769124 - Require Recv methods to return IPCResult, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D146243
2022-05-13 02:20:23 +00:00
Dana Keeler fb67326470 Bug 1768047 - introduce HMAC C++ helper and remove nsICryptoHMAC r=jschanck,necko-reviewers,kershaw,padenot
This patch removes the redundant nsICryptoHMAC interface and implementation,
updates front-end code to use WebCrypto, and changes back-end code to use the
helper class HMAC introduced by this patch.

This also removes the last uses of nsIKeyObject and nsIKeyObjectFactory, and
thus those interfaces and implementations as well.

Differential Revision: https://phabricator.services.mozilla.com/D145656
2022-05-12 22:24:29 +00:00
Randell Jesup 39e3372695 Bug 1207753 - netwerk/dns thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130580
2022-05-12 21:55:01 +00:00
Randell Jesup 8da8a144a5 Bug 1207753 - netwerk thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130584
2022-05-12 21:53:12 +00:00
Randell Jesup 46292cae55 Bug 1207753 - security/manager thread-safety annotations r=keeler,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D131879
2022-05-12 21:16:11 +00:00
Manuel Bucher d9951694c2 Bug 1753730 - Test that the cached image from the early hint preload is used r=necko-reviewers,ckerschb,dragana,kershaw
* Test that the preloaded image is actually used and that no preload requests
  are made if the resource shouldn't be preloaded

Differential Revision: https://phabricator.services.mozilla.com/D139740
2022-05-11 15:41:39 +00:00
Manuel Bucher b01d289292 Bug 1753730 - Add EarlyHintPreloader to load 103 Early Hint responses into the cache r=necko-reviewers,ckerschb,dragana,kershaw
Currently only same origin requests are preloaded and preloads in the
secure context. This may change in the future to match W3C decisions and
Chromes behavior.

Also only images get preloaded. This will change in the future to cover
asset types.

Currently the anchor isn't parsed correctly yet[1], so this will be
fixed in a future patch.

On non-2xx responses of the main document all ongoing preloads get
canceled. Already completed preloads don't get affected and are in the
cache.

It is currently untested whether unused preloads don't have side effects.

Another future patch should cover adding the preload to the devtools.

[1]: https://datatracker.ietf.org/doc/html/rfc8288#section-3.2

Differential Revision: https://phabricator.services.mozilla.com/D137885
2022-05-11 15:41:39 +00:00
Manuel Bucher 318581f7cb Bug 1753730 - Fix early hint not propagating with http proxy r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141760
2022-05-11 15:41:38 +00:00
Noemi Erli 45276205df Backed out 22 changesets (bug 1696894, bug 1759569, bug 1754031, bug 1759563, bug 1759572, bug 1754004) for causing leack failures CLOSED TREE
Backed out changeset 673ecd5337e1 (bug 1754004)
Backed out changeset ecbf5f3c51de (bug 1754004)
Backed out changeset fc6c39f56d21 (bug 1754004)
Backed out changeset 5b3d58fbaf9d (bug 1696894)
Backed out changeset 2e56c89cf55d (bug 1754004)
Backed out changeset b7723490f025 (bug 1754004)
Backed out changeset 1dfbf61ff5dd (bug 1754004)
Backed out changeset e73abb071bb3 (bug 1754004)
Backed out changeset f9abe4fbf501 (bug 1754004)
Backed out changeset ee7aeb631cd9 (bug 1754004)
Backed out changeset d66aacfcf983 (bug 1754004)
Backed out changeset 5c2872ad6912 (bug 1754004)
Backed out changeset e1ae48f30d2c (bug 1754004)
Backed out changeset 849b63707d7f (bug 1754004)
Backed out changeset 36563e3b1e04 (bug 1754004)
Backed out changeset ccb4be659107 (bug 1754004)
Backed out changeset 659581d4159b (bug 1754004)
Backed out changeset 611ea76d7a9c (bug 1754004)
Backed out changeset 9b24b561698c (bug 1759572)
Backed out changeset f820e0f209ff (bug 1759563)
Backed out changeset 8d82066fa181 (bug 1759569)
Backed out changeset a2835afab1ad (bug 1754031)
2022-05-11 06:16:25 +03:00
Cristian Tuns 23517e3d2b Backed out 3 changesets (bug 1758745, bug 1758740, bug 1762462) for causing mochitest failures on test_storagePermissionsAccept.html CLOSED TREE
Backed out changeset fa222c0a9a26 (bug 1762462)
Backed out changeset 9daa04b239f9 (bug 1758745)
Backed out changeset c18aecb431c0 (bug 1758740)
2022-05-10 20:12:45 -04:00
Nika Layzell 05a9855755 Bug 1696894 - Clear active logins after browser_post_auth.js, r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142127
2022-05-10 22:27:47 +00:00
Nika Layzell 94e20acc6a Bug 1754004 - Part 13: Relax interface check in nsHttpTransaction, r=necko-reviewers,kershaw
Previously, the check when reporting progress from a nsHttpTransaction would
always report no progress when a non-seekable input stream is used as the
request data stream. Before Part 5, we incorrectly always reported the
nsBufferedStream which we wrap request streams with as seekable, meaning that
this check would pass and the progress reporting would work.

This change relaxes the check to instead check for nsITellableStream which is
actually guaranteed by the nsBufferedStream wrapper, and provides the Tell
method being used.

Differential Revision: https://phabricator.services.mozilla.com/D144450
2022-05-10 22:27:47 +00:00
Nika Layzell 7e0bd4473f Bug 1754004 - Part 12: Update browser_post_auth.js assertions, r=necko-reviewers,kershaw
Previously this test was failing due to issues with upload streams not
being seekable. With the other changes in this bug, we now always
ensure that upload streams are consistently cloneable and seekable,
meaning that this issue should no longer occur, and we don't need to
re-start the request for it to succeed.

I also removed various pieces of dead code, as well as some logic
disabling bfcacheInParent, as that seems to no longer be required.

Differential Revision: https://phabricator.services.mozilla.com/D141777
2022-05-10 22:27:46 +00:00
Nika Layzell 024c6e0c0a Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-10 22:27:46 +00:00
Nika Layzell 8d59d55b57 Bug 1754004 - Part 9: Remove PartiallySeekableInputStream, r=asuth,necko-reviewers,kershaw
This interface is misleading, as it doesn't allow seeking the entire type
despite providing a `nsISeekableStream` interface, and is no longer necessary
due to the changes in an earlier part.

Differential Revision: https://phabricator.services.mozilla.com/D141046
2022-05-10 22:27:45 +00:00
Nika Layzell a520c86f48 Bug 1754004 - Part 8: Remove SeekableStreamWrapper, r=asuth,necko-reviewers,kershaw
This type is no longer necessary, and has various issues due to behaving
incorrectly when used with async streams or streams which are not nsIPipe.

Differential Revision: https://phabricator.services.mozilla.com/D141045
2022-05-10 22:27:44 +00:00
Nika Layzell 873f2d6175 Bug 1754004 - Part 7: Consistently normalize upload streams passed to HTTP channels, r=asuth,necko-reviewers,dragana
Unfortunately, upload streams used by necko have various odd behaviours
and requirements which happened to be usually preserved by the previous
IPC serialization logic, but were not consistently preserved. This
includes requiring the stream to be synchronous (as some consumers such
as WebExtensions and DevTools appear to read it assuming Available() is
the stream length), seekable (as it needs to be rewound in various
places), and cloneable (as the stream information is often handed out to
other components).

In addition, the WebExtension WebRequest code makes assumptions about
the specific topology of the input stream for optimization purposes,
meaning that nsMultiplexInputStreams need to be preserved.

The way this was previously handled was by copying the entire payload
into a nsStorageStream as an async operation. This happened very
infrequently in out test suite, however, and had some issues. It could
lead to data loss if the stream was a nsMIMEInputStream (as the metadata
would be lost), and would destroy the topology required by WebRequest.

This patch changes the code to instead manually walk and replace streams
in the input stream's data structure, to efficiently copy only the
required data, preserve the invariants, and make the type seekable
before AsyncOpen continues. This helps keep the complexity of the
invariants HTTPChannel depends on out of generic input stream handling
code.

In addition, due to how early this happens, it replaces the need for
PartiallySeekableInputStream which will be removed a later part.

Differential Revision: https://phabricator.services.mozilla.com/D141044
2022-05-10 22:27:44 +00:00
Nika Layzell 828491c5f2 Bug 1754004 - Part 5: Only implement nsISeekableStream on nsBufferedStreams if it's implemented by the underlying stream, r=asuth,necko-reviewers,dragana
Previously, nsBufferedStreams would always implement nsISeekableStream, whether
or not the underlying stream did, and would only fail when trying to seek. This
makes it much more difficult to compensate and correctly transform streams when
they need to be seekable.

Differential Revision: https://phabricator.services.mozilla.com/D141042
2022-05-10 22:27:43 +00:00
Nika Layzell a54be9b854 Bug 1754004 - Part 4: Stop requiring nsMIMEInputStream to be seekable, r=asuth,necko-reviewers,dragana
This type was originally made to be required to be seekable because a
non-seekable stream would lose the nsMIMEInputStream metadata information when
it was wrapped by the HTTP channel using PartiallySeekableInputStream, leading
to potential bugs.

Changes in a later part will change HTTP channel wrapping to ensure that this
metadata is preserved in all relevant cases, so this requirement can be
relaxed. This is important, as the check was previously being bypassed for
RemoteLazyInputStream in the content process, as nsBufferedInputStream would
incorrectly report that it implemented nsISeekableStream even if the underlying
stream wasn't seekable.

Differential Revision: https://phabricator.services.mozilla.com/D141041
2022-05-10 22:27:43 +00:00
Nika Layzell 76cdaba44a Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-10 22:27:42 +00:00
Nika Layzell 728ba534f6 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-10 22:27:42 +00:00
Nika Layzell f9f3cc6138 Bug 1754004 - Part 1: Switch IPCStream to use DataPipe instead of P{ChildToParent,ParentToChild}Stream, r=asuth,necko-reviewers,kershaw
This gives us various positive benefits, such as using a shared memory ring
buffer for faster communication, not having data streaming being bound to the
thread which transferred the nsIInputStream (which is often the main thread),
and the ability for some backpressure to be applied to data streaming.

After this change, the "delayed start" parameter for IPCStream serialization is
less relevant, as backpressure will serve a similar purpose. It will still be
used to determine whether or not to use RemoteLazyInputStream when serializing
from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D141038
2022-05-10 22:27:41 +00:00
Nika Layzell 7aead901b8 Bug 1759563 - Add SerializedComplexity to limit the complexity of serialized IPCStream instances, r=asuth,necko-reviewers,dragana
This will improve the efficiency of serializing large data pipes, which in bad
cases can end up serializing very small amounts of data in individual pipes
over IPC, and acts as a compliment to the existing logic for limiting
serialized message sizes. It is also necessary for the changes in bug 1754004,
which require the ability to include FileDescriptor inline in the message,
which could blow out our FileDescriptor count limits if pipe creation was
unlimited.

In some tests, this change reduces the number of pipes required to serialize a
nsIInputStream from over 5000 to 1.

Differential Revision: https://phabricator.services.mozilla.com/D141036
2022-05-10 22:27:41 +00:00
Nika Layzell 52ee800295 Bug 1754031 - AsyncWait implementations should support updating flags on an existing listener, r=asuth,necko-reviewers,dragana
This operation is often performed by nsAStreamCopier when switching
between the source and sink streams, in order to enable or disable the
WAIT_CLOSURE_ONLY flag. Failing to reset the wait flags can lead to a
NS_AsyncCopy hanging until the source or sink are closed when is
alternating between waiting on input and output streams. This patch
relaxes the incorrect checks on various input streams.

Differential Revision: https://phabricator.services.mozilla.com/D141034
2022-05-10 22:27:40 +00:00