### 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_client.h
base::FilePath GetLoggingFileName(const base::CommandLine& cmd_line) override;
  
  void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
  void RenderProcessReady(content::RenderProcessHost* host) override;
  void RenderProcessExited(
      content::RenderProcessHost* host,
      const content::ChildProcessTerminationInfo& info) override;
 private:
  content::SiteInstance* GetSiteInstanceFromAffinity(
      content::BrowserContext* browser_context,
      const GURL& url,
      content::RenderFrameHost* rfh) const;
  bool IsRendererSubFrame(int process_id) const;
  
  std::map<int, content::WebContents*> pending_processes_;
  std::set<int> renderer_is_subframe_;
  std::unique_ptr<PlatformNotificationService> notification_service_;
  std::unique_ptr<NotificationPresenter> notification_presenter_;
  Delegate* delegate_ = nullptr;
  std::string user_agent_override_ = "";
  
  
  uint64_t next_id_ = 0;
  std::unique_ptr<ElectronSerialDelegate> serial_delegate_;
  std::unique_ptr<ElectronBluetoothDelegate> bluetooth_delegate_;
  DISALLOW_COPY_AND_ASSIGN(ElectronBrowserClient);
};
}  
#endif