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

23549 Коммитов

Автор SHA1 Сообщение Дата
Tom Ritter a77e0fbeb2 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-20 20:21:43 +00:00
Tom Ritter f0860a2493 Bug 1752332: Add a sanitized property to prefs r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D141408
2022-04-20 20:21:42 +00:00
Cristian Tuns 6e25a12cb7 Backed out 16 changesets (bug 1752332) for causing multiple failures on StaticPrefList_media.h
Backed out changeset ec6a5f016318 (bug 1752332)
Backed out changeset 10ac6886fa5e (bug 1752332)
Backed out changeset d37dec5c0d9e (bug 1752332)
Backed out changeset 258d19fe4e28 (bug 1752332)
Backed out changeset 52f6b46250a3 (bug 1752332)
Backed out changeset ab5c00d2fb02 (bug 1752332)
Backed out changeset d72dc14eeafd (bug 1752332)
Backed out changeset 061cdf612d0e (bug 1752332)
Backed out changeset 26707a82d896 (bug 1752332)
Backed out changeset 01ca344dedbf (bug 1752332)
Backed out changeset 22c6c04046b1 (bug 1752332)
Backed out changeset ce809df435e1 (bug 1752332)
Backed out changeset 185026a397b0 (bug 1752332)
Backed out changeset 9dfd530f26b8 (bug 1752332)
Backed out changeset deadcb975866 (bug 1752332)
Backed out changeset 4944ae34f15b (bug 1752332)
2022-04-20 13:10:55 -04:00
Tom Ritter ab308fb14f Bug 1752332: Remove the shouldSanitizeFunction member r=KrisWright
In the following patch we are going to change the signature of
ShouldSanitizePreference to take a Pref object.  Pref is only
known to the Preferences compilation unit; so to keep this member
(whose signature will change) we would need to expose the Pref
class. However it will only be a forward declaration, one could
not construct a Pref object in e.g. the gtest.

It is simpler to just remove the member entirely and call
ShouldSanitizePreference unconditionally - the member was only
used for the gtest, and while the gtest will be less robust
because of this change, it will still do some testing.

Depends on D141419

Differential Revision: https://phabricator.services.mozilla.com/D141420
2022-04-20 15:44:40 +00:00
Tom Ritter 696098706b Bug 1752332: Make SerializePreferences correctly sanitize preferences r=KrisWright,necko-reviewers,dragana
To do the correct thing in Preferences::SerializePreferences
(which is used during subprocess startup) we need to know if
the destination process is a web content process or not.
We add parameters to
SharedPreferenceSerializer::SerializeToSharedMemory that let
us figure that out.

In Preferences::SerializePreferences we fix the call to
aShouldSanitizeFn to pass the correct destination.

Depends on D141415

Differential Revision: https://phabricator.services.mozilla.com/D141416
2022-04-20 15:44:39 +00:00
Tom Ritter c674d31eba Bug 1752332: Correctly populate the sanitized bit for PreferenceUpdate r=KrisWright
PreferenceUpdate is the IPC message notifying a child process
that a preference has been updated. To correctly decide whether
or not a value should be sanitized in it, we need to know
what type of destination process it is; we add parameters to
Preferences::GetPreference indicating that.

Inside of ToDomPref we call ShouldSanitizePreference to
correctly populate the sanitized bit.

Depends on D141412

Differential Revision: https://phabricator.services.mozilla.com/D141413
2022-04-20 15:44:38 +00:00
Tom Ritter d9fb7a4c74 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=KrisWright
This simplifies the number of negations needed,
and makes things easy to understand. I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Depends on D141411

Differential Revision: https://phabricator.services.mozilla.com/D141412
2022-04-20 15:44:37 +00:00
Tom Ritter 288e606baf Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
Depends on D141409

Differential Revision: https://phabricator.services.mozilla.com/D141410
2022-04-20 15:44:37 +00:00
Tom Ritter 30221b51c4 Bug 1752332: Add a sanitized property to prefs r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D141408
2022-04-20 15:44:36 +00:00
Mathieu Leplatre e5519cc11b Bug 1634127 - Download attachments in IndexedDB by default r=necko-reviewers,robwu,dragana
This patch changes the default behaviour of `download()`.

- Previous file-based behaviour was moved to `downloadToDisk()` and `deleteFromDisk()`. Existing consumers were migrated to avoid behaviour change.
- `download()` has now `{useCache: true}` by default, option was dropped, and `deleteCached()` is now `deleteDownloaded()`

Differential Revision: https://phabricator.services.mozilla.com/D141980
2022-04-20 13:07:50 +00:00
Timothy Nikkel 80de23271a Bug 1765111. Silence spammy warning in netwerk/url-classifier/UrlClassifierCommon.cpp. r=dimi
Depends on D143889

Differential Revision: https://phabricator.services.mozilla.com/D143890
2022-04-18 22:43:29 +00:00
ffxbld 4d04e703d2 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D143907
2022-04-18 12:07:42 +00:00
Karl Tomlinson c3bed63ebb Bug 1764504 Remove obsolete comments about inadequacy of LoadTainting r=ckerschb,necko-reviewers,dragana DONTBUILD
tainting has been set with AsyncOpen2() since
https://hg.mozilla.org/integration/mozilla-inbound/rev/989bbde310f5#l6.74
and AsyncOpen() was removed for
https://bugzilla.mozilla.org/show_bug.cgi?id=1520868

The advice about checking final URL and CORS mode is misleading because the
URL and CORS mode of an nsIHttpChannelInternal will reflect the URL and CORS
mode of the request, which may differ from those of a
ServiceWorker-synthesized Response, with null URL for example.

Differential Revision: https://phabricator.services.mozilla.com/D143563
2022-04-16 04:58:36 +00:00
ffxbld af69886f69 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D143703
2022-04-14 12:46:50 +00:00
Nika Layzell 4fccdde58f Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal
The TEST_CASE_P macros are deprecated in newer versions of gtest.

Differential Revision: https://phabricator.services.mozilla.com/D142612
2022-04-14 02:09:22 +00:00
june wilde 600ce18f08 Bug 1715785 - Trim redirect chain of excess information; r=necko-reviewers,ckerschb,tjr,dragana
Differential Revision: https://phabricator.services.mozilla.com/D136885
2022-04-13 13:33:49 +00:00
Marian-Vasile Laza 4d42714957 Backed out changeset c43b947f03b0 (bug 1634127) for causing newtab failures. CLOSED TREE 2022-04-12 05:29:27 -07:00
Mathieu Leplatre 1dec4a6bda Bug 1634127 - Download attachments in IndexedDB by default r=necko-reviewers,robwu,dragana
This patch changes the default behaviour of `download()`.

- Previous file-based behaviour was moved to `downloadToDisk()` and `deleteFromDisk()`. Existing consumers were migrated to avoid behaviour change.
- `download()` has now `{useCache: true}` by default, option was dropped, and `deleteCached()` is now `deleteDownloaded()`

