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

233 Коммитов

Автор SHA1 Сообщение Дата
David Parks f2cc4261be Bug 1840680: Add UNKNOWN to types of network for polling wifi scans r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D182249
2023-06-28 18:27:35 +00:00
David Parks 96bc62185d Bug 1833020: Fix TestWifiMonitor async mock objects r=necko-reviewers,valentin
gMock objects cannot be reused after they receive calls to the mocked functions.  This patch changes the test to establish all of the mock expectations upfront for each network-change notification before running it.  It uses gMock Sequence objects and a checkpoint to maintain (partial) temporal order.

Differential Revision: https://phabricator.services.mozilla.com/D180622
2023-06-26 19:54:41 +00:00
Nicklas Boman b91ba7b84e Bug 1833732 - Freebsd build error after wifi scanning refactor r=necko-reviewers,jesup DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D178375
2023-05-22 22:11:08 +00:00
David Parks 603d89ce81 Bug 1810421: Only scan wifi when the network changes or when on mobile r=necko-reviewers,kershaw a=reland CLOSED TREE
Simplifies the concurrent operations of wifi scanning and reduces the
frequency in common cases.  Wifi scanning when on mobile is reduced from
every 5 seconds to every minute.  Wifi scans will also happen whenever
a new listener is registered.

Differential Revision: https://phabricator.services.mozilla.com/D176200
2023-05-13 00:36:01 +00:00
David Parks 61ef08e50a Bug 1810421: Refactor wifi scanning to consolidate generic code r=necko-reviewers,kershaw,valentin a=reland CLOSED TREE
Reorganizes the wifi-scanning code and makes more of it platform-generic
to ease the transition from polling the wifi to usually scanning only on
network changes.  This is essentially just moving files/code around and
promoting nsWifiMonitor::DoScan to be platform-independent.

Differential Revision: https://phabricator.services.mozilla.com/D176199
2023-05-13 00:36:00 +00:00
Noemi Erli 130ecb18fc Backed out 2 changesets (bug 1810421) for causing failures in test_stickyprefs.js CLOSED TREE
Backed out changeset 028af3d71e19 (bug 1810421)
Backed out changeset 35c408b9531d (bug 1810421)
2023-05-13 15:51:53 +03:00
David Parks ce4a1d3478 Bug 1810421: Only scan wifi when the network changes or when on mobile r=necko-reviewers,kershaw
Simplifies the concurrent operations of wifi scanning and reduces the
frequency in common cases.  Wifi scanning when on mobile is reduced from
every 5 seconds to every minute.  Wifi scans will also happen whenever
a new listener is registered.

Differential Revision: https://phabricator.services.mozilla.com/D176200
2023-05-13 00:36:01 +00:00
David Parks 7043482ed4 Bug 1810421: Refactor wifi scanning to consolidate generic code r=necko-reviewers,kershaw,valentin
Reorganizes the wifi-scanning code and makes more of it platform-generic
to ease the transition from polling the wifi to usually scanning only on
network changes.  This is essentially just moving files/code around and
promoting nsWifiMonitor::DoScan to be platform-independent.

Differential Revision: https://phabricator.services.mozilla.com/D176199
2023-05-13 00:36:00 +00:00
Cristian Tuns af5d0c02f1 Backed out 2 changesets (bug 1810421) for causing build bustages in TestWifiMonitor.cpp CLOSED TREE
Backed out changeset 1cf92ef74fb4 (bug 1810421)
Backed out changeset afd62e82fe83 (bug 1810421)
2023-05-10 17:31:15 -04:00
David Parks 02027ae51d Bug 1810421: Only scan wifi when the network changes or when on mobile r=necko-reviewers,kershaw
Simplifies the concurrent operations of wifi scanning and reduces the
frequency in common cases.  Wifi scanning when on mobile is reduced from
every 5 seconds to every minute.  Wifi scans will also happen whenever
a new listener is registered.

Differential Revision: https://phabricator.services.mozilla.com/D176200
2023-05-10 19:46:29 +00:00
David Parks 4b6d4e388a Bug 1810421: Refactor wifi scanning to consolidate generic code r=necko-reviewers,kershaw,valentin
Reorganizes the wifi-scanning code and makes more of it platform-generic
to ease the transition from polling the wifi to usually scanning only on
network changes.  This is essentially just moving files/code around and
promoting nsWifiMonitor::DoScan to be platform-independent.

