Lars Eggert
be9e8189a9
Bug 2026701 - Annotate all mutex/monitor usages in netwerk r=valentin,necko-reviewers,webrtc-reviewers,cookie-reviewers,jesup,bwc
...
Eliminates most MOZ_UNANNOTATED occurrences in netwerk/, enabling
Clang's -Wthread-safety analyzer to enforce lock discipline across the
entire directory. The remaining occurrence (nsHttpChannel::mRCWNLock) is
intentionally left as MOZ_UNANNOTATED; it will be removed by D285971.
35 locks receive proper MOZ_GUARDED_BY/MOZ_REQUIRES annotations. 8 locks
are marked MOZ_ANNOTATED where annotation is genuinely not appropriate
(pure condition variables, write-once-then-read-without-lock patterns,
hot paths with intentional lockless reads).
Beyond mechanical marker removal, the annotations surfaced several real
access pattern issues that were fixed: lockless reads in nsUDPSocket,
nsServerSocket, TLSServerSocket, nsHttpConnection, HttpConnectionUDP,
HttpTransactionParent, HttpBackgroundChannelParent, nsHttpActivityDistributor,
and NetlinkService (Linux-only, surfaced by CI); plus a double-checked lockless
read in nsHostResolver::FromUnspecEntry. Initialization-time writes use
MOZ_PUSH_IGNORE_THREAD_SAFETY since no race is possible before the object
is shared.
Differential Revision: https://phabricator.services.mozilla.com/D290185
2026-04-24 09:12:31 +00:00
Sylvestre Ledru
a22215a2f9
Bug 2023419 - Remove Emacs/Vim modelines from netwerk/ r=emilio,cookie-reviewers,valentin
...
replaced by .editorconfig
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D287861
2026-03-17 12:06:31 +00:00
serge-sans-paille
65210036bd
Bug 1996909 - Remove unused mfbt inclusion in netwerk/** r=emilio,cookie-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D270366
2025-10-29 07:59:33 +00:00
serge-sans-paille
b938fe44ff
Bug 1991397 - Use [[no_unique_address]] to implement Compact Pair r=necko-reviewers,kershaw
...
It makes the implementation trivial compared to the Empty Base
Optimization one.
Differential Revision: https://phabricator.services.mozilla.com/D266656
2025-10-02 05:14:03 +00:00
Jens Stutte
4ac19ccb48
Bug 1959367 - Protect nsURLHelper singletons against unwanted initializations. r=necko-reviewers,jesup
...
Differential Revision: https://phabricator.services.mozilla.com/D244903
2025-04-11 07:20:10 +00:00
Valentin Gosu
fe9d3b791e
Bug 1943056 - Remove flags from net_coalescePath r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D235151
2025-02-11 09:56:45 +00:00
Alexandru Marc
d0f37bdc8f
Backed out changeset 8adf0a890d71 (bug 1943056) for causing build bustages @ TestStandardURL.cpp CLOSED TREE
2025-02-10 15:35:19 +02:00
Valentin Gosu
b55892db8d
Bug 1943056 - Remove flags from net_coalescePath r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D235151
2025-02-10 12:23:33 +00:00
Valentin Gosu
c4f6c05d7f
Bug 1942820 - Make sure %2e%2e in the last path segment of the URL keeps the / r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D235145
2025-01-24 12:33:43 +00:00
edgul
5e6b8dbf82
Bug 1914141 - Added an ending-in-number check for non-ipv4 domains for Services.io.isValidHostname. r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D220488
2024-09-05 21:07:34 +00:00
Sean
f8538e6b16
Bug 1873915 - %2e entered in URL bar not normalized leading to denormalized request r=necko-reviewers,kershaw,jesup
...
Differential Revision: https://phabricator.services.mozilla.com/D210800
2024-06-24 11:39:29 +00:00
Cristian Tuns
2a6ebef20a
Backed out changeset 1134e476cb57 (bug 1873915) for causing GTest failures with return code -11. CLOSED TREE
2024-06-19 13:12:58 -04:00
Sean
e610013b45
Bug 1873915 - %2e entered in URL bar not normalized leading to denormalized request r=necko-reviewers,kershaw,jesup
...
Differential Revision: https://phabricator.services.mozilla.com/D210800
2024-06-19 13:19:10 +00:00
Randell Jesup
b1d67b5977
Bug 1891506: Fix issue with net_CoalesceDirs r=valentin,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D207614
2024-04-19 15:00:37 +00:00
Valentin Gosu
ad12fadc36
Bug 1890346 - Make sure net_CoalesceDirs doesn't overwrite initial / r=necko-reviewers,kershaw
...
Before bug 1887614 landed this bug was impossible to trigger because
urlPtr would always advance by the time we got to copying #?.
However, once we allowed calling net_CoalesceDirs for a dirLength > 0,
urlPtr will stay on the first character, while fwdPtr is on ?.
That meant we incorrectly coalesced "/..?" to "?".
Differential Revision: https://phabricator.services.mozilla.com/D206986
2024-04-09 11:26:24 +00:00
Emilio Cobos Álvarez
de09ab0dd6
Bug 1887719 - More consistently use UTF8String/nsCString for URLs. r=necko-reviewers,webidl,anti-tracking-reviewers,places-reviewers,jari,kershaw,janv,smaug,hsivonen
...
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...
This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.
Differential Revision: https://phabricator.services.mozilla.com/D205601
2024-04-04 11:49:57 +00:00
abhishekmadan30
c88d23d6f3
Bug 1877419 - Part 1: Added nested stripping of urls to copy without site tracking. r=pbz,necko-reviewers
...
Depends on D204914
Differential Revision: https://phabricator.services.mozilla.com/D202943
2024-03-28 18:02:16 +00:00
abhishekmadan30
35f5bdaf2c
Bug 1884941 - Add an option to URLParams::Parse() for if it should decode the parameters or not. r=anti-tracking-reviewers,necko-reviewers,valentin,timhuang.
...
Differential Revision: https://phabricator.services.mozilla.com/D204914
2024-03-28 18:02:16 +00:00
Iulian Moraru
e6f4355ff3
Backed out 3 changesets (bug 1877419, bug 1884941) for causing non unified build bustages on URLQueryStringStripper.cpp. CLOSED TREE
...
Backed out changeset 53db0be27620 (bug 1877419)
Backed out changeset b7fab4b145f7 (bug 1877419)
Backed out changeset 78436da20d95 (bug 1884941)
2024-03-26 19:37:45 +02:00
abhishekmadan30
2949cced18
Bug 1877419 - Part 1: Added nested stripping of urls to copy without site tracking. r=pbz,necko-reviewers
...
Depends on D204914
Differential Revision: https://phabricator.services.mozilla.com/D202943
2024-03-26 14:42:07 +00:00
abhishekmadan30
e94987e2b4
Bug 1884941 - Add an option to URLParams::Parse() for if it should decode the parameters or not. r=anti-tracking-reviewers,necko-reviewers,valentin,timhuang.
...
Differential Revision: https://phabricator.services.mozilla.com/D204914
2024-03-26 14:42:07 +00:00
Noemi Erli
89ffefa292
Backed out 3 changesets (bug 1884941, bug 1877419) for causing bustage in URLQueryStringStripper.cpp CLOSED TREE
...
Backed out changeset 32c74a4cd05b (bug 1877419)
Backed out changeset c2ca2f596c09 (bug 1877419)
Backed out changeset 45931e6db21e (bug 1884941)
2024-03-25 21:50:27 +02:00
abhishekmadan30
7ac746ddf4
Bug 1877419 - Part 1: Added nested stripping of urls to copy without site tracking. r=pbz,necko-reviewers
...
Depends on D204914
Differential Revision: https://phabricator.services.mozilla.com/D202943
2024-03-25 18:30:38 +00:00
abhishekmadan30
d41edcad79
Bug 1884941 - Add an option to URLParams::Parse() for if it should decode the parameters or not. r=anti-tracking-reviewers,necko-reviewers,valentin,timhuang.
...
Differential Revision: https://phabricator.services.mozilla.com/D204914
2024-03-25 18:30:38 +00:00
Valentin Gosu
2aeca347a7
Bug 1843717 - Don't replace backslashes in the hash of the URL r=necko-reviewers,kershaw
...
This bug seems to have existed since bug 249282
The probem was that on windows we wanted to normalize the path of the
file URLs. When doing that bug 249282 also started normalizing the
inputs of relative file URLs, such that it triggers this bug.
When normalizing the input, the normalization should have stopped at the
'#' character. This patch fixes net_NormalizeFileURL to address that.
Since file URLs are only ever parsed with nsStandardURL and this
implementation already normalizes file paths for all special schemes
(file, http, https, etc) calling net_NormalizeFileURL before creating
a file URL is no longer needed, so we can remove the call in
NS_NewURI entirely.
Differential Revision: https://phabricator.services.mozilla.com/D199721
2024-01-30 10:51:15 +00:00
dylan
390a5567f9
Bug 1406337 - Removed comment handling from net_ParseMediaType. r=kershaw,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D198038
2024-01-12 17:50:18 +00:00
dylan
15d12914c6
Bug 1848874 - Removed network.dns.limit_253_chars pref. r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D186573
2023-09-08 09:43:05 +00:00
Thomas Wisniewski
3993d66f78
Bug 1397646 - return empty statusText for HTTP2 fetches and XMLHttpRequests; r=kershaw,necko-reviewers,sunil
...
Differential Revision: https://phabricator.services.mozilla.com/D184527
2023-08-08 19:47:39 +00:00
Iulian Moraru
b1529c5cba
Backed out changeset 675cf3cb3d33 (bug 1397646) for causing mochitest failures on test_fetch_basic_http.html. CLOSED TREE
2023-08-07 07:46:50 +03:00
Thomas Wisniewski
7009795aa6
Bug 1397646 - return empty statusText for HTTP2 fetches and XMLHttpRequests; r=kershaw,necko-reviewers,sunil
...
Differential Revision: https://phabricator.services.mozilla.com/D184527
2023-08-07 04:00:31 +00:00
sankalp1999
77907749b2
Bug 1831587 - add value arg to delete and has, working wpt, delete ini r=valentin,necko-reviewers,webidl,smaug,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D177957
2023-05-29 13:32:06 +00:00
Tim Huang
02a362a5a8
Bug 1742598 - Part 1: Add an parameter to URLParams::Serialize() to indicate if the encoding is needed for the serialization result. r=smaug,necko-reviewers,dragana
...
The URL query stripping doesn't want the URLParams::Serialize() to
encode the result because it will encode the unstripped parameters. This
will change the unstripped parameters once stripping was happened.
Therefore, we introduce an parameter to URLParams::Serialize() to
disable encoding.
Differential Revision: https://phabricator.services.mozilla.com/D131964
2021-11-25 12:13:48 +00:00
Valentin Gosu
bec9ce6949
Bug 1735299 - Use fewer NS_ADDREF in netwerk/ r=nhnt11
...
Differential Revision: https://phabricator.services.mozilla.com/D128176
2021-10-19 13:44:24 +00:00
Valentin Gosu
56cd5036af
Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 12:35:16 +00:00
Butkovits Atila
1f3e4dc865
Backed out changeset c4b44c4ef15b (bug 1714307) for causing build bustages on nsHTTPCompressConv.h. CLOSED TREE
2021-06-04 13:53:37 +03:00
Valentin Gosu
5b4ead87fd
Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 10:00:55 +00:00
Valentin Gosu
bf46812563
Bug 1708116 - Use NetAddr::InitFromString instead of PR_StringToNetAddr r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D113752
2021-05-10 09:26:01 +00:00
Brindusan Cristian
7160a8c9c4
Backed out 2 changesets (bug 1708116) for causing xpcshell failures in test_udpsocket_offline.js and bc failures in browser_cookies_ipv6.js. CLOSED TREE
...
Backed out changeset 0c9b303226f1 (bug 1708116)
Backed out changeset e3be13d3c045 (bug 1708116)
2021-05-06 16:35:48 +03:00
Valentin Gosu
9050e8f69b
Bug 1708116 - Use NetAddr::InitFromString instead of PR_StringToNetAddr r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D113752
2021-05-06 10:06:46 +00:00
Christian Holler
bd83c65248
Bug 1709559 - Avoid using PL_str implementations when fuzzing network. r=valentin,necko-reviewers,xpcom-reviewers,KrisWright
...
Differential Revision: https://phabricator.services.mozilla.com/D114347
2021-05-05 18:09:28 +00:00
Sandor Molnar
7cf808420e
Backed out 2 changesets (bug 1708116) for causing build bustages. CLOSED TREE
...
Backed out changeset d1488e9d64a6 (bug 1708116)
Backed out changeset 44ed91f0b7b4 (bug 1708116)
2021-05-04 18:41:36 +03:00
Valentin Gosu
5ec2d7d670
Bug 1708116 - Use NetAddr::InitFromString instead of PR_StringToNetAddr r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D113752
2021-05-04 14:05:59 +00:00
Valentin Gosu
5cf3d4b253
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
Valentin Gosu
3ded97282f
Bug 1264117 - Limit length of hostnames to 253 characters r=nhnt11,necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D105609
2021-02-19 17:02:34 +00:00
Butkovits Atila
632ee6e8c2
Backed out changeset 0b48f6f8e965 (bug 1264117) for causing failures on test_dns_service.js. CLOSED TREE
2021-02-19 16:41:04 +02:00
Valentin Gosu
9f64ba69c4
Bug 1264117 - Limit length of hostnames to 253 characters r=nhnt11,necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D105609
2021-02-19 11:45:05 +00:00
Butkovits Atila
8ad1fefc67
Backed out changeset fd00d1b7fd67 (bug 1264117) for causing failures on test_dns_service_wrap.js.
2021-02-19 12:20:49 +02:00
Valentin Gosu
88faab940a
Bug 1264117 - Limit length of hostnames to 253 characters r=nhnt11,necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D105609
2021-02-19 09:17:42 +00:00
Butkovits Atila
2b22f24041
Bug 1673682 - Add missing include. r=fix. CLOSED TREE
2020-11-13 12:14:29 +02:00
Simon Giesecke
b03d553563
Bug 1673682 - Add documentation to several URLParam member functions. r=valentin,necko-reviewers
...
Depends on D96444
Differential Revision: https://phabricator.services.mozilla.com/D96567
2020-11-10 13:04:58 +00:00