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

341 Коммитов

Автор SHA1 Сообщение Дата
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
Valentin Gosu 8c97be5391 Bug 1692657 - OSX dns suffix is not detected properly r=kershaw,necko-reviewers
- Uses __res_state.dnsrch to get the DNS suffix domains
- Adds a delay to the DNS suffix check when triggered by a network change
- Implements nsStreamTransportService::DelayedDispatch

Differential Revision: https://phabricator.services.mozilla.com/D106610
2021-02-26 13:56:27 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Masatoshi Kimura 22723674f7 Bug 1684110 - Stop using some 'A'-functions in netwerk/. r=necko-reviewers,kershaw
Depends on D100466

Differential Revision: https://phabricator.services.mozilla.com/D100467
2021-01-04 20:34:50 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Michal Novotny 9198a0f0ae Bug 1637947 - network ID: link status isn't updated in NetlinkService::OnAddrMessage() r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D76194
2020-05-21 16:55:42 +00:00
Aaron Klotz 53710190f5 Bug 1637452: Part 7 - Fix JNI includes in netwerk; r=necko-reviewers,valentin
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75370
2020-05-15 17:04:32 +00:00
Simon Giesecke 00122bbae3 Bug 1626570 - Improve handling of copying arrays in netwerk/. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D73678
2020-05-06 11:48:42 +00:00
sonakshi ec5af734d9 Bug 1586774 - network ID: split NetlinkService::CalculateIDForFamily() into multiple methods r=michal
Differential Revision: https://phabricator.services.mozilla.com/D69404

--HG--
extra : moz-landing-system : lando
2020-04-07 10:03:09 +00:00
Simon Giesecke 14dbfcaa29 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in netwerk. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D65496

--HG--
extra : moz-landing-system : lando
2020-03-06 09:22:49 +00:00
Michal Novotny ae154f5e8f Bug 1617036 - Remove NETWORK_TIME_BETWEEN_NETWORK_CHANGE_EVENTS probe r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D63571

--HG--
extra : moz-landing-system : lando
2020-02-24 15:09:40 +00:00
Cosmin Sabou 922d7d1c75 Backed out changeset 39ac1f7241ee (bug 1617036) for android bustages on nsAndroidNetworkLinkService.cpp.
CLOSED TREE
2020-02-24 16:43:08 +02:00
Michal Novotny 4928a446af Bug 1617036 - Remove NETWORK_TIME_BETWEEN_NETWORK_CHANGE_EVENTS probe r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D63571

--HG--
extra : moz-landing-system : lando
2020-02-24 13:44:21 +00:00
Eric Rahm 2c08316c5d Bug 1610070 - Part 3: Convert the rest of netwerk/ to use UniquePtr. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D60341

--HG--
extra : moz-landing-system : lando
2020-02-11 16:20:08 +00:00
Sylvestre Ledru cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca 506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru 6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
Eric Rahm 78ee6675cf Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59042

--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Sylvestre Ledru c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58175

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00