Differential Revision: https://phabricator.services.mozilla.com/D176199
2023-05-10 19:46:29 +00:00
Nika Layzell d57c9498f6 Bug 1825360 - Remove the NS_DISPATCH_SYNC flag, r=necko-reviewers,geckoview-reviewers,media-playback-reviewers,karlt,jesup,m_kato,emilio
This flag is not supported by most event targets and can have unexpected
side effects (namely spinning a nested event loop). All consumers have
been replaced with a new function which is more explicit about this side
effect.

Differential Revision: https://phabricator.services.mozilla.com/D173985
2023-03-30 16:53:51 +00:00
serge-sans-paille 74f462c959 Bug 1733356 - Fix non-unified build errors in netwerk/ r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D170852
2023-02-28 10:20:16 +00:00
Cosmin Sabou b3b360096e Backed out 3 changesets (bug 1733356) for causing several hybrid bustages.
Backed out changeset 5398605eb0af (bug 1733356)
Backed out changeset dead7940f720 (bug 1733356)
Backed out changeset 97bab99ef206 (bug 1733356)
2023-02-24 19:08:18 +02:00
serge-sans-paille aade476c1e Bug 1733356 - Fix non-unified build errors in netwerk/ r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D170852
2023-02-24 10:41:25 +00:00
Norisz Fay b573807379 Backed out changeset 5876fd60bbe5 (bug 1733356) for causing bustages on Predictor.cpp CLOSED TREE 2023-02-24 12:09:07 +02:00
serge-sans-paille 2ec96999fa Bug 1733356 - Fix non-unified build errors in netwerk/ r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D170852
2023-02-24 08:40:49 +00:00
Nika Layzell 9d6bb19c23 Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Sandor Molnar 41b78439d0 Backed out 6 changesets (bug 1809752, bug 1809753) for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js
Backed out changeset ea05784d74c4 (bug 1809753)
Backed out changeset 7c9b20eebcc8 (bug 1809753)
Backed out changeset d0267ac2256d (bug 1809753)
Backed out changeset aa9f2971bd6f (bug 1809753)
Backed out changeset f0d9fcfaa6f8 (bug 1809752)
Backed out changeset 6d58c799cffe (bug 1809752)
2023-01-17 03:19:24 +02:00
Nika Layzell f7772bb6ae Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell 9e65358787 Bug 1799222 - Part 1: Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-16 17:09:16 +00:00
Cristian Tuns 77f27d96b0 Backed out changeset 42315c023471 (bug 1799222) for causing multiple failures CLOSED TREE 2022-12-06 16:35:58 -05:00
Nika Layzell 40a3a64aee Bug 1799222 - Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-06 20:44:15 +00:00
Mike Hommey d01fe13a7e Bug 1795230 - Fix -Wobjc-method-access warnings in osx_corewlan.mm. r=haik,necko-reviewers,valentin
This replaces deprecated classes, except in the one case where we're
purposely using the deprecated class until it's actively removed.

Differential Revision: https://phabricator.services.mozilla.com/D159368
2022-10-17 21:58:42 +00:00
Andrew McCreight 2da84b8ac4 Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
2022-09-28 15:17:46 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Haik Aftandilian f43f562153 Bug 1776210 - [macOS 13] Stack underflow crashes on Wifi Monitor thread on macOS 13 (Ventura) beta r=mac-reviewers,necko-reviewers,mstange,dragana
Use a larger stack size on macOS 13 for the Wifi monitor thread to accommodate Core WLAN code allocating 217K+ on the stack.

Differential Revision: https://phabricator.services.mozilla.com/D152555
2022-07-25 14:09:09 +00:00
Randell Jesup 5a58ff7cd5 Bug 1207753 - netwerk nsWifiMonitor thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141627
2022-03-23 14:55:16 +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
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
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Andi-Bogdan Postelnicu 9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +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
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Christian Holler ad1556611a 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
Markus Stange 5257db6695 Bug 1692391 - Remove the word ABORT from the NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_RETURN macros, because these macros don't abort. r=haik,necko-reviewers
This patch was generated automatically with the commands below:

```
rg -l 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN' . | xargs sed -i '' -e 's/NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN/NS_OBJC_BEGIN_TRY_BLOCK_RETURN/g'
rg -l 'NS_OBJC_END_TRY_ABORT_BLOCK_RETURN' . | xargs sed -i '' -e 's/NS_OBJC_END_TRY_ABORT_BLOCK_RETURN/NS_OBJC_END_TRY_BLOCK_RETURN/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D104955
2021-02-16 22:55:20 +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