Differential Revision: https://phabricator.services.mozilla.com/D141980
2022-04-12 10:50:47 +00:00
ffxbld ed0b2fca21 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D143149
2022-04-07 13:20:44 +00:00
Chris Peterson 7ed9829302 Bug 1763310 - Report ARM64 Windows 11+ as "x86_64" (and continue to report Windows 10 as "x86"). r=hsivonen,necko-reviewers,dragana
Windows 11+ supports x86_64 emulation, but Windows 10 only supports x86 emulation.

Advantages of reporting ARM64 Windows 11+ as x86_64:

* Sites that offer software downloads will know that the client is capable of running x86_64 software.

* Reduced fingerprinting entropy because ARM64 Windows 11+ users' UA string will match the UA string of the ~80% of Windows Firefox users running x86_64 instead of the ~20% running x86.

* Some sites disable features for 32-bit clients, such as Google Meet requiring 64-bit to use wasm visual effects:

https://github.com/WICG/ua-client-hints/issues/217#issuecomment-878537336

https://support.google.com/meet/answer/10058482?expand_all_zippies=true#requirements&zippy=%2Cwhy-cant-i-use-the-change-background-option%2Crequirements-to-apply-visual-effects-on-computer

The browser_navigator.js test is not actually run on ARM64 Windows in automation, but these test changes would make the test pass on ARM64 Windows 10 and 11 if this test ever is run.

Differential Revision: https://phabricator.services.mozilla.com/D143010
2022-04-07 01:43:20 +00:00
Molnar Sandor 9d544b1925 Backed out changeset 9cc08c2f20be (bug 239460) for causing build bustage. CLOSED TREE 2022-04-07 03:02:28 +03:00
Nika Layzell 2b2d7891c1 Bug 239460 - Specify types for XPIDL consts in C++, r=xpcom-reviewers,mccr8
Before this change, all XPIDL constants were declared using an anonymous
`enum` rather than using a static constant. This change makes the
generated code more consistent with what is done in languages like Rust.

Some small changes were needed due to signed/unsigned comparison
warnings which were previously silent.

Differential Revision: https://phabricator.services.mozilla.com/D143090
2022-04-06 23:40:47 +00:00
Cosmin Sabou 97d21fa167 Backed out 5 changesets (bug 1761511) for causing build bustages. CLOSED TREE
Backed out changeset 687de8c00013 (bug 1761511)
Backed out changeset 88e6cf5c70e5 (bug 1761511)
Backed out changeset 4c40758f54f1 (bug 1761511)
Backed out changeset 8a18abcccda4 (bug 1761511)
Backed out changeset 1afb1f32a6a4 (bug 1761511)
2022-04-07 00:13:00 +03:00
Nika Layzell f1c3a8f87c Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal
The TEST_CASE_P macros are deprecated in newer versions of gtest.

Differential Revision: https://phabricator.services.mozilla.com/D142612
2022-04-06 20:45:08 +00:00
Dana Keeler 6502ebf4b6 Bug 1608307 - remove redundant flags parameters from nsISiteSecurityService r=jschanck,necko-reviewers,kershaw
Before this patch, nsISiteSecurityService APIs took "flags" parameters that
differentiated private contexts from not private contexts. However, these
parameters were redundant with respect to origin attributes, which led to some
confusion for consumers of these APIs. This patch removes these parameters in
favor of using origin attributes.

Differential Revision: https://phabricator.services.mozilla.com/D142901
2022-04-06 17:37:23 +00:00
Kershaw Chang 87ce1ca8c2 Bug 1754744 - isolating TLS handshake code, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141093
2022-04-06 12:21:01 +00:00
Jan Rio Krause 057785b6d5 Bug 1519200 - Remove `NS_ERROR_FILE_TARGET_DOES_NOT_EXIST` in favor of `NS_ERROR_FILE_NOT_FOUND`. r=xpcom-reviewers,nika,dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D77575
2022-04-05 15:17:03 +00:00
Mark Banner aa2d0d6c32 Bug 1761274 - Tell ESlint about the sjs environment to avoid unnecessary no-undef warnings. r=Gijs,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142844
2022-04-05 09:20:01 +00:00
Frederik Braun 30ca834b74 Bug 1752475 - Change nsICookie/CookieStruct to implicitly flip SameSite in getter func r=dveditz,dragana,freddyb
Given that we only support samesite lax/strict/none in our storage schema,
it's useful to introduce a default value, as required by the spec.
However, that would it hard to distinguish between none/lax when we switch
the default.
So, instead of doing that we use the peculiarities of our current schema
to our advantage: There's a "sameSite" attribute and a "rawSameSite"
attribute, where the latter is the literal value we received from the
server. With this patch, we'll interpret the "sameSite" attribute
based on the laxByDefault pref. This also has the advantage that various
front-end code (e.g., in DevTools) is always reading the "sameSite"
value of nsICookies.

Differential Revision: https://phabricator.services.mozilla.com/D137460
2022-04-05 08:20:25 +00:00
ffxbld 60c112e758 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D142811
2022-04-04 18:15:12 +00:00
Jonathan Watt 82ca8925d2 Bug 1757657. Remove some about:printpreview cruft that was missed in 1702501. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D139993
2022-04-04 17:19:24 +00:00
Manuel Bucher 09b6c321e4 Bug 1761242 - Make link asset parsing accessible in nsNetUtils.h r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142053
2022-04-01 13:45:20 +00:00
Manuel Bucher dc5bb9ccbc Bug 1762156 - Move LinkHeader parsing to mozilla::net namespace in nsNetUtil.h r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142461
2022-04-01 13:45:20 +00:00
Emilio Cobos Álvarez 6dc370ab2b Bug 1761512 - Remove unneeded special case in nsDataHandler::CreateNewURI. r=dragana,necko-reviewers
NS_NewURI (its only caller) deals with this generically in:

  https://searchfox.org/mozilla-central/rev/3f782c2587124923a37c750b88c5a40108077057/netwerk/base/nsNetUtil.cpp#1832

Differential Revision: https://phabricator.services.mozilla.com/D142099
2022-04-01 11:46:11 +00:00
Kagami Sascha Rosylight 1e83450022 Bug 1635428 - Part 1: Move mozilla::IsDevelopmentBuild to Omnijar.h r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D142569
2022-03-31 23:36:25 +00:00
criss ea772f6e4b Backed out changeset 3cef8943e0c6 (bug 1635428) for causing build bustages on nsMacUtilsImpl.cpp. CLOSED TREE 2022-04-01 01:39:33 +03:00
Kagami Sascha Rosylight 7913ea573c Bug 1635428 - Part 1: Move mozilla::IsDevelopmentBuild to Omnijar.h r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D142569
2022-03-31 22:05:55 +00:00
Tim Huang 491c607938 Bug 1727301 - Part 2: The disallowing less restricted referrer policy can be disabled by ETP toggle. r=ckerschb,pbz,smaug
This patch implements that the referrer protection can be disabled by
the ETP toggle. When ETP is toggled off, it will stop the protection for
iframe and sub-resource loads. Also, it will stop the protection for a
loading to a site that has ETP disabled.

This patch also makes
CookieJarSettings::UpdateIsOnContentBlockingAllowList() be more
efficient when calling it multiple times.

Differential Revision: https://phabricator.services.mozilla.com/D142249
2022-03-30 19:45:29 +00:00
Gijs Kruitbosch 8e67201171 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
edguloien 002514a242 Bug 1754179 - log stack of cancelled request in parent process. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D141403
2022-03-30 12:40:36 +00:00
Norisz Fay acdd6851cd Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch 27039e2946 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Csoregi Natalia 99b98ae493 Backed out changeset 0acc23548adf (bug 1752475) for causing multiple cookies failures. CLOSED TREE 2022-03-30 01:31:06 +03:00
Frederik Braun ea88fe841f Bug 1752475 - Change nsICookie/CookieStruct to implicitly flip SameSite in getter func r=dveditz,dragana
Given that we only support samesite lax/strict/none in our storage schema,
it's useful to introduce a default value, as required by the spec.
However, that would it hard to distinguish between none/lax when we switch
the default.
So, instead of doing that we use the peculiarities of our current schema
to our advantage: There's a "sameSite" attribute and a "rawSameSite"
attribute, where the latter is the literal value we received from the
server. With this patch, we'll interpret the "sameSite" attribute
based on the laxByDefault pref. This also has the advantage that various
front-end code (e.g., in DevTools) is always reading the "sameSite"
value of nsICookies.

Differential Revision: https://phabricator.services.mozilla.com/D137460
2022-03-29 20:16:36 +00:00
Ryan VanderMeulen 3f0a4de9da Bug 1761558 - Enable test_http_408_retry.js on Android. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142137
2022-03-29 13:55:58 +00:00
Norisz Fay 5b15f799e4 Backed out changeset a7b879827137 (bug 1754744) for causing build bustages on Unified_cpp_protocol_http4.obj CLOSED TREE 2022-03-29 13:15:13 +03:00
Kershaw Chang dc33837cad Bug 1754744 - isolating TLS handshake code, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141093
2022-03-29 08:02:30 +00:00
Butkovits Atila 484694781e Backed out changeset 36943e34018f (bug 1754744) for causing bustages at TlsHandshaker.cpp. CLOSED TREE 2022-03-28 20:11:45 +03:00
Kershaw Chang 7d183035e3 Bug 1754744 - isolating TLS handshake code, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141093
2022-03-28 15:27:27 +00:00
Randell Jesup b012e973e6 Bug 1207753 - DataChannel thread-annotations r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D130583
2022-03-28 14:27:49 +00:00
ffxbld 24f567753c No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D142198
2022-03-28 13:03:48 +00:00
Randell Jesup d84209dc54 Bug 1760660 - WebSocketChannel thread-safety annotations r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D141673
2022-03-25 15:37:49 +00:00
Kershaw Chang f63cffee0e Bug 1755902 - P2: Support port-prefixed query for HTTPS RR, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141718
2022-03-25 12:15:03 +00:00
Kershaw Chang 974130bad4 Bug 1755902 - P1: Rename nsIDNSResolverInfo to nsIDNSAdditionalInfo and add port, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141717
2022-03-25 12:15:03 +00:00
ffxbld f222aa0e79 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D141952
2022-03-24 12:55:16 +00:00
Dragana Damjanovic f22292d0e4 Bug 1755767 - Make sure not to call HandshakeDone after Close() is calleed r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D141957
2022-03-24 12:35:37 +00:00
Nika Layzell 5b2ada26c5 Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright
Tasks registered with shutdown tasks are called when the target
nsISerialEventTarget is about to be destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D129840
2022-03-23 22:22:04 +00:00
Nika Layzell dedb92d85b Bug 1738103 - Part 3: DelayedRunnable should only be used with nsISerialEventTarget, r=necko-reviewers,valentin
The existing behaviour of the code is not fully compatible with nsIEventTarget.

Differential Revision: https://phabricator.services.mozilla.com/D129839
2022-03-23 22:22:03 +00:00
Randell Jesup 0aff7d9a80 Bug 1207753 - InputStreamPump thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141610
2022-03-23 14:56:55 +00:00
Randell Jesup a6b5ab7c64 Bug 1207753 - nsHttpConnectionMgr thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141611
2022-03-23 14:56:01 +00:00
Randell Jesup 5a58ff7cd5 Bug 1207753 - netwerk nsWifiMonitor thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141627
2022-03-23 14:55:16 +00:00
Randell Jesup 6bdb0bdcc5 Bug 1760652 - netwerk AsyncStreamCopier thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141662
2022-03-23 14:54:21 +00:00
Kershaw Chang eba077ec45 Bug 1760894 - Change MOZ_RELEASE_ASSERT back to MOZ_ASSERT, r=necko-reviewers,dragana
This is a wallpaper patch, not a real fix.
This assertion was accidentally changed to `MOZ_RELEASE_ASSERT` in D135727.

Differential Revision: https://phabricator.services.mozilla.com/D141834
2022-03-23 12:20:30 +00:00
Tom Schuster 44e7ca5fb7 Bug 1748693 - Remove unused cookie rejection strings. r=freddyb,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141774
2022-03-23 11:37:20 +00:00
Dragana Damjanovic fb6410005b Bug 1754737 - We do not need to keep info about the use of a tunnel in the state. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D138890
2022-03-23 10:31:32 +00:00
Dragana Damjanovic 956d3cbb91 Bug 1754737 - Add some structure to nsHttpConnection: r=necko-reviewers,kershaw
- nsHttpConnection now has states. Currently only proxy setup phase is added to the states.
- The states are used in nsHttpConnection::OnSocketWritable tto make the code more understandable.
- Some pieces of selfcontained code are extracted from nsHttpConnection::OnHeadersAvailable, i.e. HandleTunnelResponse and HandleWebSocketResponse

Differential Revision: https://phabricator.services.mozilla.com/D138714
2022-03-23 10:31:32 +00:00
smolnar bb7ad20561 Backed out 2 changesets (bug 1754737) for causing linux build bustage in netwerk/protocol/http/nsHttpConnection. CLOSED TREE
Backed out changeset 0377fb241cc9 (bug 1754737)
Backed out changeset 25650cac85f4 (bug 1754737)
2022-03-23 02:55:01 +02:00
Dragana Damjanovic d9363b7eab Bug 1754737 - We do not need to keep info about the use of a tunnel in the state. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D138890
2022-03-22 22:22:24 +00:00
Dragana Damjanovic 3e3e3247b8 Bug 1754737 - Add some structure to nsHttpConnection: r=necko-reviewers,kershaw
- nsHttpConnection now has states. Currently only proxy setup phase is added to the states.
- The states are used in nsHttpConnection::OnSocketWritable tto make the code more understandable.
- Some pieces of selfcontained code are extracted from nsHttpConnection::OnHeadersAvailable, i.e. HandleTunnelResponse and HandleWebSocketResponse

Differential Revision: https://phabricator.services.mozilla.com/D138714
2022-03-22 22:22:24 +00:00
ffxbld 2c8ee764d5 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D141587
2022-03-22 21:16:41 +00:00
Dragana Damjanovic 28ef5588e1 Bug 1752270 - Retry a request that failed with 408 if HTTP/2 is used. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140827
2022-03-22 21:12:21 +00:00
Dragana Damjanovic 44a7f94282 Bug 1752270 - Test for receiving 408 response r=necko-reviewers,kershaw
With H1, the connection is restarted.
With H2 and H3, the channel gets NS_ERROR_ABORT from Http2Session::Shutdown

Differential Revision: https://phabricator.services.mozilla.com/D139395
2022-03-22 21:12:20 +00:00
Randell Jesup 75c2bfd9aa Bug 1760655 - Miscellaneous netwerk thread-safety annotations r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D141665
2022-03-22 13:57:49 +00:00
Randell Jesup a7371f587e Bug 1760657 - nsHttpResponseHead thread-safety annotations r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D141667
2022-03-22 13:57:20 +00:00
Tom Schuster 18d44b2570 Bug 1748693 - Remove unused const.
Differential Revision: https://phabricator.services.mozilla.com/D141723
2022-03-22 10:40:32 +00:00
Frederik Braun 3de5287d4e Bug 1748693 - remove MaybeCompareSchemes(Logging), disable samesite-schemeful for release r=ckerschb,dveditz,dragana
This removes a part of the erroneous scheme-comparison and the logging
that was implemented in those functions. The tests for that logging were
also removed.

Differential Revision: https://phabricator.services.mozilla.com/D136229
2022-03-22 10:09:02 +00:00
Randell Jesup 0ba3cb38b1 Bug 1760647 - nsStreamTransportService thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141656
2022-03-21 21:35:53 +00:00
Csoregi Natalia 97fa1647e9 Bug 1759607 - Fix whitespace linting. r=fix CLOSED TREE 2022-03-21 23:20:20 +02:00
edguloien afac73f41a Bug 1759607 - Added aggregate new-to-necko resources list to fx-src-docs. r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D141049
2022-03-21 20:39:08 +00:00
Randell Jesup d6bda1cd01 Bug 1755847: clean up nsStreamTransportService r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D141655
2022-03-21 20:02:53 +00:00
Randell Jesup c1a193ccd2 Bug 1760649 - HttpChannelChild thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141657
2022-03-21 20:01:42 +00:00
Randell Jesup ffb7ef2b49 Bug 1760651 - nsIOService thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141658
2022-03-21 20:01:21 +00:00
Kagami Sascha Rosylight d6416abbe8 Bug 1759690 - Part 1: Support ErrorResult on ThenWithCycleCollectedArgs r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D141160
2022-03-21 16:45:35 +00:00
Butkovits Atila d07fe98979 Backed out changeset d656b8bf9cd2 for causing Xpcshell failures. CLOSED TREE 2022-03-21 19:35:39 +02:00
ffxbld 3ad2043646 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D141587
2022-03-21 13:45:03 +00:00
Randell Jesup d0030b0877 Bug 1207753: ChannelEventQueue Thread-safety annotations r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D139135
2022-03-19 03:53:39 +00:00
Marian-Vasile Laza 4539e13af2 Backed out 4 changesets (bug 1759690) for causing bustages on ReadableByteStreamController.cpp. CLOSED TREE
Backed out changeset 277201c19ef2 (bug 1759690)
Backed out changeset 809bdffb2aaf (bug 1759690)
Backed out changeset 6c80dea23925 (bug 1759690)
Backed out changeset 34e9e4bf15a4 (bug 1759690)
2022-03-18 09:58:44 -07:00
Kagami Sascha Rosylight 9e17b138ce Bug 1759690 - Part 1: Support ErrorResult on ThenWithCycleCollectedArgs r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D141160
2022-03-18 14:38:23 +00:00
Nick Alexander 52e65cee71 Bug 1675829 - Allow disabling the cookie database in the profile with `network.cookie.noPersistentStorage`. r=baku
Firefox background tasks use a new temporary profile directory for
every invocation.  We would like to write as little data as possible
into the temporary profile directory in this mode.  This patch allows
to make the persistent cookie storage discard cookies just like
private cookie storage.

This approach simply uses that the base `CookieStorage` class is close
to sufficient already.  There may be a performance impact with more
virtual invocations, but none of these functions seem likely to be
hot.

Differential Revision: https://phabricator.services.mozilla.com/D139910
2022-03-18 04:20:02 +00:00
Randell Jesup c5917ed65a Bug 1207753: Basic thread-safety annotations to quiet errors until real annotations land r=nika
Differential Revision: https://phabricator.services.mozilla.com/D141062
2022-03-17 18:39:15 +00:00
Nika Layzell 56e6865c9c Bug 1759609 - Make IPDL typedef generation happen non-recursively, r=ipc-reviewers,mccr8
Before this change, the collection of typedefs to include in IPDL
protocols was being performed in the _DecorateWithCXXStuff pass of
lower.py. This pass iterates over all included headers, including
recursively, so will also visit headers included by headers you import.

The recursive behaviour caused issues because importing and
forward-declaring imported types is non-recursive, looking at exported
types only one layer deep. This could lead to typedefs being generated
in IPDL protocols referencing types which could never be named by the
IPDL code, and which had no definition in c++, leading to build errors.

This patch changes the logic to instead happen during the
_GenerateProtocolActorCode pass of lower.py, which is also where
required forward declarations and imports are handled, allowing us to
keep the set of typedefs generated more tightly in sync with the actual
set of types available to the actor.

This required some changes in client code which was relying on
incorrectly generated typedefs, however these types have now been fixed.

Differential Revision: https://phabricator.services.mozilla.com/D141032
2022-03-17 18:09:36 +00:00
ffxbld 91ea4f78c1 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D141339
2022-03-17 16:33:07 +00:00
Chris Peterson 80561e26dc Bug 1731523 - Part 2: Remove "Firefox 100" Nimbus experiment code. r=necko-reviewers,kershaw
This Nimbus experiment code was added in bug 1719070 to test if sending a "Firefox 100" UA string causes any major webcompat problems.

The moz.build change was added in bug 1724635 to fix a Thunderbird build break. MOZ_BUILD_APP_IS_BROWSER = true when building Firefox, false when building Thunderbird.

Differential Revision: https://phabricator.services.mozilla.com/D126408
2022-03-17 02:18:12 +00:00
Kershaw Chang b1b54e8f25 Bug 1759506 - Avoid crashing if mReservedClientInfo already has something, r=edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D141262
2022-03-16 20:05:59 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
edguloien 889095f70d Bug 1757793 - Simplify http2 prefs code by removing two kinds of http2. r=dragana,necko-reviewers
Depends on D139941

Differential Revision: https://phabricator.services.mozilla.com/D140340
2022-03-15 08:54:02 +00:00
edguloien 7b9d1e2937 Bug 1752621 - Improve http/2 prefs: changing spdy prefs to http2, making them static prefs and updating the tests. r=dragana,necko-reviewers,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D139941
2022-03-15 08:54:01 +00:00
Kershaw Chang 1c3bcc4bc1 Bug 1723866 - Wait until socket process is launched, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D140330
2022-03-14 22:22:27 +00:00
Kershaw Chang ca859523ff Bug 1745972 - Check if CacheIndexRecordWrapper is still in mFrecencyArray, r=necko-reviewers,valentin
The idea in this patch is like D99680, but the difference is that mFrecencyArray now contains CacheIndexRecordWrapper.
This should be able to help us track why CacheIndexRecordWrapper is released before removing it from mFrecencyArray.

