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

371 Коммитов

Автор SHA1 Сообщение Дата
Kershaw Chang 3e18a57e83 Bug 1907539 - Don't calculate network ID during shutdown, r=acreskey
Differential Revision: https://phabricator.services.mozilla.com/D216387
2024-07-18 10:06:58 +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
serge-sans-paille a1106cbc85 Bug 1883720 - (re)Move checks for socket, gethostbyname_r and demangle to moz.configure r=glandium
Actually remove the check for demangle, no supported target need that
check.

Also make library dependencies explicit instead of relying on "$LIBS".

Differential Revision: https://phabricator.services.mozilla.com/D203637
2024-05-17 07:35:09 +00:00
Tamas Szentpeteri 22c92af506 Backed out 3 changesets (bug 1883720, bug 1883719, bug 1883615) for causing multiple failures. CLOSED TREE
Backed out changeset 495b9e84ba9d (bug 1883720)
Backed out changeset 5a89cbc54dd2 (bug 1883615)
Backed out changeset 9d075e352b0e (bug 1883719)
2024-05-15 13:30:17 +03:00
serge-sans-paille ceff7deb44 Bug 1883720 - (re)Move checks for socket, gethostbyname_r and demangle to moz.configure r=glandium
Actually remove the check for demangle, no supported target need that
check.

Also make library dependencies explicit instead of relying on "$LIBS".

Differential Revision: https://phabricator.services.mozilla.com/D203637
2024-05-15 07:47:56 +00:00
Emilio Cobos Álvarez 8aaf44fea9 Bug 1893683 - Remove ns{A,C}String and other xpcom dependencies from nsStringBuffer. r=smaug,media-playback-reviewers,karlt
* nsStringBuffer::FromString -> nsTSubString::GetStringBuffer
 * nsStringBuffer::ToString -> nsTSubString::Assign(nsStringBuffer*, len)
 * Move refcounting inline but refcount-logging and other XPCOM-related
   things out-of-line.

Differential Revision: https://phabricator.services.mozilla.com/D208771
2024-05-09 08:34:35 +00:00
Mike Maksymowych 47b3e6984e Bug 1883282 - Use PromiseFlatCString to null-terminate log. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D203549
2024-05-06 12:29:02 +00:00
ChaseKnowlden f85bc5de2c Bug 1862514 - Remove extra semicolon. r=sylvestre,necko-reviewers,jesup DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D192797
2023-11-06 06:53:22 +00:00
Mike Hommey 9331b9fb07 Bug 1851529 - Set clang-format ColumnLimit consistently. r=sylvestre,necko-reviewers,kershaw
For some reason, its value in the Google style we use is 80... except
for Objective-C, where it's 100, which led to things like:
https://hg.mozilla.org/mozilla-central/rev/31bf68247e6e
https://hg.mozilla.org/mozilla-central/rev/64ceb33533a4.

There's probably a discussion to have about whether 80 is the right
limit, but since it's what's used for everything except ObjC, let's roll
with it.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D187409
2023-09-05 11:23:01 +00:00
Mike Hommey 5af31a8886 Bug 1839762 - Cast scoped enums to their underlying type when printing them. r=media-playback-reviewers,necko-reviewers,application-update-reviewers,geckoview-reviewers,handyman,emilio,valentin,bytesized,owlish,karlt
There is no implicit conversion for scoped enums, so using them without
an explicit conversion in varargs functions is undefined behavior. GCC
has had a warning about this for a long while, but clang only gained
this a few days ago on trunk.

Differential Revision: https://phabricator.services.mozilla.com/D181723
2023-06-24 20:14:31 +00:00
Kershaw Chang aaaa50137e Bug 1836562 - Avoid allocating too much memory for ARP table, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D180704
2023-06-13 12:50:43 +00:00
Makoto Kato 19f275b625 Bug 1836432 - Use nsresult exception mode for GeckoAppShell.getDNSDomains. r=geckoview-reviewers,necko-reviewers,valentin,ohall
There is some OOM errors by `GeckoAppShell.getDNSDomains`. Since
`nsAndroidNetworkLinkService::GetDnsSuffixList` can returns `nsresult`, we
should return error instead of crash.

Differential Revision: https://phabricator.services.mozilla.com/D179791
2023-06-04 10:53:32 +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
Pier Angelo Vendrame 8e7aa245c2 Bug 1817756 - Add a seed to the network ID. r=valentin,necko-reviewers
This helps to prevent linkability of users in the same network.

Differential Revision: https://phabricator.services.mozilla.com/D170373
2023-02-21 14:10:39 +00:00
Kershaw Chang 416ce12806 Bug 1789808 - Fix buffer overflow, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D158654
2022-10-18 08:18:20 +00:00
Serge Guelton daee4de4d2 Bug 1769027 - Cleanup netwerk includes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D146164
2022-05-30 14:21:13 +00:00
Mike Hommey ec71e64fa5 Bug 1766561 - Fix various formatting errors. r=media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,rkraesig,alwu,padenot,kershaw
- Missing/Extra formatting directives
- Typos in formatting directives
- Non-literal strings used as formatting strings
- Wrong types passed as argument
- Swapped/Wrong arguments
- Commas between parts of unique formatting strings

