gnome-shell/js/ui/status
Will Thompson ab0c795e81 status/location: Handle geoclue not being activatable
In GNOME OS, due to a misconfiguration, geoclue was configured without
systemd support. In that configuration, geoclue does not install its
systemd .service file (geoclue.service) but it (incorrectly) includes
the following line in its D-Bus service file:

    SystemdService=geoclue.service

As a result, when dbus-daemon tried to activate it at gnome-shell's
request, it would fail with:

    Unit geoclue.service not found

Then, GeoclueAgent._onGeoclueVanished() would be called, as the
name_vanished_handler passed to Gio.bus_watch_name(). This is consistent
with Gio.bus_watch_name()'s documentation:

> You are guaranteed that one of the handlers will be invoked after
> calling this function.

But that function assumed that this._managerProxy is defined, leading
to:

    JS ERROR: TypeError: this._managerProxy is undefined
    _onGeoclueVanished@resource:///org/gnome/shell/ui/status/location.js:163:9

Fix this by checking for nullishness of this._managerProxy. (Strictly
speaking, it's undefined rather than being null, but other code in this
file already uses the vaguer '!= null' test, which considers undefined
to be null.)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2689>
2023-03-19 12:46:50 +00:00
..
accessibility.js a11y menu: Add "All Accessibility Settings" entry 2023-02-07 14:59:58 +00:00
autoRotate.js quickSettings: Rename 'label' property to 'title' 2023-02-04 14:50:36 -03:00
backgroundApps.js status/backgroundApps: Add section title 2023-03-19 12:06:06 +00:00
bluetooth.js status/bluetooth: Fix bluetooth placeholder text alignment 2023-03-19 12:32:55 +00:00
brightness.js status/brightness: Port to quick settings 2022-08-03 12:41:05 +00:00
darkMode.js quickSettings: Rename 'label' property to 'title' 2023-02-04 14:50:36 -03:00
dwellClick.js cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
keyboard.js keyboard: Add "Keyboard Settings" menu entry 2023-01-13 16:05:25 +00:00
location.js status/location: Handle geoclue not being activatable 2023-03-19 12:46:50 +00:00
network.js status/network: Fix WirelessNetwork related leaks 2023-02-18 21:34:56 +00:00
nightLight.js quickSettings: Rename 'label' property to 'title' 2023-02-04 14:50:36 -03:00
powerProfiles.js status/powerProfiles: Set profile name as subtitle 2023-02-04 14:50:36 -03:00
remoteAccess.js status/remoteAccess: Don't override existing style classes 2022-11-18 18:50:43 +01:00
rfkill.js quickSettings: Rename 'label' property to 'title' 2023-02-04 14:50:36 -03:00
system.js status/system: Fix missing battery percentage in the top bar 2023-02-22 13:21:15 -08:00
thunderbolt.js cleanup: Minimize deep_unpack() usage 2022-08-10 10:29:24 +00:00
volume.js status/volume: Unmute to default volume when at 0 2023-02-14 21:28:44 +00:00