Commit Graph

1075 Commits

Author SHA1 Message Date
Alexandru Marc
83543f20f2 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille
c7a369b29a Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Valentin Gosu
cedff4e196 Bug 1914521 - Make nsPartChannel inherit the content disposition of the multipart response r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D223728
2024-10-01 11:09:09 +00:00
tannal
ea3ec7956f Bug 1841061 - Remove network.compress.allow_truncated_empty_brotli pref r=gregp,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D219210
2024-08-15 15:38:14 +00:00
Randell Jesup
c44f6da6da Bug 1907382: add belt-and-suspenders assertion for Zstd stream creation r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D216869
2024-08-13 10:16:18 +00:00
Sylvestre Ledru
45030f6970 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Randell Jesup
e39fd07443 Bug 1900339: don't send 0-byte OnDataAvailables from http decompression r=nika
Differential Revision: https://phabricator.services.mozilla.com/D213720
2024-06-14 19:07:16 +00:00
Randell Jesup
c74a12a4a7 Bug 1899112: Fix issues with disabling OMT decompression r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D212579
2024-06-05 13:31:46 +00:00
Sean
680bd63580 Bug 1895232 - Convert do_GetService to using components::*::service in netwerk/ r=valentin,cookie-reviewers,places-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D209747
2024-05-30 21:18:43 +00:00
Iulian Moraru
3d5936348b Backed out changeset 9a295c851c2e (bug 1895232) for causing multiple failures. CLOSED TREE 2024-05-22 21:03:20 +03:00
Sean
3cbf13bd8f Bug 1895232 - Convert do_GetService to using components::*::service in netwerk/ r=valentin,cookie-reviewers,places-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D209747
2024-05-22 17:13:29 +00:00
Randell Jesup
22df14537c Bug 1871963: Implement zstd content-encoding support r=necko-reviewers,valentin,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D205109
2024-04-09 15:26:46 +00:00
Tamas Szentpeteri
1f27a4022f Backed out 3 changesets (bug 1871963) for causing dt failures on browser_net_copy_as_powershell.js. CLOSED TREE
Backed out changeset 94e286542c9d (bug 1871963)
Backed out changeset dc2ad0369b86 (bug 1871963)
Backed out changeset 9fb8ccb2f305 (bug 1871963)
2024-04-09 17:24:37 +03:00
Randell Jesup
b1ad40b8ee Bug 1871963: Implement zstd content-encoding support r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D205109
2024-04-09 12:31:56 +00:00
Randell Jesup
0cdcc1a148 Bug 1886734: Use Content-Length to decide if decompression should be off-MainThread r=necko-reviewers,valentin
Configurable with a pref

Differential Revision: https://phabricator.services.mozilla.com/D205313
2024-04-03 21:42:47 +00:00
Sandor Molnar
ebde29e57a Backed out changeset 4191b252db9b (bug 1886734) for causing build bustages @netwerk/streamconv/converters/nsHTTPCompressConv.cpp 2024-04-03 17:49:24 +03:00
Randell Jesup
ce730eb294 Bug 1886734: Use Content-Length to decide if decompression should be off-MainThread r=necko-reviewers,valentin
Configurable with a pref

Differential Revision: https://phabricator.services.mozilla.com/D205313
2024-04-03 13:12:56 +00:00
Randell Jesup
7c14bf06e1 Bug 1356686: Put OMT decompression behind a pref r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D204957
2024-03-19 17:27:23 +00:00
Randell Jesup
066055e41e Bug 1356686 - Do decompression off main thread in content r=necko-reviewers,valentin,extension-reviewers,robwu
Content processes will now always retarget delivery of OnDataAvailable for Http
channels off the main thread. Consumers that were previously redirecting
off-main thread are not affected and their retargeting will stick, but any
Httpchannel that was not retargeted off the main thread will be retargeted to
the nsIStreamTransportService.

