feat: add new render-process-gone event (#23096)

This commit is contained in:
Samuel Attard 2020-05-11 13:42:24 -07:00 committed by GitHub
parent 7f9b7b2e95
commit 34da3bc500
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 66 additions and 1 deletions

View file

@ -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,