Differential Revision: https://phabricator.services.mozilla.com/D139469
2022-03-11 19:40:44 +00:00
Mark Banner 8bb4667fae Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-11 16:41:29 +00:00
Sebastian Hengst c8e4dbde8c Bug 1717629 - disable browser_opaque_response_blocking_telemetry.js for all macOS versions
Differential Revision: https://phabricator.services.mozilla.com/D140831
2022-03-11 12:30:53 +00:00
smolnar fb8877ceea Merge autoland to mozilla-central. a=merge 2022-03-10 19:22:39 +02:00
Dragana Damjanovic bc6036ccab Bug 1754742 - Split TunnelUtils file. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140039
2022-03-10 11:49:09 +00:00
Olli Pettay e9e98dc88b Bug 1757458, replace loading session history entry only right before redirecting load to real channel r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D140559
2022-03-10 10:41:20 +00:00
smolnar e89faa903f Backed out changeset 5018856d8fee (bug 1758474) for causing node eslint failure. CLOSED TREE 2022-03-10 11:58:45 +02:00
Mark Banner fe937b78bd Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-10 09:25:28 +00:00
Kershaw Chang 98b8e2a94c Bug 1758132 - Remove NS_ASSERT_OWNINGTHREAD check, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D140346
2022-03-09 08:53:28 +00:00
Gerald Squelart 5802980a6e Bug 1757596 - #include "mozilla/ProfilerThreadSleep.h" instead of GeckoProfiler.h where possible - r=florian
And in one case, #include "mozilla/ProfilerThreadState.h" where only `AUTO_PROFILER_THREAD_WAKE` is used.

Depends on D140172

Differential Revision: https://phabricator.services.mozilla.com/D140173
2022-03-08 10:32:44 +00:00
ffxbld db387700ea No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D140491
2022-03-07 12:48:38 +00:00
Toshihito Kikuchi 0cc2fc80c7 Bug 1756518 - Delay starting UntrustedModulesProcessor. r=mhowell,necko-reviewers,kershaw
This patch is to delay starting `UntrustedModulesProcessor` to avoid
processing a massive amount of loaded modules in the browser process
during startup.

To achive that, this patch introduces "unblock-untrusted-modules-thread"
notification.  Before the notification, `UntrustedModulesProcessor` is
created but marked as not ready.  This means the processor does not
go beyond `ScheduleNonEmptyQueueProcessing`.  Once the notification is
observed, we propagate it to all existing child processes, and afterward
`UntrustedModulesProcessor` in new processes will be marked ready from
the beginning.

Differential Revision: https://phabricator.services.mozilla.com/D140123
2022-03-05 04:39:05 +00:00
Csoregi Natalia eceb974192 Backed out changeset c63f50d02eac (bug 1756518) for bp-hybrid bustage on SocketProcessHost.cpp. CLOSED TREE 2022-03-05 01:37:50 +02:00
Toshihito Kikuchi c601fd8b0a Bug 1756518 - Delay starting UntrustedModulesProcessor. r=mhowell,necko-reviewers,kershaw
This patch is to delay starting `UntrustedModulesProcessor` to avoid
processing a massive amount of loaded modules in the browser process
during startup.

To achive that, this patch introduces "unblock-untrusted-modules-thread"
notification.  Before the notification, `UntrustedModulesProcessor` is
created but marked as not ready.  This means the processor does not
go beyond `ScheduleNonEmptyQueueProcessing`.  Once the notification is
observed, we propagate it to all existing child processes, and afterward
`UntrustedModulesProcessor` in new processes will be marked ready from
the beginning.

Differential Revision: https://phabricator.services.mozilla.com/D140123
2022-03-04 21:12:18 +00:00
Valentin Gosu f72f793143 Bug 1757641 - Make node servers automatically forward android ports r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D139985
2022-03-04 20:40:50 +00:00
Nika Layzell 05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Nika Layzell 5f06238318 Bug 1754037 - Part 3a: Manual changes to new ParamTraits API, r=ipc-reviewers,mccr8
This change does not build without the automatically rewritten changes from
part 3c, as every IPC::ParamTraits and IPDLParamTraits implementation needs to
be updated at once, but these are the manual changes which are required and not
handled by the automatic script.

Differential Revision: https://phabricator.services.mozilla.com/D140001
2022-03-04 15:39:40 +00:00
Nika Layzell 14e4d6be72 Bug 1754037 - Part 2: Forward declare Message{Reader,Writer} where Message is forward declared, r=ipc-reviewers,mccr8
This will allow the types to be more easily automatically substituted in place
of `IPC::Message`, as the type will already be declared in places it is used.

Differential Revision: https://phabricator.services.mozilla.com/D140000
2022-03-04 15:39:39 +00:00
Butkovits Atila fed1c445a8 Backed out changeset 6f9edda31be0 (bug 1756518) for causing failures at TestHttpChannel.PBAsyncOpen. CLOSED TREE 2022-03-04 07:08:12 +02:00
Toshihito Kikuchi 69d4c48340 Bug 1756518 - Delay starting UntrustedModulesProcessor. r=mhowell,necko-reviewers,kershaw
This patch is to delay starting `UntrustedModulesProcessor` to avoid
processing a massive amount of loaded modules in the browser process
during startup.

To achive that, this patch introduces "unblock-untrusted-modules-thread"
notification.  Before the notification, `UntrustedModulesProcessor` is
created but marked as not ready.  This means the processor does not
go beyond `ScheduleNonEmptyQueueProcessing`.  Once the notification is
observed, we propagate it to all existing child processes, and afterward
`UntrustedModulesProcessor` in new processes will be marked ready from
the beginning.

Differential Revision: https://phabricator.services.mozilla.com/D140123
2022-03-04 03:18:42 +00:00
Butkovits Atila 2fa3391c7b Backed out changeset 3336c8e9a43f (bug 1756518) for causing build bustages at Unified_cpp_xre_dllservices. CLOSED TREE 2022-03-04 03:49:23 +02:00
Toshihito Kikuchi 216c399735 Bug 1756518 - Delay starting UntrustedModulesProcessor. r=mhowell,necko-reviewers,kershaw
This patch is to delay starting `UntrustedModulesProcessor` to avoid
processing a massive amount of loaded modules in the browser process
during startup.

To achive that, this patch introduces "unblock-untrusted-modules-thread"
notification.  Before the notification, `UntrustedModulesProcessor` is
created but marked as not ready.  This means the processor does not
go beyond `ScheduleNonEmptyQueueProcessing`.  Once the notification is
observed, we propagate it to all existing child processes, and afterward
`UntrustedModulesProcessor` in new processes will be marked ready from
the beginning.