Differential Revision: https://phabricator.services.mozilla.com/D144921
2022-05-03 20:49:10 +00:00
Mike Hommey 08edf30a1b Bug 1766561 - Add missing l modifier for long formatting. r=Jamie,media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,gerald,application-update-reviewers,bytesized,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144917
2022-05-03 20:49:08 +00:00
Mike Hommey 1663cab462 Bug 1766561 - Add missing l modifier for HRESULT formatting. r=media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,rkraesig,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144915
2022-05-03 20:49:07 +00:00
Nika Layzell dedb92d85b Bug 1738103 - Part 3: DelayedRunnable should only be used with nsISerialEventTarget, r=necko-reviewers,valentin
The existing behaviour of the code is not fully compatible with nsIEventTarget.

Differential Revision: https://phabricator.services.mozilla.com/D129839
2022-03-23 22:22:03 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Gerald Squelart 5802980a6e Bug 1757596 - #include "mozilla/ProfilerThreadSleep.h" instead of GeckoProfiler.h where possible - r=florian
And in one case, #include "mozilla/ProfilerThreadState.h" where only `AUTO_PROFILER_THREAD_WAKE` is used.

Depends on D140172

Differential Revision: https://phabricator.services.mozilla.com/D140173
2022-03-08 10:32:44 +00:00
Florian Quèze 7b45ca4063 Bug 1754519 - Add missing profiler_thread_sleep annotations, r=gerald,necko-reviewers,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D138341
2022-02-11 15:19:46 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Florian Quèze 998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Valentin Gosu 1a1f42da37 Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-11 07:10:41 +00:00
Csoregi Natalia 938a6943c6 Backed out changeset 6e00f8bd2acc (bug 1714307) for causing hazard bustage. CLOSED TREE 2021-06-09 21:50:03 +03:00
Valentin Gosu d1513f313e Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-09 10:20:04 +00:00
Valentin Gosu d595491cc7 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 692bda1ca1 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 98146ae90b 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 ace4e67a15 Bug 1649124 - Trigger VPN_DETECTED platformIndications for Mozilla VPN r=necko-reviewers,kershaw
This change also records the VPN_DETECTED platform indication when the Mozilla VPN adapter is active. The same interface type (IF_TYPE_PROP_VIRTUAL - proprietary virtual interface) is commonly used for other VPN implementations, so this should cover more of our bases.

Additionaly we also detect this is one of the interfaces contains the string "VPN" in its FriendlyName or Description. We do this in order to detect less common VPN types.

This change means that users currently enrolled in doh-rollout that are running a VPN will not be using DoH. This is good as using DoH with a VPN might leak the user's real location by resolving domains differently. See bug 1628149 comment 27.

Differential Revision: https://phabricator.services.mozilla.com/D116463
2021-06-02 07:33:48 +00:00
Nika Layzell 461b98ded0 Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115108
2021-05-18 20:45:17 +00:00
Alexandru Michis 08e0f3cf36 Backed out 4 changesets (bug 1711090) for causing bustages in nsTimerImpl.cpp
CLOSED TREE

Backed out changeset 5c6f0950714d (bug 1711090)
Backed out changeset 0b6a886eea8a (bug 1711090)
Backed out changeset fc9c788ff41d (bug 1711090)
Backed out changeset ecc51d9ad027 (bug 1711090)
2021-05-18 20:25:56 +03:00
Nika Layzell 2eead824d8 Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115108
2021-05-18 16:24:48 +00:00
Andi-Bogdan Postelnicu 2508edc4c5 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,geckoview-reviewers,agi
Updated with clang-format version 11.0.1 (taskcluster-GI8pmG3eQ_OSXfjFfr2yFw)

\# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D113294
2021-04-26 15:52:25 +00:00
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Valentin Gosu ba0966a067 Bug 1675542 - Add stubs for Android and OSX impl of nsINetworkLinkService.resolvers r=necko-reviewers,dragana
Depends on D96084

Differential Revision: https://phabricator.services.mozilla.com/D96085
2021-03-15 17:58:03 +00:00
Valentin Gosu e9ae3a03ea Bug 1675542 - Add API to get the system DNS resolver IPs [windows] r=necko-reviewers,dragana
Depends on D96065

Differential Revision: https://phabricator.services.mozilla.com/D96084
2021-03-15 17:58:02 +00:00
Valentin Gosu 841b804940 Bug 1675542 - Add API to get the system DNS resolver IPs [Linux] r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D96065
2021-03-15 17:58:02 +00:00
Valentin Gosu 2908546667 Bug 1698388 - Fix static-analysis warnings in NetLinkService.cpp r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D108358
2021-03-15 10:28:32 +00:00
Sylvestre Ledru 4edd85cc9b Bug 1519636 - Reformat recent changes to the Google coding style r=necko-reviewers,valentin
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D106920
2021-03-02 16:14:46 +00:00
Simon Giesecke d8a9ea3048 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in netwerk. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106097
2021-03-01 16:41:20 +00:00