### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

13.0.1

### What operating system are you using?

macOS

### Operating System Version

11.4

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

12.0.7

### Expected Behavior

Electron shouldn't crash.

### Actual Behavior

Electron crashes.

### Testcase Gist URL

https://gist.github.com/omarkilani/f0c264e278b04575a381d1eadc930514

### Additional Information

Electron 13.x crashes on any geolocation use. Backtrace attached.
shell/browser/electron_browser_main_parts.cc
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/base/idle/idle.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/ui_base_switches.h"
#if defined(USE_AURA)
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/views/widget/desktop_aura/desktop_screen.h"
#include "ui/wm/core/wm_state.h"
#endif
#if defined(OS_LINUX)
#include "base/environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "ui/gtk/gtk_ui_factory.h"
#include "ui/gtk/gtk_util.h"
#include "ui/views/linux_ui/linux_ui.h"
#if defined(USE_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#endif
#if defined(USE_X11)
#include "ui/base/x/x11_util.h"
#include "ui/events/devices/x11/touch_factory_x11.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/xproto_util.h"
#endif
#if defined(USE_OZONE) || defined(USE_X11)
#include "ui/base/ui_base_features.h"
#endif
#endif