feat: add global renderer-process-crashed event (#17315)

This commit is contained in:
Milan Burda 2019-03-12 00:17:24 +01:00 committed by Samuel Attard
parent a8698d092b
commit 6072da239d
4 changed files with 36 additions and 4 deletions

View file

@ -110,10 +110,12 @@ app.on('window-all-closed', function () {
app.quit()
})
app.on('web-contents-created', (event, contents) => {
contents.on('crashed', (event, killed) => {
console.log(`webContents ${contents.id} crashed: ${contents.getURL()} (killed=${killed})`)
})
app.on('gpu-process-crashed', (event, killed) => {
console.log(`GPU process crashed (killed=${killed})`)
})
app.on('renderer-process-crashed', (event, contents, killed) => {
console.log(`webContents ${contents.id} crashed: ${contents.getURL()} (killed=${killed})`)
})
app.on('ready', function () {