Merge pull request #2187 from jprichardson/patch-1

emit error object on process.on('uncaughtException') in renderer
This commit is contained in:
Cheng Zhao 2015-07-13 21:46:06 -07:00
commit 14388feb23

View file

@ -77,7 +77,7 @@ if nodeIntegration in ['true', 'all', 'except-iframe', 'manual-enable-iframe']
global.__dirname = __dirname
# Redirect window.onerror to uncaughtException.
window.onerror = (error) ->
window.onerror = (message, filename, lineno, colno, error) ->
if global.process.listeners('uncaughtException').length > 0
global.process.emit 'uncaughtException', error
true