Commit Graph

260 Commits

Author SHA1 Message Date
David Parks
cf53d2cd9f Bug 1900225: Part 5 - On Windows, do not show message about wifi scan permission if no wifi is present r=win-reviewers,necko-reviewers,valentin,gstoll
We added a note to the geolocation doorhanger, warning the user when Windows is
going to repeat the request for user permission (although it asks for permission
for Firefox, not for the web page).  However, Windows won't do this if there is
no wifi adapter that could perform the scan.  Here, we avoid adding the note in
that case.

Differential Revision: https://phabricator.services.mozilla.com/D218588
2024-08-27 22:47:33 +00:00
Sandor Molnar
eaa5676b40 Backed out 6 changesets (bug 1900225) for causing build bustages @ GeolocationSystemWin.cpp CLOSED TREE
Backed out changeset 2c0d4dc4c52e (bug 1900225)
Backed out changeset 092cece48dcd (bug 1900225)
Backed out changeset d9debcb16932 (bug 1900225)
Backed out changeset b389e47cd649 (bug 1900225)
Backed out changeset 0bdd05d6a2f0 (bug 1900225)
Backed out changeset 35a1d931e407 (bug 1900225)
2024-08-09 02:18:32 +03:00
David Parks
40c069c7c7 Bug 1900225: Part 5 - On Windows, do not show message about wifi scan permission if no wifi is present r=win-reviewers,necko-reviewers,valentin,gstoll
We added a note to the geolocation doorhanger, warning the user when Windows is
going to repeat the request for user permission (although it asks for permission
for Firefox, not for the web page).  However, Windows won't do this if there is
no wifi adapter that could perform the scan.  Here, we avoid adding the note in
that case.

Differential Revision: https://phabricator.services.mozilla.com/D218588
2024-08-08 22:38:02 +00:00
Sylvestre Ledru
45030f6970 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +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
Chris Peterson
360d2cb741 Bug 1891332 - Replace debug MOZ_ASSERT with MOZ_RELEASE_ASSERT in netwerk tests. r=necko-reviewers,kershaw,valentin
MOZ_ASSERT is only checked in debug builds, so release builds' tests are not checking these assertions.

Depends on D207374

Differential Revision: https://phabricator.services.mozilla.com/D207375
2024-04-17 03:26:30 +00:00
Ray Kraesig
fe17c87862 Bug 1880192 - [3.5/5] ThreadUtils.h: remove little-used storage cases r=xpcom-reviewers,necko-reviewers,jesup,nika
`const T&&` parameters don't have associated storage semantics defined
for them. Previously they would end up as `StoreCopyPassByRRef`, which
might even have been intentional. Forbid them, and change the one use
case invoking it to a non-reference (becoming StoreCopyPassByConstLRef).

Additionally, there are four optional storage classes that are never
automatically selected. Two of these are never used, and a third is only
used mistakenly (...ByLRef where only ...ByConstLRef is needed). Adjust
the third's use-sites, and remove all three.

The last, `StoreCopyPassByPtr`, has more of an argument to be kept: it's
simpler to use (and, arguably, to understand) than its lambda-function
equivalent when wrapping an XPCOM method that takes an [in]-pointer
argument -- but it has only one use site in the entire codebase. Replace
and remove it, as well.

No functional changes. All deleted cases remain possible via lambda
functions fed to NS_NewRunnableFunction.

Differential Revision: https://phabricator.services.mozilla.com/D202173
2024-03-05 17:22:22 +00:00
Iulian Moraru
0783fb05a1 Backed out 6 changesets (bug 1880192) for causing build bustages on MozPromise.h. CLOSED TREE
Backed out changeset b73f06a9fdb1 (bug 1880192)
Backed out changeset ee04f994bad8 (bug 1880192)
Backed out changeset 8c7a686c8691 (bug 1880192)
Backed out changeset 15e93c260557 (bug 1880192)
Backed out changeset b5f62ac62087 (bug 1880192)
Backed out changeset ff2d8eae2a68 (bug 1880192)
2024-02-27 20:41:39 +02:00
Ray Kraesig
39a92971f5 Bug 1880192 - [3.5/5] ThreadUtils.h: remove little-used storage cases r=xpcom-reviewers,necko-reviewers,jesup,nika
`const T&&` parameters don't have associated storage semantics defined
for them. Previously they would end up as `StoreCopyPassByRRef`, which
might even have been intentional. Forbid them, and change the one use
case invoking it to a non-reference (becoming StoreCopyPassByConstLRef).

