win: Make out-of-process crash dump work.
This commit is contained in:
parent
75e1fb63c8
commit
717b664802
4 changed files with 52 additions and 15 deletions
|
@ -5,21 +5,26 @@ class CrashReporter
|
|||
start: (options={}) ->
|
||||
{productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra} = options
|
||||
|
||||
productName ?= 'atom-shell'
|
||||
productName ?= 'Atom-Shell'
|
||||
companyName ?= 'GitHub, Inc'
|
||||
submitUrl ?= 'http://54.249.141.25:1127/post'
|
||||
autoSubmit ?= true
|
||||
ignoreSystemCrashHandler ?= false
|
||||
extra ?= {}
|
||||
|
||||
if process.platform isnt 'darwin'
|
||||
start = -> binding.start productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra
|
||||
|
||||
if process.platform is 'darwin'
|
||||
start()
|
||||
else
|
||||
args = [
|
||||
"--reporter-url=#{submitUrl}",
|
||||
"--reporter-url=#{submitUrl}"
|
||||
"--application-name=#{productName}"
|
||||
"--v=1"
|
||||
]
|
||||
env = ATOM_SHELL_INTERNAL_CRASH_SERVICE: 1
|
||||
spawn process.execPath, args, {env}
|
||||
|
||||
binding.start productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra
|
||||
spawn process.execPath, args, {env, detached: true}
|
||||
start()
|
||||
|
||||
module.exports = new CrashReporter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue