Commit graph

185 commits

Author SHA1 Message Date
Hubert Boma Manilla
121eaa6125 Bug 1577829 - Set the service worker launch timings r=edenchuang,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D195785
2023-12-13 13:15:12 +00:00
Hubert Boma Manilla
71284939b6 Bug 1577829 - Expose service worker timings in the parent process r=edenchuang,necko-reviewers
Expose service worker timings on the intercepted channel

Differential Revision: https://phabricator.services.mozilla.com/D194065
2023-12-12 07:31:40 +00:00
sunil mayya
8ce40ef93d Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-27 13:30:11 +00:00
Narcis Beleuzu
722f6a1679 Backed out 6 changesets (bug 1851992) for DT failure on browser_net_image_cache.js . CLOSED TREE
Backed out changeset 3ceaf46f8f55 (bug 1851992)
Backed out changeset c9d322362e22 (bug 1851992)
Backed out changeset 673df3f83249 (bug 1851992)
Backed out changeset 46e18c56dd39 (bug 1851992)
Backed out changeset f9f9143ac713 (bug 1851992)
Backed out changeset 38c40d735ab7 (bug 1851992)
2023-10-24 13:16:40 +03:00
sunil mayya
1acfb3f11f Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-24 01:48:09 +00:00
Cristina Horotan
ea9336a2ca Backed out 5 changesets (bug 1851992) for causing multiple failures
Backed out changeset d28399b3d947 (bug 1851992)
Backed out changeset 95e4df69007a (bug 1851992)
Backed out changeset fa61d4e76827 (bug 1851992)
Backed out changeset 79969d9eb5cd (bug 1851992)
Backed out changeset 03c17255f1af (bug 1851992)
2023-10-17 14:48:23 +03:00
sunil mayya
f350089afd Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-17 08:27:49 +00:00
Sylvestre Ledru
d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Emilio Cobos Álvarez
25c0d10932 Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
serge-sans-paille
e56675ede1 Bug 1845449 - get rid of global constructor in netwerk/protocol/http/nsHttp.h r=necko-reviewers,kershaw,valentin
Create a new type of nsHttpAtom, namely nsHttpAtomLiteral. This type is
constexpr-constructible and holds a non-owning reference to its name,
which must have global lifetime.

As a side effect, slightly rework nsHttpAtom interface to replace the
dangerous implicit conversion to const char* by a bool operator and test it.

Differential Revision: https://phabricator.services.mozilla.com/D184557
2023-09-04 14:17:42 +00:00
Narcis Beleuzu
93e972c03d Backed out changeset 81f023cd4619 (bug 1845449) for bustages on HttpWinUtils.cpp . CLOSED TREE 2023-09-04 10:48:57 +03:00
serge-sans-paille
9cad2b0e62 Bug 1845449 - get rid of global constructor in netwerk/protocol/http/nsHttp.h r=necko-reviewers,kershaw,valentin
Create a new type of nsHttpAtom, namely nsHttpAtomLiteral. This type is
constexpr-constructible and holds a non-owning reference to its name,
which must have global lifetime.

As a side effect, slightly rework nsHttpAtom interface to replace the
dangerous implicit conversion to const char* by a bool operator and test it.

Differential Revision: https://phabricator.services.mozilla.com/D184557
2023-09-04 07:10:15 +00:00
Thomas Wisniewski
15067f0746 Bug 1687903 - Enable stricter HTTP response status line parsing; r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D186229
2023-08-17 20:09:34 +00:00
Narcis Beleuzu
d1f7ba703f Backed out changeset 01ca7125a61d (bug 1687903) for mochitest failure on test_fetch_basic_http.html . CLOSED TREE 2023-08-17 21:38:08 +03:00
Thomas Wisniewski
5c887984a2 Bug 1687903 - Enable stricter HTTP response status line parsing; r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D186229
2023-08-17 14:50:15 +00:00
Natalia Csoregi
51410ffd90 Backed out changeset 4e21d241af64 (bug 1687903) for causing multiple different http failures. CLOSED TREE 2023-08-17 03:37:10 +03:00
Thomas Wisniewski
895aa0d3e8 Bug 1687903 - Enable stricter HTTP response status line parsing; r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D186229
2023-08-16 22:57:37 +00:00
Nika Layzell
9f4d22f4e0 Bug 1826206 - Require nsISerialEventTarget for RetargetDeliveryTo, r=necko-reviewers,valentin
This avoids potential issues where multiple OnDataAvailable callbacks or
similar could theoretically be called concurrently on different
StreamTransportService threads when targeting the STS - these cases will
now target a TaskQueue on the STS instead, structurally ensuring serial
execution.

Differential Revision: https://phabricator.services.mozilla.com/D179984
2023-06-07 14:48:38 +00:00
Kershaw Chang
d8e56007c1 Bug 1687364 - Authorization header can't be wildcarded for Access-Control-Allow-Headers, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D102932
2023-05-25 15:41:33 +00:00
Valentin Gosu
c05781f028 Bug 1667316 - Pass nsresult status to OnRedirectResult r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140569
2022-11-16 08:49:45 +00:00
Sean Feng
92e2cdde79 Bug 1797983 - Remove ORB checks in InterceptedHttpChannel::OnStartRequest r=farre,smaug
It seems that these stuff aren't really needed because whatever
reaches to here either successfully synthesized requests or requests
with system principal (ie: the requests we manually created in
test_synthesized_response.js).

If those conditions are true, then these ORB checks will have no
effect, so we can remove them.

Differential Revision: https://phabricator.services.mozilla.com/D161358
2022-11-14 16:11:46 +00:00
Eden Chuang
66c572f595 Bug 1793940 - Disconnect StreamFilters on HttpChannelChild before relink ServiceWorker fallback channel. r=necko-reviewers,valentin
Since in D159582, the original HttpChannelChild/HttpChannelParent is reused instead of creating a new one. We need to clean up the StreamFilters which are already attached.

In original logic, this would be handled when StreamFilterParent::OnStartRequest is called(). By comparing the stored StreamFilterParent::mChannel and nsIRequest passed into StreamFilterParent::OnStartRequest, StreamFilterParent can know if the redirection happens or not, such that StreamFilterParent can decide should disconnect or not in OnStartRequest(). However, after D159582, since HttpChannelChild is reused, the logic would not work for ServiceWorker fallback redirection.

Opening the new nsHttpChannel in the parent process makes StreamFilters be attached to the original HttpChannelChild again, and it would send duplicate messages (OnStartRequest, OnDataAvailable, OnStopRequest) to the extension. So we need to remove the previous attached StreamFilters before opening the new channel.

In this patch, we introduce a new IPC method PHttpBackgroundChannel::DetachStreamFilters to inform the corresponding HttpChannelChild to disconnect StreamFilters. Unfortunately this introduces that HttpChannelChild needs to keep weak references of StreamFilters since we have no way to traverse the HttpChannelChild's listener chain and do special handling in StreamFilterParent only.

Depends on D159582

Differential Revision: https://phabricator.services.mozilla.com/D160203
2022-10-28 00:33:47 +00:00
Eden Chuang
67e7fd70f9 Bug 1793940 - Stop channel redirection propagation to child for ServiceWorker fallback requests. r=necko-reviewers,valentin
ServiceWorker fallback(Reset interception) is a trivial redirection, it only changes the load flag  nsIChannel::LOAD_BYPASS_SERVICE_WORKER. For this kind of redirection, we have a chance to avoid complicated redirection propagation by reusing the existing HttpChannelChild/HttpChannelParent directly to improve the performance of ServiceWorker fallback.

In this patch, we add
1. bool value InterceptedHttpChannel::IsReset to indicate if this is a fallback from ServiceWorker.
2. Instead of sending redirection to the content process, relinking the new nsHttpChannel directly in HttpChannelParent, such that HttpChannelParent/HttpChannelChild(and HttpBackgroundChannel IPCs) can be reused.

