Commit Graph
15 Commits
Author SHA1 Message Date
Nika Layzell fefe96c796 Bug 2020817 - Part 1: Clean up NetAddr ToString, r=necko-reviewers,kershaw
This will be useful in later parts, as otherwise the changed callers would hit
the static analysis added in part 2. This new approach should also
theoretically be slightly more efficient in some cases.

Differential Revision: https://phabricator.services.mozilla.com/D286155
2026-03-25 08:22:57 +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 4026d176c2 Bug 1930826 - Fix memcpy usage to meet standard requirements r=jgilbert,necko-reviewers,xpcom-reviewers,glandium,karlt,valentin,nika,gsvelto,peterv
As mentioned in https://en.cppreference.com/w/cpp/string/byte/memcpy,
memcpy requires trivially copyable types. Same property holds for
memset.

GCC checks this, and clang will do in next release. In both cases it can
be silenced locally by casting the destination parameter to void*.

This patch introduces the following changes:

- AssignRangeAlgorithm was dispatching on the trivially constructable
  trait, not trivially copyable. Note that it is basically a
  reimplementation of std::uninitialized_copy_n, but using the later would
  by-pass some specialization of nsTArrayElementTraits<T>::Construct.

- ShBuiltInResources default constructor already performs a memset

- mCachedAnonymousContentStyleIndexes used to contain std::pair<uint8_t,
  uint8_t> which is not trivially copyable (!) at least under older
  libstdc++. Use a more explicit POD type instead.

- PodOperations.h was not checking type requirements, it now does and
  issue a compilation error in case of misuse.

- NetAddr copy and default constructors are already defined, so use them
  instead of plain memset/memcpy.

- NetAddr has a copy constructor from PSNetAddr*, use it instead of a
  plain memcpy.

- Do not create a temporary mozilla::phc::AddrInfo through a memcpy when
  what we actually want is a reintepret_cast. Still perform a memcpy on
  the bytes to enforce alignment.

Differential Revision: https://phabricator.services.mozilla.com/D231203
2024-12-12 07:08:39 +00:00
Valentin Gosu 0bda58b253 Bug 1663657 - Turn IsIpAddr* functions into NetAddr methods r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D89552
2020-09-15 10:39:56 +00:00
Razvan Maries 287a69b58e Backed out 4 changesets (bug 1660970, bug 1525854, bug 1663657, bug 1645108) for perma failures on test_trr_additional_section.js. CLOSED TREE
Backed out changeset ad6c2e8af09b (bug 1663657)
Backed out changeset 419e26e3f452 (bug 1525854)
Backed out changeset 55bf856faf33 (bug 1660970)
Backed out changeset c543a3a008fa (bug 1645108)
2020-09-15 02:35:05 +03:00
Valentin Gosu 700aeb523b Bug 1663657 - Turn IsIpAddr* functions into NetAddr methods r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D89552
2020-09-14 12:06:27 +00:00
Valentin Gosu b6dfcaa940 Bug 1623126 - Parse HTTPSSVC records in TRR r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D71389
2020-05-04 19:56:51 +00:00
Dorel Luca 6931033b80 Backed out 6 changesets (bug 1623126) for build bustage in include/mozilla/net/HTTPSSVC.h. CLOSED TREE
Backed out changeset a2138b587838 (bug 1623126)
Backed out changeset d007557a3278 (bug 1623126)
Backed out changeset 04f7ec5742c5 (bug 1623126)
Backed out changeset 48466d966ef0 (bug 1623126)
Backed out changeset 80cfd249692b (bug 1623126)
Backed out changeset d49b0ed494f7 (bug 1623126)
2020-05-04 20:54:15 +03:00
Valentin Gosu 6d9b69ff75 Bug 1623126 - Parse HTTPSSVC records in TRR r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D71389
2020-05-04 16:19:19 +00:00
Sylvestre Ledru ad31adba4c Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956
2019-05-01 08:47:10 +00:00
Sylvestre Ledru e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Henri Sivonen 6107ddc18e Bug 1484984 - Avoid writing past the logical length of a string in networking code. r=valentin
MozReview-Commit-ID: IIffoxnF6KS

Differential Revision: https://phabricator.services.mozilla.com/D3884
2018-08-21 14:20:48 +00:00
Sylvestre Ledru 9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Birunthan Mohanathas a0f7c73250 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
James Kitchener f3e2ed9bfd Bug 1100184 - Flatten netwerk/base/{public,src}/ directories. r=mcmanus, r=poiru 2015-01-20 03:58:00 -05:00