fix: render process crash handling (#34428)
* fix: crash when renderer process is reused Could occur when a renderer crashes and the same-origin URL is loaded again which leads to reusing the renderer process. * test: renderer process crash recovery * fix: handle case which leads to render frame DCHECK * fix: lint
This commit is contained in:
parent
eb26f99f6e
commit
b00c026a54
3 changed files with 38 additions and 1 deletions
|
@ -451,6 +451,9 @@ void ElectronBrowserClient::RenderProcessWillLaunch(
|
|||
new extensions::MessagingAPIMessageFilter(process_id, browser_context));
|
||||
#endif
|
||||
|
||||
// Remove in case the host is reused after a crash, otherwise noop.
|
||||
host->RemoveObserver(this);
|
||||
|
||||
// ensure the ProcessPreferences is removed later
|
||||
host->AddObserver(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue