-
Notifications
You must be signed in to change notification settings - Fork 16.5k
feat: add webContents.forcefullyCrashRenderer() to forcefully terminate a renderer process #25580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fed8bfd
to
9f5f934
Compare
Release Notes Persisted
|
I have automatically backported this PR to "11-x-y", please check out #25756 |
@MarshallOfSound may I ask how and when this method should be used? In VSCode we have always been listening to the I am trying to understand if I should now use //cc @deepak1556 |
@bpasero this is useful in sandbox mode when a reload doesn't necessarily spawn a new process, where you can call this method and then reload to safely put the unresponsive webContents in a new process. |
Currently the only way to recover a hung renderer is to close the window or manually call
kill ${webContents.getProcessId()}
neither of which is ideal. This adds a simple new method that aligns with what Chrome does to make killing a webConents in a hung state super easy.Notes: Added
webContents.forcefullyCrashRenderer()
to forcefully terminate a renderer process to assist with recovering a hung renderer.