Differential Revision: https://phabricator.services.mozilla.com/D159582
2022-10-28 00:33:46 +00:00
Sean Feng
110c43437c Bug 1785331 - Allow Synthesized Request Bypass ORB checks r=smaug,valentin,necko-reviewers
If ORB doesn't block the request from service worker, then the
synthesized request should also not be blocked by ORB.

Differential Revision: https://phabricator.services.mozilla.com/D160382
2022-10-27 19:18:14 +00:00
Sean Feng
66fd07b1d7 Bug 1785331 - Ensure ORB clears out the headers r=valentin,necko-reviewers
Depends on D157844

Differential Revision: https://phabricator.services.mozilla.com/D158856
2022-10-27 19:18:13 +00:00
Sean Feng
6181fdcbf8 Bug 1785331 - Allow partially implemented ORB to be used in Nightly r=emilio,smaug,necko-reviewers,valentin
This patch starts to actually blocking opaque responses
for most type of the resources that are defined in the spec.
There are still pieces missing such as blocking JSON responses,
and this is why it's called partially implemented.

This patch was originally written by farre, and I made some
modifications based on it.

Depends on D155128

Differential Revision: https://phabricator.services.mozilla.com/D155129
2022-10-27 19:18:11 +00:00
Dana Keeler
923d7b2029 Bug 1790451 - make nsIChannel.securityInfo concrete as nsITransportSecurityInfo r=kershaw,necko-reviewers,valentin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D157136
2022-09-20 03:58:49 +00:00
Kershaw Chang
cc6c147f88 Bug 1760580 - P1: Make nsIRequest support to store canceled reason, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D156070
2022-09-08 09:11:18 +00:00
Bryan Thrall
f9c451035e Bug 1768679 - Expose cache fetch count as uint32_t r=dragana,necko-reviewers
The value is stored as uint32_t, and there doesn't seem to be a need to convert
it to int.

Differential Revision: https://phabricator.services.mozilla.com/D147888
2022-08-04 16:20:17 +00:00
Tom Ritter
f11bc3e771 Bug 1737829: Add loadInfo to nsHttpChannel::Init() r=necko-reviewers,kershaw
Everywhere except one loadInfo is supplied to an HTTPChannel
right after it is Init()-ed.  Inside of Init we would like to
use the loadInfo so we'll put it in there.

Differential Revision: https://phabricator.services.mozilla.com/D144580
2022-07-15 20:39:22 +00:00
edguloien
ee944b4098 Bug 1758524 (WIP) - Implement the http priority incremental flag: added lint fixes and test coverage. Differential Revision: https://phabricator.services.mozilla.com/D142694 r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142965
2022-04-29 18:36:16 +00:00
edguloien
16595acde2 Bug 1758524 (WIP) - Implement http priority flag r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142694
2022-04-29 18:36:16 +00:00
Cristian Tuns
5b228e4c4c Backed out 2 changesets (bug 1758524) for causing xpcshell failures in test_http3_prio_disabled_wrap.js CLOSED TREE
Backed out changeset b0abbd5936af (bug 1758524)
Backed out changeset e65d3214649e (bug 1758524)
2022-04-28 12:42:11 -04:00
edguloien
0c090761b0 Bug 1758524 (WIP) - Implement the http priority incremental flag: added lint fixes and test coverage. Differential Revision: https://phabricator.services.mozilla.com/D142694 r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142965
2022-04-28 15:40:33 +00:00
edguloien
7172c05d39 Bug 1758524 (WIP) - Implement http priority flag r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142694
2022-04-28 15:40:33 +00:00
Manuel Bucher
09804348ad Bug 1730852 - Fix classOfService information being lost when redirecting to InterceptedHttpChannel r=necko-reviewers,valentin
`nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(newChannel));`[1] was
previously returning a nullptr for objects of the class InterceptedHttpChannel.
Therefore the classOfService flags weren't set after the redirect to the
InterceptedChannel[2].

