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

22003 Коммитов

Автор SHA1 Сообщение Дата
Tim Huang 2b07a16765 Bug 1698843 - Part 2: Make the private cookieBehavior getter to return the regular pref if there is a user value for the regular pref. r=johannh,dimi
If the user has a non-default regular cookieBehavior, we will make the
private cookieBehavior getter to return the regular pref to mirror the
cookieBehavior in ETP custom mode.

In addition, we don't need to do the pref migration because if the user
has a non-default cookieBehavior, it will directly mirror to the private
cookieBehavior pref so that the cookieBehavior is consistent for private
mode.

Differential Revision: https://phabricator.services.mozilla.com/D111002
2021-04-13 18:07:10 +00:00
Christoph Kerschbaumer e1c35fda94 Bug 1658924: Implement HTTPS-First and automatically fall back to http if secure top-level connection is not available r=necko-reviewers,JulianWels,mattwoodrow,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111686
2021-04-13 17:43:12 +00:00
Paul Zuehlcke 9cecd28621 Bug 1661330 - Log STATE_ALLOWED_TRACKING_CONTENT to the ContentBlockingLog if a channel is allowed. r=geckoview-reviewers,dimi,droeh
Differential Revision: https://phabricator.services.mozilla.com/D109716
2021-04-13 16:11:20 +00:00
Valentin Gosu 8781ae5e06 Bug 1689730 - Restrict Server-Timing to secure origins r=necko-reviewers,dragana
Server-Timing was only being parsed with HTTPS. But this is overly
restrictive to developers, so it's better to restrict it to
secure origins which includes `http://localhost/`

Differential Revision: https://phabricator.services.mozilla.com/D111795
2021-04-13 11:51:53 +00:00
Csoregi Natalia c3936cc003 Backed out changeset ba593c7436f6 (bug 1689730) for failures on test_http_server_timing.js. CLOSED TREE 2021-04-13 13:55:44 +03:00
Valentin Gosu 967dfb7ad7 Bug 1689730 - Restrict Server-Timing to secure origins r=necko-reviewers,dragana
Server-Timing was only being parsed with HTTPS. But this is overly
restrictive to developers, so it's better to restrict it to
secure origins which includes `http://localhost/`

Differential Revision: https://phabricator.services.mozilla.com/D111795
2021-04-13 10:23:55 +00:00
Valentin Gosu 4ee24aa4db Bug 1702179 - nsIndexedToHTML generated views - focus ring for directories only shows the right margin r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D111536
2021-04-13 09:55:28 +00:00
Andrew Creskey 4f7b86c141 Bug 1703956 - Extend network perfstats to include all http channel completion times r=necko-reviewers,valentin
Add HttpChannelCompletion, which is just the completion time for any request.
This allows us to measure overall improvements, instead of shifting requests from cache to network via RCWN.

Differential Revision: https://phabricator.services.mozilla.com/D111335
2021-04-12 21:42:21 +00:00
Emilio Cobos Álvarez 3e0cb7c68b Bug 1703289 - Make mixed content blocker use a session-persistent permission rather than ad-hoc code. r=ckerschb,smaug
This is more fission-compatible, and a lot simpler.

Differential Revision: https://phabricator.services.mozilla.com/D111480
2021-04-12 18:04:12 +00:00
Butkovits Atila 8b7a0827b5 Backed out 7 changesets (bug 1696531) for causing mochitest failures complaining about arguments.
Backed out changeset 52ba6bf74b55 (bug 1696531)
Backed out changeset c907d8324bcc (bug 1696531)
Backed out changeset 1f7ffffa368f (bug 1696531)
Backed out changeset 5002c2053444 (bug 1696531)
Backed out changeset 0b8c56f2f5c3 (bug 1696531)
Backed out changeset a8d8adae39b6 (bug 1696531)
Backed out changeset a7f9bd32a4c9 (bug 1696531)
2021-04-12 20:48:48 +03:00
Andrew Halberstadt da4b1759c9 Bug 1696531 - Use a shorter name in 'test_on_directory' from test_unix_domain.js, r=necko-reviewers,valentin
Unix socket names have a fairly short maximum length. Turns out that on Python
3 'mkdtemp' creates directories that have two extra characters as opposed to
Python 2.  That was enough for us to hit the max length and break this test.

Work around the issue by using a shorter base name for the socket (which doesn't
make a difference to the test).

Depends on D109730

Differential Revision: https://phabricator.services.mozilla.com/D111647
2021-04-12 16:31:22 +00:00
Valentin Gosu fffedbcc06 Bug 1703216 - Get rid of network.trr.bootstrapAddress pref r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D110913
2021-04-12 16:07:06 +00:00
ffxbld 0a36f70ec9 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D111640
2021-04-12 15:03:20 +00:00
Valentin Gosu bd3be306ce Bug 1700866 - Call UpdatePrivateBrowsing() unconditionally in AsyncOpen r=necko-reviewers,dragana
See https://bugzilla.mozilla.org/show_bug.cgi?id=1670506#c10
The loadInfo mPrivateBrowsingId value could have changed between the creation
of the channel and calling AsyncOpen, so it's best to call it unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D111109
2021-04-12 11:07:51 +00:00
jenny 9a2b67ba48 Bug 1703670: Removed expired telemetry probe networking.ftp_opened_channels_files and networking.ftp_opened_channels_listings r=chutten,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D111268
2021-04-10 13:42:04 +00:00
Dorel Luca 7cb4a31900 Backed out changeset ac4b107bf8bb (bug 1704079) for XPCshell failures in netwerk/test/unit/test_trr_https_fallback.js. CLOSED TREE 2021-04-09 22:55:33 +03:00
Rob Wu 22d7d29b4a Bug 1694679 - Skip CORS for moz-extension:-URLs r=ckerschb,mixedpuppy,necko-reviewers,dragana
moz-extension:-URLs cannot be loaded by default, unless an extension
explicitly lists the resource in web_accessible_resources. At that
point, a URL is considered world-readable, and the load should succeed
regardless of the requested CORS mode in the fetch/request.

Differential Revision: https://phabricator.services.mozilla.com/D111016
2021-04-09 17:06:20 +00:00
Cosmin Sabou 52c5a339fb Backed out changeset b6f8e145ef20 (bug 1669892) for causing xpcshell failures on test_trr_https_fallback.js. CLOSED TREE 2021-04-09 19:34:15 +03:00
Nihanth Subramanya 4b7ae52a98 Bug 1704079 - Set negotiated NPN in Http3Session::SetSecInfo. r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111405
2021-04-09 14:15:12 +00:00
Dragana Damjanovic 38a4ec8511 Bug 1669892 - Enable test_http3.js on MAC r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D110567
2021-04-09 13:35:56 +00:00
Tom Tung a48aba68bc Bug 1703464 - Bypass the CORP check when the loading principal is a system principal; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111056
2021-04-09 06:09:56 +00:00
Aaron Klotz 2ffd0ef1a2 Bug 1668952: Part 1 - Remove GeckoView-specific limits on URI length from Necko; r=necko-reviewers,valentin
For webcompat reasons, we have determined that we should only limit the length
of URIs in specific cases. We're going to handle this on the GV side instead.

Differential Revision: https://phabricator.services.mozilla.com/D109426
2021-04-09 06:01:58 +00:00
Nihanth Subramanya 1bafdfc64d Bug 1699523 - Key TRR skip reason histograms by provider, split fallback into success and failure. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D109436
2021-04-08 21:45:07 +00:00
Christoph Kerschbaumer 7544c7f793 Bug 1703520: Remove unused bypassCORSChecks from Loadinfo r=necko-reviewers,robwu,sstreich
Differential Revision: https://phabricator.services.mozilla.com/D111091
2021-04-08 17:51:36 +00:00
Valentin Gosu 946e47321f Bug 1702374 - Make sure FTP URL does not contain special characters r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D111098
2021-04-08 08:11:31 +00:00
Kershaw Chang 19602fcd6c Bug 1698661 - Use the id of top browsing context to dispatch transactions, r=necko-reviewers,kmag,dragana
Differential Revision: https://phabricator.services.mozilla.com/D110219
2021-04-07 07:59:18 +00:00
Valentin Gosu 62135a9632 Bug 1699691 - Only trigger CaptivePortalConnectivity confirmation event when CP was locked r=dragana,necko-reviewers
We only need to react to a completed captive portal check when the captive
portal was previously locked. When not in a captive portal, this notification
only means the check has completed - no network properties have changed.

Differential Revision: https://phabricator.services.mozilla.com/D109723
2021-04-07 07:30:00 +00:00
Valentin Gosu 8cd440e44c Bug 1699691 - Add more confirmation tests r=necko-reviewers,dragana
Also makes sure not to trigger two confirmations when the URI pref changes.

Differential Revision: https://phabricator.services.mozilla.com/D109620
2021-04-07 07:30:00 +00:00
Valentin Gosu da6faa016e Bug 1700076 - Clean up test_http3_fast_fallback.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109601
2021-04-07 07:29:59 +00:00
Valentin Gosu 7c60cd7377 Bug 1700076 - Clean up test_dns_by_type_resolve.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109600
2021-04-07 07:29:59 +00:00
Valentin Gosu 9642559564 Bug 1700076 - Clean up unit_ipc/test_dns_by_type_resolve_wrap.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109599
2021-04-07 07:29:58 +00:00
Valentin Gosu 09138a2f79 Bug 1700076 - Clean up test_trr_httpssvc.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109598
2021-04-07 07:29:58 +00:00
Valentin Gosu 38e8d6e73b Bug 1700076 - Clean up test_trr_https_fallback.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109597
2021-04-07 07:29:58 +00:00
Valentin Gosu 067e18e095 Bug 1700076 - Clean up test_httpssvc_retry_without_ech.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109596
2021-04-07 07:29:57 +00:00
Valentin Gosu f1531312ce Bug 1700076 - Clean up test_httpssvc_retry_with_ech.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109595
2021-04-07 07:29:57 +00:00
Valentin Gosu f7d21a92ac Bug 1700076 - Clean up test_httpssvc_iphint.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109594
2021-04-07 07:29:57 +00:00
Valentin Gosu 2e786781f1 Bug 1700076 - Clean up test_httpssvc_https_upgrade.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109593
2021-04-07 07:29:56 +00:00
Valentin Gosu bdb59cf266 Bug 1700076 - Clean up test_httpssvc_priority.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109592
2021-04-07 07:29:56 +00:00
Valentin Gosu 6fc85e2dea Bug 1700076 - Make TRRDNSListener handle for type records resolves r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109591
2021-04-07 07:29:55 +00:00
Valentin Gosu 89a7e43734 Bug 1700076 - Add ability to cancel TRR requests before they're dispatched r=necko-reviewers,dragana
A TRR request is created and dispatched to the handling thread.
If we want to cancel it, we may do so before the runnable has been handled
and there's no HTTP channel - so the cancel was a NO-OP.
Here we add mCancelled which is consulted in SendHTTPRequest to check
if the request has already been cancelled.

Differential Revision: https://phabricator.services.mozilla.com/D109590
2021-04-07 07:29:55 +00:00
Valentin Gosu 726f30aa64 Bug 1700076 - Add ability to count number of DoH requests that reach the TRRServer r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109589
2021-04-07 07:29:54 +00:00
Valentin Gosu 5094c19438 Bug 1700076 - Allow nsHostResolver::FlushCache to clear Type records from the cache r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D109588
2021-04-07 07:29:54 +00:00
Valentin Gosu ca325c9add Bug 1700076 - Fix modernize-use-default-member-init clang-tidy warnings in netwerk/dns/ r=necko-reviewers,dragana
This patch consists of the changes generated by running
`./mach static-analysis check --fix` on `netwerk/dns` after adding the
`modernize-use-default-member-init` clang-tidy lint.
Some additional changes were made by hand to ensure consistent results.
This patch ensures that all member variables are initialized in the header,
so when adding or changing constructors we don't miss one resulting in
uninitialized memory.

Differential Revision: https://phabricator.services.mozilla.com/D109339
2021-04-07 07:29:54 +00:00
Valentin Gosu b3f920ee42 Bug 1700076 - Handle nsHostResolver::CancelAsyncRequest being called for records in the eviction queue r=necko-reviewers,dragana
The reason this worked previously is that we initialized `recPtr = rec;` in
the for loop iterating through callbacks.
Records that were in the evictionQ did not have any callbacks, so we never
entered this block.

Differential Revision: https://phabricator.services.mozilla.com/D109338
2021-04-07 07:29:53 +00:00
Andreas Pehrson c964e08085 Bug 1695580 - Release WebSocketChannel::mTargetThread on main. r=necko-reviewers,dragana
When mTargetThread is WebSocketImpl it must be released on main since it
implements nsISupportsWeakReference, and clearing weak references is not
threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D109783
2021-04-06 20:15:12 +00:00
Andreas Pehrson 6b51e5919c Bug 1695580 - In necko, cancel pending DelayedRunnable timers on shutdown. r=necko-reviewers,dragana
This adds support for nsIDelayedRunnableObserver to nsStreamTransportService.

This is a bit special because nsStreamTransportService uses an nsThreadPool.
Because of race conditions we cannot dispatch a final cleanup task to cancel any
pending DelayedRunnables.

Because of the inherent raciness of threads in the thread pool we assume that
any pending DelayedRunnables can handle being released on any thread. Thus we
dispatch the cleanup task to the background event target once the thread pool
has been shut down and processed all its events. This ensures no races can occur
between the cleanup task and OnDelayedRunnableScheduled.

Differential Revision: https://phabricator.services.mozilla.com/D109782
2021-04-06 20:15:11 +00:00
Andreas Pehrson a901c0f50a Bug 1695580 - Break out DelayedRunnable into its own files. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109778
2021-04-06 20:15:09 +00:00
Cosmin Sabou a9dd657e32 Backed out 18 changesets (bug 1700076, bug 1699691) for causing windows xpcshell failures on test_trr_cancel.js. CLOSED TREE
Backed out changeset 5f3eb0797c06 (bug 1699691)
Backed out changeset 768e56ccd244 (bug 1699691)
Backed out changeset d89075d72c83 (bug 1700076)
Backed out changeset fcf92dd5158a (bug 1700076)
Backed out changeset 8094a7ffc6a4 (bug 1700076)
Backed out changeset 9bc2539a1f5d (bug 1700076)
Backed out changeset fcf27f3c7b69 (bug 1700076)
Backed out changeset 753f4df63689 (bug 1700076)
Backed out changeset 1315c00d2137 (bug 1700076)
Backed out changeset 776c44be95f5 (bug 1700076)
Backed out changeset 2b8d8d63cacd (bug 1700076)
Backed out changeset bc92b34e5d71 (bug 1700076)
Backed out changeset 016c856573da (bug 1700076)
Backed out changeset c085324cb20e (bug 1700076)
Backed out changeset 26dc88b74377 (bug 1700076)
Backed out changeset 8dc21acb87f9 (bug 1700076)
Backed out changeset f36e9cb05851 (bug 1700076)
Backed out changeset fb3f2329ca37 (bug 1700076)
2021-04-06 21:49:20 +03:00
Brindusan Cristian f78d18d827 Backed out 8 changesets (bug 1695580) for causing build bustages on DataMutex.h. CLOSED TREE
Backed out changeset ec0b0fcc8d88 (bug 1695580)
Backed out changeset 982a46056fcb (bug 1695580)
Backed out changeset e38e8b90f119 (bug 1695580)
Backed out changeset 6fdd154aa151 (bug 1695580)
Backed out changeset d04f7a7ec375 (bug 1695580)
Backed out changeset 2103cd9e58b7 (bug 1695580)
Backed out changeset de9a7dd7fc79 (bug 1695580)
Backed out changeset ae16f09be41b (bug 1695580)
2021-04-06 17:41:19 +03:00
Valentin Gosu 621339b801 Bug 1433500 - detectportal.firefox.com should return something informative for users r=nhnt11,extension-reviewers,zombie
This change constitutes a way we can redirect users to an actual page that
explains what captive portals are and why we are making these requests.
Normally users should not see this page, as we only compare the contents
of a small html file. The meta redirect only happens when loaded in a
page.

The SUMO URL https://support.mozilla.org/kb/captive-portal will automatically
redirect to the appropriate locale.

Differential Revision: https://phabricator.services.mozilla.com/D99773
2021-04-06 14:12:50 +00:00
Valentin Gosu c87b19c53e Bug 1699691 - Only trigger CaptivePortalConnectivity confirmation event when CP was locked r=dragana,necko-reviewers
We only need to react to a completed captive portal check when the captive
portal was previously locked. When not in a captive portal, this notification
only means the check has completed - no network properties have changed.

Differential Revision: https://phabricator.services.mozilla.com/D109723
2021-04-06 13:18:32 +00:00
Valentin Gosu 0969c40fb8 Bug 1699691 - Add more confirmation tests r=necko-reviewers,dragana
Also makes sure not to trigger two confirmations when the URI pref changes.

Differential Revision: https://phabricator.services.mozilla.com/D109620
2021-04-06 13:18:31 +00:00
Valentin Gosu f1a7cdbbb7 Bug 1700076 - Clean up test_http3_fast_fallback.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109601
2021-04-06 13:18:31 +00:00
Valentin Gosu 48b8bd9fd7 Bug 1700076 - Clean up test_dns_by_type_resolve.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109600
2021-04-06 13:18:30 +00:00
Valentin Gosu b6d9bd4e99 Bug 1700076 - Clean up unit_ipc/test_dns_by_type_resolve_wrap.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109599
2021-04-06 13:18:30 +00:00
Valentin Gosu 1d92d5516e Bug 1700076 - Clean up test_trr_httpssvc.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109598
2021-04-06 13:18:30 +00:00
Valentin Gosu 1741eb2629 Bug 1700076 - Clean up test_trr_https_fallback.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109597
2021-04-06 13:18:29 +00:00
Valentin Gosu 2dd56c47b7 Bug 1700076 - Clean up test_httpssvc_retry_without_ech.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109596
2021-04-06 13:18:29 +00:00
Valentin Gosu 0c38ed0c45 Bug 1700076 - Clean up test_httpssvc_retry_with_ech.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109595
2021-04-06 13:18:28 +00:00
Valentin Gosu abcf0b7129 Bug 1700076 - Clean up test_httpssvc_iphint.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109594
2021-04-06 13:18:28 +00:00
Valentin Gosu 1aaab7f9a1 Bug 1700076 - Clean up test_httpssvc_https_upgrade.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109593
2021-04-06 13:18:27 +00:00
Valentin Gosu 2d17089150 Bug 1700076 - Clean up test_httpssvc_priority.js r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D109592
2021-04-06 13:18:27 +00:00
Valentin Gosu c82e24d35f Bug 1700076 - Make TRRDNSListener handle for type records resolves r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109591
2021-04-06 13:18:26 +00:00
Valentin Gosu c4b0fc5bb7 Bug 1700076 - Add ability to cancel TRR requests before they're dispatched r=necko-reviewers,dragana
A TRR request is created and dispatched to the handling thread.
If we want to cancel it, we may do so before the runnable has been handled
and there's no HTTP channel - so the cancel was a NO-OP.
Here we add mCancelled which is consulted in SendHTTPRequest to check
if the request has already been cancelled.

Differential Revision: https://phabricator.services.mozilla.com/D109590
2021-04-06 13:18:26 +00:00
Valentin Gosu a23c89f8b9 Bug 1700076 - Add ability to count number of DoH requests that reach the TRRServer r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109589
2021-04-06 13:18:26 +00:00
Valentin Gosu 7981f65cf1 Bug 1700076 - Allow nsHostResolver::FlushCache to clear Type records from the cache r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D109588
2021-04-06 13:18:25 +00:00
Valentin Gosu 3f1f271f39 Bug 1700076 - Fix modernize-use-default-member-init clang-tidy warnings in netwerk/dns/ r=necko-reviewers,dragana
This patch consists of the changes generated by running
`./mach static-analysis check --fix` on `netwerk/dns` after adding the
`modernize-use-default-member-init` clang-tidy lint.
Some additional changes were made by hand to ensure consistent results.
This patch ensures that all member variables are initialized in the header,
so when adding or changing constructors we don't miss one resulting in
uninitialized memory.

Differential Revision: https://phabricator.services.mozilla.com/D109339
2021-04-06 13:18:25 +00:00
Valentin Gosu 45e5ad5a94 Bug 1700076 - Handle nsHostResolver::CancelAsyncRequest being called for records in the eviction queue r=necko-reviewers,dragana
The reason this worked previously is that we initialized `recPtr = rec;` in
the for loop iterating through callbacks.
Records that were in the evictionQ did not have any callbacks, so we never
entered this block.

Differential Revision: https://phabricator.services.mozilla.com/D109338
2021-04-06 13:18:24 +00:00
Kershaw Chang 5c433fde4b Bug 1703194 - Fix data race for mConfirmation.mTask, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D110920
2021-04-06 12:20:34 +00:00
Andreas Pehrson bed338184d Bug 1695580 - Release WebSocketChannel::mTargetThread on main. r=necko-reviewers,dragana
When mTargetThread is WebSocketImpl it must be released on main since it
implements nsISupportsWeakReference, and clearing weak references is not
threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D109783
2021-04-06 12:16:12 +00:00
Andreas Pehrson be0dbd75d4 Bug 1695580 - In necko, cancel pending DelayedRunnable timers on shutdown. r=necko-reviewers,dragana
This adds support for nsIDelayedRunnableObserver to nsStreamTransportService.

