Don't hard-code product name in crash-repoter
This commit is contained in:
parent
b86f149512
commit
c6c305a827
1 changed files with 7 additions and 5 deletions
|
@ -8,7 +8,13 @@ class CrashReporter
|
||||||
start: (options={}) ->
|
start: (options={}) ->
|
||||||
{@productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra} = options
|
{@productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra} = options
|
||||||
|
|
||||||
@productName ?= 'Atom-Shell'
|
app =
|
||||||
|
if process.type is 'browser'
|
||||||
|
require 'app'
|
||||||
|
else
|
||||||
|
require('remote').require 'app'
|
||||||
|
|
||||||
|
@productName ?= app.getName()
|
||||||
companyName ?= 'GitHub, Inc'
|
companyName ?= 'GitHub, Inc'
|
||||||
submitUrl ?= 'http://54.249.141.255:1127/post'
|
submitUrl ?= 'http://54.249.141.255:1127/post'
|
||||||
autoSubmit ?= true
|
autoSubmit ?= true
|
||||||
|
@ -18,10 +24,6 @@ class CrashReporter
|
||||||
extra._productName ?= @productName
|
extra._productName ?= @productName
|
||||||
extra._companyName ?= companyName
|
extra._companyName ?= companyName
|
||||||
extra._version ?=
|
extra._version ?=
|
||||||
if process.type is 'browser'
|
|
||||||
require('app').getVersion()
|
|
||||||
else
|
|
||||||
require('remote').require('app').getVersion()
|
|
||||||
|
|
||||||
start = => binding.start @productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra
|
start = => binding.start @productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue