### 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

current main

### What operating system are you using?

macOS

### Operating System Version

10.15.7

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

Crashing and reloading a page should succeed without tripping any DCHECKs.

### Actual Behavior

```
[51637:0812/154526.721851:FATAL:observer_list.h(272)] Check failed: false. Observers can only be added once!
0   Electron Framework                  0x000000011b949499 base::debug::CollectStackTrace(void**, unsigned long) + 9
1   Electron Framework                  0x000000011b8656a3 base::debug::StackTrace::StackTrace() + 19
2   Electron Framework                  0x000000011b880f5f logging::LogMessage::~LogMessage() + 175
3   Electron Framework                  0x000000011b881ede logging::LogMessage::~LogMessage() + 14
4   Electron Framework                  0x000000011a9df302 base::ObserverList<content::RenderProcessHostObserver, false, true, base::internal::CheckedObserverAdapter>::AddObserver(content::RenderProcessHostObserver*) + 194
5   Electron Framework                  0x000000011a9d7361 content::RenderProcessHostImpl::Init() + 289
6   Electron Framework                  0x000000011a9c1811 content::RenderFrameHostManager::CreateSpeculativeRenderFrameHost(content::SiteInstance*, content::SiteInstance*, bool) + 177
7   Electron Framework                  0x000000011a9c05cd content::RenderFrameHostManager::GetFrameHostForNavigation(content::NavigationRequest*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 1821
8   Electron Framework                  0x000000011a947259 content::NavigationRequest::OnResponseStarted(mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>, mojo::StructPtr<network::mojom::URLResponseHead>, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>, content::GlobalRequestID, bool, blink::NavigationDownloadPolicy, net::NetworkIsolationKey, absl::optional<content::SubresourceLoaderParams>, content::NavigationURLLoaderDelegate::EarlyHints) + 5897
9   Electron Framework                  0x000000011a770664 content::NavigationURLLoaderImpl::NotifyResponseStarted(mojo::StructPtr<network::mojom::URLResponseHead>, mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>, content::GlobalRequestID const&, bool) + 436
10  Electron Framework                  0x000000011a774628 void base::internal::FunctorTraits<void (content::NavigationURLLoaderImpl::*)(mojo::StructPtr<network::mojom::URLResponseHead>, mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>, content::GlobalRequestID const&, bool), void>::Invoke<void (content::NavigationURLLoaderImpl::*)(mojo::StructPtr<network::mojom::URLResponseHead>, mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>, content::GlobalRequestID const&, bool), base::WeakPtr<content::NavigationURLLoaderImpl>, mojo::StructPtr<network::mojom::URLResponseHead>, mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>, content::GlobalRequestID, bool>(void (content::NavigationURLLoaderImpl::*)(mojo::StructPtr<network::mojom::URLResponseHead>, mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>, content::GlobalRequestID const&, bool), base::WeakPtr<content::NavigationURLLoaderImpl>&&, mojo::StructPtr<network::mojom::URLResponseHead>&&, mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>&&, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>&&, content::GlobalRequestID&&, bool&&) + 200
11  Electron Framework                  0x000000011a774548 base::internal::Invoker<base::internal::BindState<void (content::NavigationURLLoaderImpl::*)(mojo::StructPtr<network::mojom::URLResponseHead>, mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>, content::GlobalRequestID const&, bool), base::WeakPtr<content::NavigationURLLoaderImpl>, mojo::StructPtr<network::mojom::URLResponseHead>, mojo::StructPtr<network::mojom::URLLoaderClientEndpoints>, mojo::ScopedHandleBase<mojo::DataPipeConsumerHandle>, content::GlobalRequestID, bool>, void ()>::RunOnce(base::internal::BindStateBase*) + 72
12  Electron Framework                  0x000000011a7763e0 _ZN4base8internal7InvokerINS0_9BindStateIZN7content23NavigationURLLoaderImpl12ParseHeadersERK4GURLPN7network5mojom15URLResponseHeadENS_12OnceCallbackIFvvEEEE3$_2JSE_SB_EEEFvN4mojo9StructPtrINS9_13ParsedHeadersEEEEE7RunOnceEPNS0_13BindStateBaseEOSK_ + 176
13  Electron Framework                  0x00000001174e7116 network::mojom::NetworkService_ParseHeaders_ForwardToCallback::Accept(mojo::Message*) + 214
14  Electron Framework                  0x000000011bd21139 mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) + 1705
15  Electron Framework                  0x000000011bd2744f mojo::MessageDispatcher::Accept(mojo::Message*) + 271
16  Electron Framework                  0x000000011bd229ba mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) + 154
17  Electron Framework                  0x000000011bd2cc47 mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper*, mojo::internal::MultiplexRouter::ClientCallBehavior, base::SequencedTaskRunner*) + 1447
18  Electron Framework                  0x000000011bd2c07a mojo::internal::MultiplexRouter::Accept(mojo::Message*) + 394
19  Electron Framework                  0x000000011bd2744f mojo::MessageDispatcher::Accept(mojo::Message*) + 271
20  Electron Framework                  0x000000011bd19f02 mojo::Connector::DispatchMessage(mojo::Message) + 434
21  Electron Framework                  0x000000011bd1a8f7 mojo::Connector::ReadAllAvailableMessages() + 279
22  Electron Framework                  0x000000011bd1a699 mojo::Connector::OnWatcherHandleReady(unsigned int) + 57
23  Electron Framework                  0x0000000116ffb030 mojo::SimpleWatcher::DiscardReadyState(base::RepeatingCallback<void (unsigned int)> const&, unsigned int, mojo::HandleSignalsState const&) + 80
24  Electron Framework                  0x000000011bd4b115 mojo::SimpleWatcher::OnHandleReady(int, unsigned int, mojo::HandleSignalsState const&) + 405
25  Electron Framework                  0x000000011bd4b600 base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int, mojo::HandleSignalsState const&), base::WeakPtr<mojo::SimpleWatcher>, int, unsigned int, mojo::HandleSignalsState>, void ()>::RunOnce(base::internal::BindStateBase*) + 160
26  Electron Framework                  0x000000011b8e178b base::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 411
27  Electron Framework                  0x000000011b9063ce base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*) + 974
28  Electron Framework                  0x000000011b905b3b base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() + 107
29  Electron Framework                  0x000000011b9069f2 non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() + 18
30  Electron Framework                  0x000000011b960683 base::MessagePumpCFRunLoopBase::RunWork() + 83
31  Electron Framework                  0x000000011b95f9a2 base::mac::CallWithEHFrame(void () block_pointer) + 10
32  Electron Framework                  0x000000011b96009f base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 63
33  CoreFoundation                      0x00007fff39578832 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
34  CoreFoundation                      0x00007fff395787d1 __CFRunLoopDoSource0 + 103
35  CoreFoundation                      0x00007fff395785eb __CFRunLoopDoSources0 + 209
36  CoreFoundation                      0x00007fff3957731a __CFRunLoopRun + 927
37  CoreFoundation                      0x00007fff3957691e CFRunLoopRunSpecific + 462
38  HIToolbox                           0x00007fff381a2abd RunCurrentEventLoopInMode + 292
39  HIToolbox                           0x00007fff381a27d5 ReceiveNextEventCommon + 584
40  HIToolbox                           0x00007fff381a2579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
41  AppKit                              0x00007fff367e9039 _DPSNextEvent + 883
42  AppKit                              0x00007fff367e7880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
43  AppKit                              0x00007fff367d958e -[NSApplication run] + 658
44  Electron Framework                  0x000000011b96113c base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) + 348
45  Electron Framework                  0x000000011b95fa33 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 131
46  Electron Framework                  0x000000011b906f5b base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 651
47  Electron Framework                  0x000000011b8bb350 base::RunLoop::Run(base::Location const&) + 880
48  Electron Framework                  0x000000011a476e76 content::BrowserMainLoop::RunMainMessageLoop() + 246
49  Electron Framework                  0x000000011a478bf2 content::BrowserMainRunnerImpl::Run() + 82
50  Electron Framework                  0x000000011a47413b content::BrowserMain(content::MainFunctionParams const&) + 251
51  Electron Framework                  0x00000001189d1b14 content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams&, bool) + 1460
52  Electron Framework                  0x00000001189d1455 content::ContentMainRunnerImpl::Run(bool) + 389
53  Electron Framework                  0x00000001189cfa6c content::RunContentProcess(content::ContentMainParams const&, content::ContentMainRunner*) + 588
54  Electron Framework                  0x00000001189d055b content::ContentMain(content::ContentMainParams const&) + 59
55  Electron Framework                  0x0000000116faf227 ElectronMain + 135
56  Electron                            0x000000010d58fd5a main + 298
57  libdyld.dylib                       0x00007fff73618cc9 start + 1
58  ???                                 0x0000000000000002 0x0 + 2
Task trace:
0   Electron Framework                  0x000000011bd4b46f mojo::SimpleWatcher::Context::Notify(unsigned int, MojoHandleSignalsState, unsigned int) + 447
```

### Testcase Gist URL

https://gist.github.com/88d2828d06ce1fda4f9c1770db000923

### Additional Information

To reproduce, run the fiddle under a debug build. It will crash immediately.
shell/browser/electron_browser_client.cc
factories->emplace(content::kChromeUIScheme,
                       content::CreateWebUIURLLoaderFactory(
                           frame_host, content::kChromeUIScheme,
                           {content::kChromeUIResourcesHost}));
  }
  
  
  
  extensions::Manifest::Type type = extension->GetType();
  if (type == extensions::Manifest::TYPE_EXTENSION &&
      AllowFileAccess(extension->id(), web_contents->GetBrowserContext())) {
    factories->emplace(url::kFileScheme,
                       FileURLLoaderFactory::Create(render_process_id));
  }
#endif
}
bool ElectronBrowserClient::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
    base::StringPiece scheme,
    bool is_embedded_origin_secure) {
  if (is_embedded_origin_secure && scheme == content::kChromeUIScheme)
    return true;
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
  return scheme == extensions::kExtensionScheme;
#else
  return false;
#endif
}
bool ElectronBrowserClient::WillInterceptWebSocket(