[1]: https://searchfox.org/mozilla-central/rev/66e59131c1c76fe486424dc37f0a8a399ca874d4/netwerk/protocol/http/HttpBaseChannel.cpp#4186
[2]: https://searchfox.org/mozilla-central/rev/66e59131c1c76fe486424dc37f0a8a399ca874d4/netwerk/protocol/http/nsHttpChannel.cpp#714

Differential Revision: https://phabricator.services.mozilla.com/D137175
2022-02-02 09:06:47 +00:00
Julien Wajsberg
e1f9445a89 Bug 1639716 - [profiler, network markers] Add information about private browsing in network markers r=valentin,gerald,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D129819
2022-01-26 17:26:24 +00:00
Eden Chuang
8903e1520e Bug 1747445 - Do not record time stamps for InterceptedHttpChannel if AsyncOpen() is never called. r=dom-worker-reviewers,smaug
It  is an edge case that InterceptedHttpChannel::Cancel() could be called before calling AsyncOpenInternal().
In the case, mTimeStamp status would be Created and we should not record any time stamp for InterceptedHttpChannel.

Differential Revision: https://phabricator.services.mozilla.com/D134775
2021-12-30 05:54:39 +00:00
Gerald Squelart
5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Cristian Tuns
1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart
7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Sean Feng
5283aecc5d Bug 1468476 - Make soft reload only force validates top level document r=necko-reviewers,nika,dragana,asuth
Currently, soft reload uses the `VALIDATE_ALWAYS` flag to not only
force revalidate the top level document, but also subresources.
This causes content to be refetched from the web even if there
are caches that are still valid and can be used.

Chrome already has such behaviour to not revalidate all resources.

Differential Revision: https://phabricator.services.mozilla.com/D122270
2021-10-28 16:11:56 +00:00
Gerald Squelart
df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Yury Delendik
04ca8c2532 Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117360
2021-10-15 21:13:43 +00:00
Valentin Gosu
4cd661b6a5 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/http/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127407
2021-10-14 12:58:01 +00:00
Cosmin Sabou
8d444b25a5 Backed out 10 changesets (bug 1733356, bug 1733922) for causing windows hybrid bustages. CLOSED TREE
Backed out changeset 85b747a60e73 (bug 1733922)
Backed out changeset 4af7a3a697ad (bug 1733356)
Backed out changeset 3b2e02c99090 (bug 1733356)
Backed out changeset b481b801250e (bug 1733356)
Backed out changeset 88c33cdcb8aa (bug 1733356)
Backed out changeset 3d31e8c8e194 (bug 1733356)
Backed out changeset 616f676e8f94 (bug 1733356)
Backed out changeset 3f8e9b14879d (bug 1733356)
Backed out changeset 241c7cdb3f6b (bug 1733356)
Backed out changeset 7f9e266070c6 (bug 1733356)
2021-10-14 01:54:30 +03:00
Valentin Gosu
a549c09e13 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/http/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127407
2021-10-13 19:39:08 +00:00
Cristian Tuns
2be2d6077e Backed out 10 changesets (bug 1733922, bug 1733356) for causing hybrid build bustages on nsAboutProtocolHandler.cpp. CLOSED TREE
Backed out changeset 293ff1a22c98 (bug 1733922)
Backed out changeset b640749ee844 (bug 1733356)
Backed out changeset d2e3dc1b492a (bug 1733356)
Backed out changeset cd6c19829601 (bug 1733356)
Backed out changeset ef8145f88447 (bug 1733356)
Backed out changeset 366e2d375980 (bug 1733356)
Backed out changeset 14563275a25b (bug 1733356)
Backed out changeset 7700cd82bdf2 (bug 1733356)
Backed out changeset 4e198c3d5ef3 (bug 1733356)
Backed out changeset c26481d0f689 (bug 1733356)
2021-10-11 10:02:20 -04:00