mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
feat: add new render-process-gone event (#23096)
This commit is contained in:
@@ -997,6 +997,11 @@ void WebContents::RenderViewDeleted(content::RenderViewHost* render_view_host) {
|
||||
|
||||
void WebContents::RenderProcessGone(base::TerminationStatus status) {
|
||||
Emit("crashed", status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::Dictionary details =
|
||||
gin_helper::Dictionary::CreateEmpty(isolate());
|
||||
details.Set("reason", status);
|
||||
Emit("render-process-gone", details);
|
||||
}
|
||||
|
||||
void WebContents::PluginCrashed(const base::FilePath& plugin_path,
|
||||
|
||||
Reference in New Issue
Block a user