Additionally, there are four optional storage classes that are never
automatically selected. Two of these are never used, and a third is only
used mistakenly (...ByLRef where only ...ByConstLRef is needed). Adjust
the third's use-sites, and remove all three.

The last, `StoreCopyPassByPtr`, has more of an argument to be kept: it's
simpler to use (and, arguably, to understand) than its lambda-function
equivalent when wrapping an XPCOM method that takes an [in]-pointer
argument -- but it has only one use site in the entire codebase. Replace
and remove it, as well.

No functional changes. All deleted cases remain possible via lambda
functions fed to NS_NewRunnableFunction.

Differential Revision: https://phabricator.services.mozilla.com/D202173
2024-02-27 17:20:11 +00:00
David Parks
ff79d267fd Bug 1833020: Disable TestWifiMonitor for intermittent failures r=gstoll,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D200066
2024-01-30 21:31:41 +00:00
komuhangi
b35b9c196f Bug 1860231 - Removed duplicate include nsServiceManagerUtils.h. r=necko-reviewers,valentin DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D191765
2023-10-25 08:03:25 +00:00
stransky
013049350a Bug 1854449 [Linux] Migrate DbusWifiScanner to DBus/GIO r=emilio,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D190307
2023-10-11 08:58:22 +00:00
Cristian Tuns
5365de024b Backed out changeset 1f39b0b5d125 (bug 1854449) for causing build bustages in DbusWifiScanner.cpp CLOSED TREE 2023-10-10 07:41:11 -04:00
stransky
6db1120c6b Bug 1854449 [Linux] Migrate DbusWifiScanner to DBus/GIO r=emilio,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D190307
2023-10-10 11:05:38 +00:00
stransky
38f9f16b30 Bug 1852503 [Linux] Fall back to dbus_gmain_set_up_connection() handler r=emilio,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D187875
2023-09-11 10:22:54 +00:00
stransky
51575a6cd1 Bug 1532281 [Linux] Remove dbus-glib code from DbusWifiScanner r=emilio,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D187434
2023-09-05 11:42:42 +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
Stanca Serban
17fb8bac17 Backed out changeset 50b448b2d902 (bug 1532281) for causing Linux build bustages. CLOSED TREE 2023-09-05 11:38:18 +03:00
stransky
60dc5e2272 Bug 1532281 [Linux] Don't build with dbus-glib r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D187208
2023-09-05 08:14:21 +00:00
Chris Peterson
583418db75 Bug 1847154 - netwerk: stop including unused "nsCocoaFeatures.h" in files with no macOS version checks. r=necko-reviewers,jesup
Firefox versions >= 116 only support macOS >= 10.15 (Catalina).

Depends on D185502

Differential Revision: https://phabricator.services.mozilla.com/D185503
2023-08-07 16:15:36 +00:00
David Parks
a1bb9d5a19 Bug 1842860: Increase stack size in WifiMonitor on MacOS r=haik,necko-reviewers,kershaw
We have been seeing the stack issue from bug 1776210, but on MacOS 10.12 Sierra.  We are increasing stack size for all versions.

Differential Revision: https://phabricator.services.mozilla.com/D183611
2023-07-20 22:11:27 +00:00
David Parks
4f1f0cf03e Bug 1843119: Remove SpinEventLoopUntil from nsWifiMonitor r=necko-reviewers,kershaw
We were using SpinEventLoopUntil to order the scans and the scan results but this seems to be overkill -- we should expect the main loop to process our tasks ery quickly.  In addition, it's probably not desirable to wait before scheduling the next scan because a delay in main thread processing doesn't imply lack of movement so our update is still needed.  Finally, we try to avoid SpinEventLoopUntil as much as possible.

Differential Revision: https://phabricator.services.mozilla.com/D183420
2023-07-13 19:22:17 +00:00
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