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

12.0.1

### What operating system are you using?

macOS

### Operating System Version

11.2

### What arch are you using?

x64

### Last Known Working Electron version

11.x

### Expected Behavior

The app should not crash, and the new-window event should be fired

### Actual Behavior

The app crashes 

### Testcase Gist URL

https://gist.github.com/ae7fdfd99a5d755a5ae4323c46a4e833


shell/browser/web_view_guest_delegate.cc
content::WebContents* embedder_web_contents,
    int embedder_frame_id) {
  embedder_web_contents_ = embedder_web_contents;
  int embedder_process_id =
      embedder_web_contents_->GetMainFrame()->GetProcess()->GetID();
  auto* embedder_frame =
      content::RenderFrameHost::FromID(embedder_process_id, embedder_frame_id);
  DCHECK_EQ(embedder_web_contents_,
            content::WebContents::FromRenderFrameHost(embedder_frame));
  content::WebContents* guest_web_contents = api_web_contents_->web_contents();
  
  
  
  
  
  
  embedder_web_contents_->AttachInnerWebContents(
      base::WrapUnique<content::WebContents>(guest_web_contents),
      embedder_frame, false);
  ResetZoomController();
  embedder_zoom_controller_ =
      WebContentsZoomController::FromWebContents(embedder_web_contents_);
  embedder_zoom_controller_->AddObserver(this);
  auto* zoom_controller = api_web_contents_->GetZoomController();
  zoom_controller->SetEmbedderZoomController(embedder_zoom_controller_);
  api_web_contents_->Emit("did-attach");
}
void WebViewGuestDelegate::WillDestroy() {