Differential Revision: https://phabricator.services.mozilla.com/D140123
2022-03-04 01:21:32 +00:00
ffxbld 2d09a94c14 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D140176
2022-03-03 14:10:26 +00:00
Dragana Damjanovic d2b7eea8fb Bug 1753002 - Change the diagnostic assert to a debug assert until bug 1757910 is fixed. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140182
2022-03-03 13:48:27 +00:00
Kershaw Chang df78ebf179 Bug 1756709 - Remove NS_HTTP_ALLOW_KEEPALIVE for AltSvcTransaction, r=necko-reviewers,dragana
With this patch, we'll skip the `RestrictConnections` cehck when creating a speculative connection for Alt-svc validation.

Differential Revision: https://phabricator.services.mozilla.com/D139952
2022-03-03 13:35:46 +00:00
Csoregi Natalia 1804fa61a2 Backed out changeset a5abe44e15f4 (bug 1748693) for causing /cookies/ failures. CLOSED TREE 2022-03-02 18:21:49 +02:00
Frederik Braun bdfe418051 Bug 1748693 - remove MaybeCompareSchemes(Logging), disable samesite-schemeful for release r=dveditz,dragana
This removes a part of the erroneous scheme-comparison and the logging
that was implemented in those functions. The tests for that logging were
also removed.

Differential Revision: https://phabricator.services.mozilla.com/D136229
2022-03-02 14:58:02 +00:00
Mathew Hodson 0efaecc57f Bug 1757329 - Use `add_setup` in test_auth_multiple.js. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139794
2022-03-02 09:36:17 +00:00
Byron Campen 269cf7fcc0 Bug 1755318: Fix issue where the order of PeerConnectionCtx shutdown and DataChannel shutdown was unpredictable. r=mjf
When the pc.close() calls in PeerConnection.jsm were removed, tests that did
not explicitly call pc.close() would result in situations where DataChannel
shutdown ran first, which resulted in DataChannels hanging around after
DataChannel ran its global shutdown code. So, we stop using xpcom-shutdown to
prompt DataChannel to shut down, and instead use ShutdownBlockingTicket to
ensure that shutdown does not proceed until DataChannel is cleaned up, which
naturally results from the PeerConnectionCtx shutdown code.  However,
ShutdownBlockingTicket blocks xpcom-will-shutdown, not xpcom-shutdown, which
resulted in PeerConnectionCtx not getting an opportunity to run its shutdown
code, which then led to shutdown hangs. So, PeerConnectionCtx runs its shutdown
code at xpcom-will-shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D139210
2022-03-01 22:16:49 +00:00
Randell Jesup 5d500de7b0 Bug 1757427: nsHttpResponse/Request IPC cleanup r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D139867
2022-03-01 13:00:14 +00:00
Andreea Pavel c61895b46d Bug 1717629 - disable browser_opaque_response_blocking_telemetry.js on opt platforms r=necko-reviewers,kershaw DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D139788
2022-03-01 09:35:43 +00:00
ffxbld afffec69b7 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D139826
2022-02-28 13:13:10 +00:00
Randell Jesup 60e3d370b3 Bug 1757258: CacheFileUtils cleanup r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D139782
2022-02-26 17:44:33 +00:00
Randell Jesup 459804828f Bug 1757213: DataChannel cleanup r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D139739
2022-02-25 20:00:01 +00:00
Valentin Gosu 0f858ab5ad Bug 1675054 - Enable brotli encoding for trustworthy URLs, not just for https r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D95855
2022-02-25 16:21:26 +00:00
Valentin Gosu cb45d20182 Bug 1756969 - TRR strict mode should still fallback to DNS for rcode errors r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139582
2022-02-25 10:25:56 +00:00
Noemi Erli a103c27e32 Backed out changeset a065ed4f05a9 (bug 1756969) for causing xpc failures in test_odoh.js CLOSED TREE 2022-02-25 00:38:42 +02:00
Kershaw Chang b51c0d6601 Bug 1749637 - Make sure DNS service is created before running the test, r=necko-reviewers,valentin
Like D139106, we should create DNS service earlier.

Differential Revision: https://phabricator.services.mozilla.com/D139583
2022-02-24 22:02:45 +00:00
Valentin Gosu 4f5ee2e443 Bug 1756969 - TRR strict mode should still fallback to DNS for rcode errors r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139582
2022-02-24 21:53:45 +00:00
Valentin Gosu 70a0e93013 Bug 1756557 - Add helper code for creating nodejs proxies r=necko-reviewers,kershaw
Depends on D139358

Differential Revision: https://phabricator.services.mozilla.com/D139387
2022-02-24 21:46:11 +00:00
Valentin Gosu 8d342491f7 Bug 1756557 - Add helper code for creating nodejs servers r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139358
2022-02-24 21:46:10 +00:00
Butkovits Atila d57c7cc459 Backed out 2 changesets (bug 1756557) for causing xpcshell failures at test_servers.js. CLOSED TREE
Backed out changeset a51bb08501b3 (bug 1756557)
Backed out changeset 200a53cbe233 (bug 1756557)
2022-02-24 16:50:17 +02:00
ffxbld 88111eadd6 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D139581
2022-02-24 13:59:41 +00:00
Valentin Gosu 0c6c038a4f Bug 1756882 - Keep recording usual TRR telemetry when strict mode is enabled r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139521
2022-02-24 11:19:29 +00:00
Valentin Gosu 41a74d6555 Bug 1756557 - Add helper code for creating nodejs proxies r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139387
2022-02-24 10:02:09 +00:00
Valentin Gosu e501d97db6 Bug 1756557 - Add helper code for creating nodejs servers r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139358
2022-02-24 10:02:09 +00:00
Narcis Beleuzu 6799f1b983 Backed out 10 changesets (bug 1752332) for bc failures on browser_preferences_usage.js
Backed out changeset 5c475692133f (bug 1752332)
Backed out changeset 7fb5f0cc44f6 (bug 1752332)
Backed out changeset e8b2a80aa796 (bug 1752332)
Backed out changeset 593e5e138927 (bug 1752332)
Backed out changeset a8832dc94d1b (bug 1752332)
Backed out changeset b10197a1ed67 (bug 1752332)
Backed out changeset 8de253223dbc (bug 1752332)
Backed out changeset be908bb7a985 (bug 1752332)
Backed out changeset 26796b527442 (bug 1752332)
Backed out changeset 1a875dc06058 (bug 1752332)
2022-02-23 20:43:01 +02:00
Tom Ritter 1c8c5ab5d0 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=necko-reviewers,KrisWright,dragana
This simplifies the number of negations needed,
and makes things easy to understand.  I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Differential Revision: https://phabricator.services.mozilla.com/D138682
2022-02-23 15:31:09 +00:00
Tom Ritter 69c064a961 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
While we do so, also add a boolean argument to indicate
if we are in a _Content_ process or some other type of
subprocess, which I expect we will need later.

Differential Revision: https://phabricator.services.mozilla.com/D138681
2022-02-23 15:31:08 +00:00
Tom Ritter 46c1c370d7 Bug 1752332: Rename references to parent-only pref structures r=KrisWright
We're going to be using them in more contexts, so generalize
the name.

