Segfault in `base::SequenceCheckerImpl::CalledOnValidSequence()`.

Seen [in this CI run](https://app.circleci.com/pipelines/github/electron/electron/32652/workflows/d9f0c307-7021-453d-8bec-6b2eb9bd2bc2/jobs/718582). 

```
Received signal 11 <unknown> 000000000000
0   Electron Framework                  0x000000011ab9ece9 base::debug::CollectStackTrace(void**, unsigned long) + 9
1   Electron Framework                  0x000000011aa931e3 base::debug::StackTrace::StackTrace() + 19
2   Electron Framework                  0x000000011ab9ebb1 base::debug::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, void*) + 2385
3   libsystem_platform.dylib            0x00007fff68b8c5fd _sigtramp + 29
4   ???                                 0x0000000000000000 0x0 + 0
5   Electron Framework                  0x000000011ab09bda base::SequenceCheckerImpl::CalledOnValidSequence() const + 42
6   Electron Framework                  0x000000011ab25bd9 base::SupportsUserData::GetUserData(void const*) const + 25
7   Electron Framework                  0x000000011526f1d2 electron::api::WebContents::DidStopLoading() + 50
8   Electron Framework                  0x0000000119bc2401 content::WebContentsImpl::LoadingStateChanged(bool, content::LoadNotificationDetails*) + 2049
9   Electron Framework                  0x0000000119bcab12 content::WebContentsImpl::DidStopLoading() + 178
10  Electron Framework                  0x000000011983fcc8 content::FrameTreeNode::DidStopLoading() + 120
11  Electron Framework                  0x0000000119937cd5 content::RenderFrameHostImpl::DidStopLoading() + 133
12  Electron Framework                  0x0000000116b3d1fa content::mojom::FrameHostStubDispatch::Accept(content::mojom::FrameHost*, mojo::Message*) + 3610
13  Electron Framework                  0x000000011b058953 mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) + 931
14  Electron Framework                  0x000000011b05c62f mojo::MessageDispatcher::Accept(mojo::Message*) + 191
15  Electron Framework                  0x000000011b059e71 mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) + 97
16  Electron Framework                  0x000000011b0b8132 IPC::(anonymous namespace)::ChannelAssociatedGroupController::AcceptOnProxyThread(mojo::Message) + 706
17  Electron Framework                  0x000000011b0b4f8c base::internal::Invoker<base::internal::BindState<void (IPC::(anonymous namespace)::ChannelAssociatedGroupController::*)(mojo::Message), scoped_refptr<IPC::(anonymous namespace)::ChannelAssociatedGroupController>, mojo::Message>, void ()>::RunOnce(base::internal::BindStateBase*) + 140
18  Electron Framework                  0x000000011ab2e20b base::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 395
19  Electron Framework                  0x000000011ab4d1b0 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*) + 528
20  Electron Framework                  0x000000011ab4ce08 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() + 168
21  Electron Framework                  0x000000011abbede1 base::MessagePumpCFRunLoopBase::RunWork() + 65
22  Electron Framework                  0x000000011abb4162 base::mac::CallWithEHFrame(void () block_pointer) + 10
23  Electron Framework                  0x000000011abbe7af base::MessagePumpCFRunLoopBase::RunWorkSource(v
```
shell/browser/api/electron_api_web_contents.cc
bool proceed,
                                    bool* proceed_to_fire_unload) {
  if (type_ == Type::kBrowserWindow || type_ == Type::kOffScreen)
    *proceed_to_fire_unload = proceed;
  else
    *proceed_to_fire_unload = true;
  
  Emit("before-unload-fired", proceed);
}
void WebContents::SetContentsBounds(content::WebContents* source,
                                    const gfx::Rect& rect) {
  for (ExtendedWebContentsObserver& observer : observers_)
    observer.OnSetContentBounds(rect);
}
void WebContents::CloseContents(content::WebContents* source) {
  Emit("close");
  auto* autofill_driver_factory =
      AutofillDriverFactory::FromWebContents(ontents());
  if (autofill_driver_factory) {
    autofill_driver_factory->CloseAllPopups();
  }
  if (inspectable_ontents_)
    inspectable_ontents_->GetView()->SetDelegate(nullptr);
  for (ExtendedWebContentsObserver& observer : observers_)
    observer.OnCloseContents();
}
void WebContents::ActivateContents(content::WebContents* source) {