Closed Bug 1770126 Opened 1 month ago Closed 1 month ago

Fix WindowsLocationProvider::Startup to not always initialize.

Categories

(Core :: DOM: Geolocation, defect)

defect

Tracking

()

VERIFIED FIXED
102 Branch
Tracking Status
firefox101 --- verified
firefox102 --- verified

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files)

No description provided.

We can call Startup() on an already-running instance, and that would cause us
to not unregister notifications from a pre-existing ILocation instance,
which seems likely to cause things like bug 1766770.

Other location providers deal correctly with this.

The second call would fail and thus fall back to MLS, but only null out
mLocation (not unregister the existing listener), so Windows would think we're
still using the location permission forever.

See Also: → 1704500
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16856951218b
Make WindowsLocationProvider::Startup() deal correctly with already-initialized instances. r=gcp
https://hg.mozilla.org/integration/autoland/rev/f4e4de791d7f
Make WindowsLocationProvider::Watch() not try to watch for events if already watching. r=gcp

Comment on attachment 9277263 [details]
Bug 1770126 - Make WindowsLocationProvider::Watch() not try to watch for events if already watching. r=gcp

Beta/Release Uplift Approval Request

  • User impact if declined: Windows location services remain active incorrectly. This could also explain / fix some crashes like bug 1704500.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: * On Windows 11, ensure Windows location services are on and that apps can access them.
  • Go to Google maps and grant location permission. See how the Windows 11 taskbar shows the location icon.
  • Close the tab.
  • Location icon should go away.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Pretty straight-forward patch (most of the code is added logging), Windows + Geolocation specific.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9277263 - Flags: approval-mozilla-beta?
Attachment #9277260 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
QA Whiteboard: [qa-triaged]

Comment on attachment 9277260 [details]
Bug 1770126 - Make WindowsLocationProvider::Startup() deal correctly with already-initialized instances. r=gcp

Approved for 101.0rc1.

Attachment #9277260 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9277263 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified that the Windows 11 taskbar location icon will disappear after closing the maps tab or after some seconds from which the location was achieved on the maps tab. Looked over 102.0a1 (2022-05-22) and 101.0b10 (treeherder build).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Duplicate of this bug: 1766770
You need to log in before you can comment on or make changes to this bug.