This is a bit special because nsStreamTransportService uses an nsThreadPool.
Because of race conditions we cannot dispatch a final cleanup task to cancel any
pending DelayedRunnables.

Because of the inherent raciness of threads in the thread pool we assume that
any pending DelayedRunnables can handle being released on any thread. Thus we
dispatch the cleanup task to the background event target once the thread pool
has been shut down and processed all its events. This ensures no races can occur
between the cleanup task and OnDelayedRunnableScheduled.

Differential Revision: https://phabricator.services.mozilla.com/D109782
2021-04-06 12:16:11 +00:00
Andreas Pehrson 25d202a7f3 Bug 1695580 - Break out DelayedRunnable into its own files. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109778
2021-04-06 12:16:10 +00:00
Kershaw Chang 53fcabd6de Bug 1701829 - Make sure we do fast fallback when h2 connection is ready, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D110401
2021-04-06 09:49:13 +00:00
Valentin Gosu b596ffd428 Bug 1696261 - Optimize nsDataHandler and nsSimpleURI::SetSpec to do fewer passes r=necko-reviewers,kershaw
- Rename nsAciiMask.h details:: namespace to asciimask_details so it doesn't clash with ipc/chromium/src/base/task.h
- Add SetSpecAndFilterWhitespace simple URI constructor that filters whitespace instead of just CR/LF.
- Only do one scan of the string in nsSimpleURI::SetPathQueryRefInternal in order to find the end of the path, query & ref.

There are probably more optimizations possible.
In my testing these get me a 1.5x-2x speedup.

Differential Revision: https://phabricator.services.mozilla.com/D107567
2021-04-06 08:37:40 +00:00
Dragana Damjanovic 2e13a169c1 Bug 1698321 - Make sure that we do not underflow mNumActiveConns r=necko-reviewers,kershaw
This may happen when a TransportSetup retry to connect using a different IP address, but AsyncResolveNative failed.

The change adds a flag that indicates whether it is needed to remove a connection from mNumActiveConns. This should make sure that we do not do it multiple times.

Differential Revision: https://phabricator.services.mozilla.com/D110723
2021-04-06 08:27:43 +00:00
ffxbld b5b443ea9c No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=jcristau
Differential Revision: https://phabricator.services.mozilla.com/D110808
2021-04-06 08:12:18 +00:00
Cosmin Sabou f06d692475 Backed out changeset 23251cfb884e (bug 1616239) for causing windows aarch bustages. 2021-04-01 23:03:29 +03:00
Kershaw Chang 93423e9aa1 Bug 1616239 - Enable http3 tests for asan r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D108635
2021-04-01 18:31:23 +00:00
Dragana Damjanovic 8a2d5a65fc Bug 1693030 - Do not show AltSvc messages in the console if they are mapping to the same domain name r=necko-reviewers,kershaw
This is usually the case for HTTP/3 mapping.
The messages are useful only if a request is routed to a different domain name.

Differential Revision: https://phabricator.services.mozilla.com/D109978
2021-04-01 17:44:53 +00:00
Dragana Damjanovic a1876158d2 Bug 1695717 - Make sure to trigger writes after HTTP/3 session has been connected r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D110545
2021-04-01 15:23:06 +00:00
ffxbld b9c33eddf7 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D110552
2021-04-01 14:55:53 +00:00
Tim Huang ba201347a4 Bug 1691907 - Part 2: Add a method `initWithURI` to nsICookieJarSettings. r=dimi,robwu
This patch adds a method `initwithURI` to nsICookieJarSetting in order
to allow JS code to be able to set the paritionKey of the
CookieJarSettings.

This is needed for web extension for creating and setting the
cookieJarSettings for the download resource.

Differential Revision: https://phabricator.services.mozilla.com/D109759
2021-03-31 19:54:28 +00:00
Kershaw Chang 7d2b8c79ca Bug 1609410 - When receiving 421, don't restart the transaction that has a sticky connection r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D108575
2021-03-31 09:06:50 +00:00
Tom Tung a3eac88f3a Bug 1683131 - Fix namespace ambiguity issue on ipc::Endpoint after including nsHttpChannel in imgLoader; r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D108002
2021-03-30 00:52:34 +00:00
Tom Tung 8bb34122c1 Bug 1695987 - Collect the size of response to be parsed on ORB; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106960
2021-03-30 00:52:33 +00:00
Eden Chuang 56cd237cb3 Bug 1683131 - Add a test for telemetry r=necko-reviewers,dragana
Depends on D103028