Differential Revision: https://phabricator.services.mozilla.com/D138680
2022-02-23 15:31:08 +00:00
Tom Ritter 62ea762c4d Bug 1752332: Add in a sanitize property for prefs, and only serialize the user value if we're not sanitized r=KrisWright
We want to eventually crash if a blocklisted preference
is accessed.  In order to do this, we do need to
populate the preference in the pref hashmap of the
subprocess; otherwise when we look up a blocklisted
pref we will just not find anything. We could try to
put the blocklist check at that point; but this won't
work for StaticPrefs; we'd also need to put the blocklist
check there.

Performing a list iteration and string comparison on
every Static Pref call is not acceptable when we can
just populate a bit and check it.

Differential Revision: https://phabricator.services.mozilla.com/D138679
2022-02-23 15:31:07 +00:00
Timothy Nikkel d98b94ac1c Bug 1756696. Make sure image decoding has finished in netwerk/test/browser/browser_opaque_response_blocking_telemetry.js. r=aosmond
Because these images are loaded as embeds/objects we can't get a hold of them to apply most usual methods of waiting for decode (img.decode, using a special powers image notifications observer). This should hopefully be enough to avoid hitting this in automation.

Backout the patch for bug 1722422 (the one that changed it from an assert to a leak) because I think it's easier to classify/recognize the assert than the leak in the logs.

Differential Revision: https://phabricator.services.mozilla.com/D139464
2022-02-23 13:23:41 +00:00
Kershaw Chang fb724ac2f3 Bug 1600309 - P5: Handle the case when socket process is not used for networking, r=necko-reviewers,valentin
The crash happened because gDNSServiceWrapper won't be created if socket process is not used for networking. I missed this case in my previous patches.
So, this patch makes sure that DNSServiceWrapper::SwitchToBackupDNSService won't be called if socket process over networking is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D139320
2022-02-23 11:56:00 +00:00
Kershaw Chang 1be7893454 Bug 1600309 - P4: Avoid creating data bridge channel after crashes, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134906
2022-02-23 11:55:59 +00:00
Kershaw Chang 36fcc2120c Bug 1600309 - P3: Avoid observing duplicate topics, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134905
2022-02-23 11:55:59 +00:00
Kershaw Chang cbf6f791da Bug 1600309 - P2: Don't use socket porcess when it crashes too many times, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134904
2022-02-23 11:55:59 +00:00
Kershaw Chang 5874b30207 Bug 1600309 - P1: Restart socket proces after crash, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134903
2022-02-23 11:55:58 +00:00
Timothy Nikkel e1e9203ccc Bug 1756588. Fix a couple of innerWindowId variables to be uint64_t in network code. r=necko-reviewers,valentin
Depends on D139371

Differential Revision: https://phabricator.services.mozilla.com/D139372
2022-02-23 09:44:34 +00:00
Noemi Erli 22a73e7913 Backed out 2 changesets (bug 1754737) for causing failures in nsHttpConnection.cpp CLOSED TREE
Backed out changeset 0cc869e52a2f (bug 1754737)
Backed out changeset 13ab95d47842 (bug 1754737)
2022-02-22 18:19:34 +02:00
ffxbld a78cf21c03 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update a=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D139273
2022-02-22 15:05:34 +00:00
Cristian Tuns c6409d2d11 Merge mozilla-central to autoland on a CLOSED TREE 2022-02-22 06:42:59 -05:00
Cristian Tuns a224eb8387 Backed out changeset a04a58abafff (bug 1675054) for causing multiple regressions a=backout 2022-02-22 06:31:20 -05:00
Dragana Damjanovic ccd00cf1aa Bug 1754737 - We do not need to keep info about the use of a tunnel in the state. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D138890
2022-02-22 11:21:39 +00:00
Dragana Damjanovic 0248b17c59 Bug 1754737 - Add some structure to nsHttpConnection: r=necko-reviewers,kershaw
- nsHttpConnection now has states. Currently only proxy setup phase is added to the states.
- The states are used in nsHttpConnection::OnSocketWritable tto make the code more understandable.
- Some pieces of selfcontained code are extracted from nsHttpConnection::OnHeadersAvailable, i.e. HandleTunnelResponse and HandleWebSocketResponse

Differential Revision: https://phabricator.services.mozilla.com/D138714
2022-02-22 11:21:38 +00:00
Randell Jesup 1d00097fa9 Bug 1756017: Clean up ChannelEventQueue r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D139052
2022-02-21 14:53:59 +00:00
Kershaw Chang 3a7cb38fc0 Bug 1755877 - Fix the race on mConfirmation.TaskAddr(), r=necko-reviewers,valentin
Since TRRService::MaybeSetPrivateURI() is the only case that can triggers a new confirmation when TRRService::ReadPrefs() is called, making ConfirmationContext::Handle() returns a boolean value should be enough for this case.

Differential Revision: https://phabricator.services.mozilla.com/D139107
2022-02-21 12:23:19 +00:00
Valentin Gosu b5b5de4192 Bug 1675054 - Enable brotli encoding for trustworthy URLs, not just for https r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D95855
2022-02-20 21:20:50 +00:00
Peter Van der Beken 61f7e59993 Bug 1747033 - "Back" does not work correctly for pages with multipart/x-mixed-replace and history.replaceState. r=smaug,necko-reviewers,valentin
multipart/x-mixed-replace loads don't start a new load for parts other than the first,
they just call OnStartRequest/OnStopRequest for every part. The nsDocShell code was
trying to set the active entry to the loading entry for these loads, but because we
never started a new load after the first part, the loading entry would be null and we'd
just clear the active entry. history.replaceState would then try to replace the active
entry, but finding none it would just add a new one.

Differential Revision: https://phabricator.services.mozilla.com/D138464
2022-02-19 08:30:35 +00:00
Kershaw Chang fc9473085a Bug 1754491 - Introduce new error code - NS_ERROR_WEBSOCKET_CONNECTION_REFUSED, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D138891
2022-02-18 14:02:15 +00:00
Randell Jesup 0769f54cb7 Bug 1756010: Clean up HttpChannelChild r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D139050
2022-02-18 12:50:44 +00:00
Kershaw Chang 37d16eac92 Bug 1706422 - Initiaize DNS service earlier, r=necko-reviewers,valentin
The problem here is that the creation of DNS service and setting trr pref is racy.
This problem can be fixed by creating DNS service earlier.

Differential Revision: https://phabricator.services.mozilla.com/D139106
2022-02-18 12:48:06 +00:00
Kershaw Chang 45a4bb9143 Bug 1753703 - P2: Move HttpActivityDistributor to nsHttpHandler, r=necko-reviewers,dragana
Since both DnsAndConnectSocket and nsHttpTransaction use HttpActivityDistributor, let's refactor this a bit by moving some duplicate code to nsHttpHandler.
This patch also makes it possible to test ECH activity for Http3 case.

Differential Revision: https://phabricator.services.mozilla.com/D138893
2022-02-18 09:30:18 +00:00
Kershaw Chang c97e0907d3 Bug 1753703 - P1: Loosen the HTTP activity check, r=necko-reviewers,dragana
The origin test assumes a very particular ordering of HTTP activities, which causes some interimentent failures.
The failed case shows that it's possible that a speculative connection completes before we dispatch the real transaction, so we got 6 http activites.