If the listener for nsHTTPCompressConv cannot be called off the main thread (ie
the call to nsIRetargetableRequest::CheckListenerChain would fail),
nsHTTPCompressConv will be called off main thread but dispatch its decoded data
back to the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D191377
2024-03-19 17:27:22 +00:00
Sandor Molnar
a764c03b7c Backed out 4 changesets (bug 1356686) for causing build bustages @ netwerk/protocol/http/HttpChannelChild.cpp CLOSED TREE
Backed out changeset 63dc52c69902 (bug 1356686)
Backed out changeset 6e9726c26d07 (bug 1356686)
Backed out changeset 3b150d676b31 (bug 1356686)
Backed out changeset 54754a50d992 (bug 1356686)
2024-03-19 08:29:08 +02:00
Randell Jesup
57dfce801d Bug 1356686: Put OMT decompression behind a pref r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D204957
2024-03-18 20:04:02 +00:00
Randell Jesup
ff7576cfea Bug 1356686 - Do decompression off main thread in content r=necko-reviewers,valentin,extension-reviewers,robwu
Content processes will now always retarget delivery of OnDataAvailable for Http
channels off the main thread. Consumers that were previously redirecting
off-main thread are not affected and their retargeting will stick, but any
Httpchannel that was not retargeted off the main thread will be retargeted to
the nsIStreamTransportService.

If the listener for nsHTTPCompressConv cannot be called off the main thread (ie
the call to nsIRetargetableRequest::CheckListenerChain would fail),
nsHTTPCompressConv will be called off main thread but dispatch its decoded data
back to the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D191377
2024-03-18 20:04:01 +00:00
Valentin Gosu
6c5a3476d1 Bug 1883618 - OnDataAvailable coming from brotli decoder has wrong offset r=jesup,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203596
2024-03-06 17:46:58 +00:00
Natalia Csoregi
43a9979d33 Backed out changeset 85b802206e37 (bug 1883618) for causing bustage on nsHTTPCompressConv.cpp. CLOSED TREE 2024-03-06 12:37:25 +02:00
Valentin Gosu
0a7a06a092 Bug 1883618 - OnDataAvailable coming from brotli decoder has wrong offset r=jesup,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203596
2024-03-06 08:27:50 +00:00
Masatoshi Kimura
2f27be1956 Bug 1875001 - Remove unused features from nsDirIndexParser. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D198797
2024-01-27 01:09:43 +00:00
edgul
c806d7c4ce Bug 1864385 - Block set-cookie from multipart/x-mixed-replace with pref. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D198197
2024-01-16 22:17:41 +00:00
Cristian Tuns
264227d38b Backed out changeset 920b05879c35 (bug 1864385) for causing build bustages in nsMultiMixedConv.cpp CLOSED TREE 2024-01-16 13:53:31 -05:00
edgul
5d93ff874c Bug 1864385 - Block set-cookie from multipart/x-mixed-replace with pref. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D198197
2024-01-16 17:05:35 +00:00
dylan
e7a5a40c46 Bug 1742554 - removed instances of ftp. r=necko-reviewers,dom-storage-reviewers,kershaw,valentin,janv
Differential Revision: https://phabricator.services.mozilla.com/D197368
2024-01-16 16:11:00 +00:00
Kershaw Chang
39bd8d1622 Bug 1871048 - Don't call OnDataFinished on main thread, r=jesup,necko-reviewers,valentin,sunil
Differential Revision: https://phabricator.services.mozilla.com/D197141
2024-01-10 16:33:22 +00:00
Tom Ritter
68cae289a0 Bug 1851816: Pass PBM Status into RFPIsEnabledFor r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D192501
2023-12-18 18:39:33 +00:00
Masatoshi Kimura
13e35f0078 Bug 1867229 - Remove unused fields from nsIDirIndex and nsIDirIndexParser. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D194966
2023-11-29 10:25:43 +00:00
Noemi Erli
a4dae64f34 Backed out 2 changesets (bug 1851816) for causing private browsing related failures CLOSED TREE
Backed out changeset d2f63b3f6342 (bug 1851816)
Backed out changeset 7d0d2fe95e67 (bug 1851816)
2023-11-07 00:18:54 +02:00
Tom Ritter
19d70df0a2 Bug 1851816: Pass PBM Status into RFPIsEnabledFor r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D192501
2023-11-06 21:02: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
sunil mayya
04090eba6f Bug 1823551 - add overflow check in nsDirIndexParser::OnDataAvailable(). r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181874
2023-07-04 07:23:50 +00:00
Manuel Bucher
2b36fbf1bb Bug 1715401 - Fix highly compressed brotli responses with unknown content-type being rejected r=necko-reviewers,valentin
Highly compressed brotli files contain meta blocks that don't produce
output from the first 512 Bytes. That is because the meta block header
might be longer than 512 Bytes.[1] NBLTYPESL, NBLTYPESI, NBLTYPESD,
NTREESL, NTREESD all can blow up the header size. Each at least by
2*256 bits.

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

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

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

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