Differential Revision: https://phabricator.services.mozilla.com/D104507
2021-03-30 00:52:33 +00:00
Tom Tung 4316bedcd3 Bug 1683131 - Add telemetry probes to record time and result for checking a opaque response is allowed or not; r=necko-reviewers,annevk,dragana
Depends on D107207

Differential Revision: https://phabricator.services.mozilla.com/D103028
2021-03-30 00:52:32 +00:00
Tom Tung 57e6375fc2 Bug 1696111 - Use sniffers in the requested category; r=necko-reviewers,valentin
After applying D102448,
uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml starts to fail.
The reason is that it adds image sniffer into net-content-sniffers which is not
expected.

Such that, this patch
- adds two other sniffers category:
  - orb-content-sniffers
    - The sniffers that are needed in ORB.
  - net-and-orb-content-sniffers
    - The sniffers that are in either orb-content-sniffers or net-content-sniffers.
- changes the way to ensure we only use the sniffers in the
requested category.

Differential Revision: https://phabricator.services.mozilla.com/D107207
2021-03-30 00:52:32 +00:00
Tom Tung bc25e0f18c Bug 1696111 - Sniff and check the initial media request and allow its subsequent requests; r=necko-reviewers,dragana
This implements the changes in https://github.com/annevk/orb/pull/16/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

Differential Revision: https://phabricator.services.mozilla.com/D106891
2021-03-30 00:52:31 +00:00
Eden Chuang c7aa9a7c9c Bug 1696111 - Make LoadInfo know if the request is triggered from a media element and if it's an initial request. r=necko-reviewers,alwu,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106890
2021-03-30 00:52:31 +00:00
Tom Tung 96a2c35659 Bug 1696111 - Extract the code for parsing range header string out and use it later; r=alwu,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106889
2021-03-30 00:52:30 +00:00
Tom Tung 053afd2976 Bug 1696111 - ORB core Implementation; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102448
2021-03-30 00:52:30 +00:00
Tom Tung cafaf3f705 Bug 1696111 - Add functions to determine opaque-safelisted MIME type, opaque-blocklisted MIME type and opaque-blocklisted-never-sniffed MIME type; r=necko-reviewers,dragana
These functions are defined at https://github.com/annevk/orb.

Differential Revision: https://phabricator.services.mozilla.com/D102447
2021-03-30 00:52:29 +00:00
alwu 7dfd8f5884 Bug 1699249 - part1 : add a probe to measure the source buffer usage for different mime types. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D108885
2021-03-29 15:59:03 +00:00
ffxbld 7ffcf86c64 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D110105
2021-03-29 15:01:12 +00:00
Tim Huang 66dc23a3e4 Bug 1695050 - Part 5: Update the call-sites of CookieJarSettings::Create() for Necko. r=dimi,necko-reviewers,valentin
This patch updates the call-sites of CookieJarSettings::Create() in both
LoadInfo.cpp, nsHttpChannel.cpp and CookieCommons.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D109048
2021-03-29 11:01:52 +00:00
Tim Huang 3fd8634816 Bug 1695050 - Part 3: Update current test cases and add a new test case. r=dimi
This patch updates the pref for existing content blocking tests. And it
also adds a new test to verify that the cookieBehavior in regular
windowa and private window are both correct.

Differential Revision: https://phabricator.services.mozilla.com/D109046
2021-03-29 11:01:51 +00:00
Tim Huang eec2a9b646 Bug 1695050 - Part 2: Modify CookieJarSettings::Create() to be able to creat cookieJarSettings according to the browsing mode. r=dimi,preferences-reviewers
This patch modifies the current CookieJarSettings::Create() function.
It removes the current function and adds two variants. One takes the
nsIPrincipal as input and another takes the enum value. The new
functions will test if the input is for the private browsing window to
create the corresponding cookieJarSettings.

Differential Revision: https://phabricator.services.mozilla.com/D109045
2021-03-29 11:01:51 +00:00
Ted Campbell 9b6e632d81 Bug 1700954 - Remove remaining BinAST fragments from ScriptLoader. r=arai,hsivonen,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D109765
2021-03-26 13:01:40 +00:00
Kershaw Chang abe7361f8b Bug 1700309 - Retry DNS query when RESOLVE_IP_HINT is set r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109819
2021-03-26 10:33:19 +00:00