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

15.0.0-beta.2

### What operating system are you using?

Linux 5.13.13 kernel

### What arch are you using?

x64

### Last Known Working Electron version

14.0.0

### Expected Behavior

The app doesn't crash.

### Actual Behavior

The app crashes.

### Testcase Gist URL

https://github.com/vladimiry/ElectronMail/releases/tag/v4.12.6

### Additional Information

It's not so trivial task to create an isolated repro for the case like this, but link to the app release has been attached as well as the crash stack.

Downgrading `15.0.0-beta.2 => 14.0.0` resolves the issue.

See attached [crash stack](https://github.com/electron/electron/files/7116429/dump.txt).

shell/browser/api/electron_api_web_contents.cc
content::RenderFrameHost* render_frame_host) {
  if (render_frame_host == ontents()->GetMainFrame()) {
    Emit("ready-to-show");
  }
}
void WebContents::ReceivePostMessage(
    const std::string& channel,
    blink::TransferableMessage message,
    content::RenderFrameHost* render_frame_host) {
  v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
  v8::HandleScope handle_scope(isolate);
  auto wrapped_ports =
      MessagePort::EntanglePorts(isolate, std::move(message.ports));
  v8::Local<v8::Value> message_value =
      electron::DeserializeV8Value(isolate, message);
  EmitWithSender("-ipc-ports", render_frame_host,
                 electron::mojom::ElectronBrowser::InvokeCallback(), false,
                 channel, message_value, std::move(wrapped_ports));
}
void WebContents::MessageSync(