Differential Revision: https://phabricator.services.mozilla.com/D175460
2023-06-29 14:23:47 +00:00
Tom Schuster
c2eed54197 Bug 1838415 - Use RFPTarget::JSDateTimeUTC for IndexedToHTML date/time formatting. r=tjr,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181244
2023-06-26 07:17:39 +00:00
Sandor Molnar
20af0665ba Backed out changeset 5276a2dbe3d2 (bug 1839177) for causing wpt failures in /fetch/content-encoding/bad-gzip-body.any.worker.html CLOSED TREE 2023-06-23 18:11:59 +03:00
Manuel Bucher
71d6172ae6 Bug 1839177 - Always call OnStopRequest after OnStartRequest even with failures in OnDataAvailable in nsUnknownDecoder::ConvertEncodedData r=necko-reviewers,kershaw
The contract is that after calling OnStartRequest once we then MUST call OnStopRequest, once.

Differential Revision: https://phabricator.services.mozilla.com/D181387
2023-06-23 12:14:04 +00:00
Tom Schuster
4fff4bc6ec Bug 1837153 - Make RFPTarget parameter of bare ShouldResistFingerprinting non-optional. r=tjr,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D180666
2023-06-14 13:34:59 +00:00
Magnus Melin
2d47f69966 Bug 1817796 - Adjust smiley and embarassed smiley-to-emoji conversion. r=necko-reviewers,valentin
Adjust the smiley icon.
Also adjust embarassed detection which was wrong. The :-[ is more like bummed I think, but it's also "bat" so given it's not always clear what it means, probably best to not convert that.
Embarrassed emoji according to https://en.wikipedia.org/wiki/List_of_emoticons

Differential Revision: https://phabricator.services.mozilla.com/D179904
2023-06-05 11:47:41 +00:00
nicklas boman
5e31225558 Bug 1724649 - Followup to remove #include plstr.h r=necko-reviewers,xpcom-reviewers,valentin,nika
Differential Revision: https://phabricator.services.mozilla.com/D177690
2023-05-15 14:53:02 +00:00
Jonathan Kew
3002762e41 Bug 1812386 - Limit lookahead length in mozTXTToHTMLConv::NumberOfMatches to mitigate O(n^2) performance degradation. r=necko-reviewers,valentin
Arbitrarily limit how far we'll look ahead for matching delimiters,
to avoid hanging on huge strings.
This could result in failing to style a chunk of the content,
but it's unlikely any resulting styling would be useful anyhow.

Based on https://github.com/Betterbird/thunderbird-patches/blob/main/102/bugs/1812386-optimise-FindURLStart-End-m-c.patch

Differential Revision: https://phabricator.services.mozilla.com/D171720
2023-03-06 16:02:59 +00:00
Jonathan Kew
3775a087cc Bug 1812386 - Avoid some redundant string allocation/copying in mozTXTToHTMLConv. r=necko-reviewers,valentin
No change in behavior, purely a performance optimization.

Based on analysis by Betterbird project in https://bugzilla.mozilla.org/show_bug.cgi?id=1812386#c7
and patch at https://github.com/Betterbird/thunderbird-patches/blob/main/102/bugs/1812386-optimise-FindURLStart-End-m-c.patch

Differential Revision: https://phabricator.services.mozilla.com/D171699
2023-03-06 16:02:59 +00:00