### 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
if (code != net::ERR_ABORTED) {
      EmitWarning(
          node::Environment::GetCurrent(JavascriptEnvironment::GetIsolate()),
          "Failed to load URL: " + url.possibly_invalid_spec() +
              " with error: " + description,
          "electron");
      Emit("did-fail-load", code, description, url, is_main_frame,
           frame_process_id, frame_routing_id);
    }
  }
  content::NavigationEntry* entry = navigation_handle->GetNavigationEntry();
   This check is needed due to an issue in Chromium
   Check the Chromium issue to keep updated:
   https:bugs.chromium.org/p/chromium/issues/detail?id=1178663
   If a history entry has been made and the forward/back call has been made,
   proceed with setting the new title
  if (entry && (entry->GetTransitionType() & ui::PAGE_TRANSITION_FORWARD_BACK))
    WebContents::TitleWasSet(entry);
}
void WebContents::TitleWasSet(content::NavigationEntry* entry) {
  std::u16string final_title;
  bool explicit_set = true;
  if (entry) {
    auto title = entry->GetTitle();
    auto url = entry->GetURL();
    if (url.SchemeIsFile() && title.empty()) {
      final_title = base::UTF8ToUTF16(url.ExtractFileName());
      explicit_set = false;
    } else {
      final_title = title;