From 05f58a432bf3e90e33b2ecd1f6f724d20de68ef3 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Thu, 12 Jan 2017 14:45:38 -0800 Subject: [PATCH] Ensure a dialog is not opened when webContents crash in headless mode --- src/main-process/atom-window.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main-process/atom-window.coffee b/src/main-process/atom-window.coffee index 3c163ba25..9c937e4f6 100644 --- a/src/main-process/atom-window.coffee +++ b/src/main-process/atom-window.coffee @@ -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,