Invalidate the NetworkGeolocationProvider request cache on network link changes, and count how often that happens
Categories
(Toolkit :: Geolocation Provider, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: jstutte, Assigned: handyman)
References
(Blocks 2 open bugs)
Details
Attachments
(3 external files, 3 obsolete files)
Bug 2048118 part 4 landed the network request cache, but the half that invalidated it on network:link-status-changed was obsoleted (attachment 9603235 [details]) and never landed. If WiFi is absent, the cached position therefore has no invalidation trigger at all, a laptop that is suspended with an open FIrefox and re-opened in a different network will see the old position. From telemetry it seems that the vast majority of requests have no AP information.
Chromium does exactly this, including the placement: PositionCacheImpl (services/device/geolocation) is itself a net::NetworkChangeNotifier::NetworkChangeObserver.
down is deliberately ignored: losing the link cannot make a cached position wrong, and up/down are edge-triggered on a state transition (NetlinkService::UpdateLinkStatus), so any return of the link fires up and invalidates before the first request that could be served from the stale entry.
We may also want to add a missing measurement, since there is no probe for link-change frequency anywhere in netwerk/, toolkit/ or dom/ today.
| Reporter | ||
Updated•3 months ago
|
| Reporter | ||
Updated•3 months ago
|
The cached position therefore has no invalidation trigger at all
Shouldn't AP list change still trigger the invalidation? I guess there's cases where initial location has no AP at all and the new location still has none.
| Reporter | ||
Comment 2•3 months ago
•
|
||
(In reply to Kagami Rosylight 🏳️🌈🏳️⚧️ [:saschanaz] (they/them) from comment #1)
The cached position therefore has no invalidation trigger at all
Shouldn't AP list change still trigger the invalidation? I guess there's cases where initial location has no AP at all and the new location still has none.
Yes, and from telemetry this seems to not be an edge case. But comment 0 was wrong in saying never.
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
| Assignee | ||
Comment 4•2 months ago
|
||
Observe network:link-status-changed and invalidate the network geolocation
cache on "changed"/"up". A cached location is only valid on the network it
came from. The observer lives on the cache, so invalidation also works while
the provider is shut down.
Updated•2 months ago
|
| Assignee | ||
Comment 5•2 months ago
|
||
| Assignee | ||
Comment 6•2 months ago
|
||
CachedRequest/CachedResponse refactor. No functional change.
Updated•2 months ago
|
Updated•2 months ago
|
Comment 8•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4250d0cd3517
https://hg.mozilla.org/mozilla-central/rev/374666d46eaf
https://hg.mozilla.org/mozilla-central/rev/117abd42dc4e
Updated•1 month ago
|
| Assignee | ||
Comment 10•17 days ago
|
||
CachedRequest/CachedResponse refactor. No functional change.
Original Revision: https://phabricator.services.mozilla.com/D327052
Updated•17 days ago
|
| Assignee | ||
Comment 11•17 days ago
|
||
Observe network:link-status-changed and invalidate the network geolocation
cache on "changed"/"up". A cached location is only valid on the network it
came from. The observer lives on the cache, so invalidation also works while
the provider is shut down.
Original Revision: https://phabricator.services.mozilla.com/D326728
Updated•17 days ago
|
| Assignee | ||
Comment 12•17 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D326729
Updated•17 days ago
|
Updated•16 days ago
|
Updated•16 days ago
|
Updated•16 days ago
|
Updated•12 days ago
|
Updated•12 days ago
|
Updated•12 days ago
|
Description
•