### 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.cc
if (bypass_redirect_checks)
      *bypass_redirect_checks = use_proxy_for_web_request;
    if (use_proxy_for_web_request)
      return true;
  }
#endif
  auto proxied_receiver = std::move(*factory_receiver);
  mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_remote;
  *factory_receiver = target_factory_remote.InitWithNewPipeAndPassReceiver();
  
  
  
  
  
  std::unique_ptr<extensions::ExtensionNavigationUIData> navigation_ui_data;
  if (navigation_id.has_value()) {
    navigation_ui_data =
        std::make_unique<extensions::ExtensionNavigationUIData>();
  }
  mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient>
      header_client_receiver;
  if (header_client)
    header_client_receiver = header_client->InitWithNewPipeAndPassReceiver();
  auto* protocol_registry =
      ProtocolRegistry::FromBrowserContext(browser_context);
  new ProxyingURLLoaderFactory(
      web_request.get(), protocol_registry->intercept_handlers(),
      render_process_id,
      frame_host ? frame_host->GetRoutingID() : MSG_ROUTING_NONE,
      frame_host ? frame_host->GetRenderViewHost()->GetRoutingID()