Differential Revision: https://phabricator.services.mozilla.com/D138892
2022-02-18 09:30:17 +00:00
Valentin Gosu a1f3c24dce Bug 1755954 - Keep only vendored sfv 0.9.1 r=necko-reviewers,glandium,dragana
It seems sfv 0.8.0 is used in the tree, while neqo is using the newer 0.9.1.
Updating http-sfv to use sfv 0.9.1 should remove the code duplication.

Differential Revision: https://phabricator.services.mozilla.com/D139027
2022-02-18 08:51:51 +00:00
Emilio Cobos Álvarez 685321b746 Bug 1755947 - Simplify nsIPrincipal.isSameOrigin(). r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D139030
2022-02-17 18:11:58 +00:00
Cristian Tuns 5b29184ccd Backed out 2 changesets (bug 1753703) for causing Bp-hybrid bustages on Http3Session.cpp CLOSED TREE
Backed out changeset 192cda8fb4dd (bug 1753703)
Backed out changeset 1c1324708e2c (bug 1753703)
2022-02-17 12:13:47 -05:00
Sean Feng 475ea61051 Bug 1755226 - Only notify 'http-on-image-cache-response' when there are registered observers r=tnikkel,emilio
This is an optimization to avoid doing redundant things when there are no
registered observers.

Differential Revision: https://phabricator.services.mozilla.com/D138853
2022-02-17 14:53:10 +00:00
Jens Stutte 4e2933049e Bug 1752518: No need to ever IPC_FAIL on RemoteLazyInputStream creation. r=dom-storage-reviewers,necko-reviewers,kershaw,janv
Differential Revision: https://phabricator.services.mozilla.com/D138649
2022-02-17 14:07:36 +00:00
ffxbld fd59e8d9be No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D139007
2022-02-17 13:37:52 +00:00
Kershaw Chang 411a33e643 Bug 1753703 - P2: Move HttpActivityDistributor to nsHttpHandler, r=necko-reviewers,dragana
Since both DnsAndConnectSocket and nsHttpTransaction use HttpActivityDistributor, let's refactor this a bit by moving some duplicate code to nsHttpHandler.
This patch also makes it possible to test ECH activity for Http3 case.

Depends on D138892

Differential Revision: https://phabricator.services.mozilla.com/D138893
2022-02-17 13:28:18 +00:00
Kershaw Chang 3f8d21f6fa Bug 1753703 - P1: Loosen the HTTP activity check, r=necko-reviewers,dragana
The origin test assumes a very particular ordering of HTTP activities, which causes some interimentent failures.
The failed case shows that it's possible that a speculative connection completes before we dispatch the real transaction, so we got 6 http activites.

Differential Revision: https://phabricator.services.mozilla.com/D138892
2022-02-17 13:28:18 +00:00
Henri Sivonen 2fd5af8ef4 Bug 1736570 - Avoid DocumentChannel for nsParser-created initial about:blank replacement. r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D135106
2022-02-17 13:27:15 +00:00
Kershaw Chang 4814249c00 Bug 1755866 - Don't call GetGpuTimeSinceProcessStartInMs in socket process, r=florian,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D138994
2022-02-17 13:21:19 +00:00
Jari Jalkanen 972848b50f Bug 1736844 - Add interrupt flag to storage service methods opening database; r=dom-storage-reviewers,mak,janv
Differential Revision: https://phabricator.services.mozilla.com/D129023
2022-02-17 06:22:27 +00:00
Marian-Vasile Laza 1004df96d4 Backed out changeset 0ef0b43b28f1 (bug 1736844) for causing gtest failures. CLOSED TREE 2022-02-16 09:27:30 +02:00
Haiyang Xu 4f8cc77665 Bug 1736844 - Add interrupt flag to storage service methods opening database; r=dom-storage-reviewers,mak,janv
* The same flags can be used to enable other features such as extented error codes

Differential Revision: https://phabricator.services.mozilla.com/D129023
2022-02-16 06:08:11 +00:00
Kershaw Chang ff7137a093 Bug 1754508 - P2: Add some checkes to avoid creating SocketProcessBridge when content process is destroyed, r=necko-reviewers,valentin
1. Check if NeckoParent is still able to send IPC before creating SocketProcessBridge
2. Make sure mPendingEvents always be cleared after launching socket process

Differential Revision: https://phabricator.services.mozilla.com/D138487
2022-02-15 19:18:11 +00:00
Kershaw Chang eec2793ed4 Bug 1754508 - P1: Make PNecko refcounted, r=necko-reviewers,dragana
This is the rebased version of D138486.
This patch is supposed to be landed on nightly and D138486 is for beta.

Differential Revision: https://phabricator.services.mozilla.com/D138755
2022-02-15 19:18:11 +00:00
Nika Layzell de1e97c891 Bug 1754040 - Clean up common shared WriteSegments helper functions, r=necko-reviewers,xpcom-reviewers,mccr8
These helper methods are similar to the related ones for
nsIInputStream::ReadSegments, and can be used to implement
nsIOutputStream::Write and nsIOutputStream::WriteFrom in terms of
WriteSegments.

There were various places which used manual copies of these methods, which are
being unified.

Differential Revision: https://phabricator.services.mozilla.com/D138334
2022-02-14 23:59:35 +00:00
ffxbld 79d6ccf336 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D138643
2022-02-14 17:57:46 +00:00
Cristian Tuns 3419e72275 Backed out 4 changesets (bug 1600309) for causing networking crashes CLOSED TREE
Backed out changeset ae7282e60012 (bug 1600309)
Backed out changeset 0d8b02a8db17 (bug 1600309)
Backed out changeset c7262d966a28 (bug 1600309)
Backed out changeset e5503a84beea (bug 1600309)
2022-02-12 05:00:04 -05:00
Marian-Vasile Laza 6730dca994 Bug 1749786 - lint fix r=fix CLOSED TREE 2022-02-11 19:41:54 +02:00
Randell Jesup 84be70e93b Bug 1749786 - websocketchannel cleanup r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D135727
2022-02-11 17:14:07 +00:00
Nika Layzell 001c77587c Bug 1746115 - Perform data URI blocking from DocumentLoadListener, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D138213
2022-02-11 16:34:24 +00:00
Florian Quèze 7b45ca4063 Bug 1754519 - Add missing profiler_thread_sleep annotations, r=gerald,necko-reviewers,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D138341
2022-02-11 15:19:46 +00:00
Kershaw Chang 3140afb3e0 Bug 1600309 - P4: Avoid creating data bridge channel after crashes, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134906
2022-02-11 10:55:54 +00:00
Kershaw Chang d4ad673efa Bug 1600309 - P3: Avoid observing duplicate topics, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134905
2022-02-11 10:55:53 +00:00
Kershaw Chang 769849b41a Bug 1600309 - P2: Don't use socket porcess when it crashes too many times, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134904
2022-02-11 10:55:53 +00:00