]> khamidou — GitHub mirrors - electron.git/commitdiff
Start the crash service process on non-Mac.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 24 Nov 2013 12:45:12 +0000 (20:45 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 24 Nov 2013 12:45:12 +0000 (20:45 +0800)
common/api/lib/crash-reporter.coffee

index fea44072981aaa60ff329a8fef61e870190b470a..ae974610585638b45ba6000e4988ec3f7f4ab421 100644 (file)
@@ -1,3 +1,4 @@
+{spawn} = require 'child_process'
 binding = process.atomBinding 'crash_reporter'
 
 class CrashReporter
@@ -11,6 +12,14 @@ class CrashReporter
     ignoreSystemCrashHandler ?= false
     extra ?= {}
 
+    if process.platform isnt 'darwin'
+      args = [
+        "--reporter-url=#{submitUrl}",
+        "--application-name=#{productName}"
+      ]
+      env = ATOM_SHELL_INTERNAL_CRASH_SERVICE: 1
+      spawn process.execPath, args, {env}
+
     binding.start productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra
 
 module.exports = new CrashReporter