Ensure a dialog is not opened when webContents crash in headless mode

This commit is contained in:
Michelle Tilley
2017-01-12 14:45:38 -08:00
parent 6fb78bdc97
commit 05f58a432b

View File

@@ -150,7 +150,10 @@ class AtomWindow
@browserWindow.destroy() if chosen is 0
@browserWindow.webContents.on 'crashed', =>
@atomApplication.exit(100) if @headless
if @headless
console.log "Renderer process crashed, exiting"
@atomApplication.exit(100)
return
@fileRecoveryService.didCrashWindow(this)
chosen = dialog.showMessageBox @browserWindow,