Setup crash reporter

This commit is contained in:
Feross Aboukhadijeh
2016-04-04 23:10:47 -07:00
parent 5330a8a471
commit 5a494d5f5e
2 changed files with 19 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
var electron = require('electron')
var app = electron.app
var crashReporter = electron.crashReporter
var ipcMain = electron.ipcMain
var autoUpdater = require('./auto-updater')
@@ -130,10 +131,9 @@ function processArgv (argv) {
}
function setupCrashReporter () {
// require('crash-reporter').start({
// productName: 'WebTorrent',
// companyName: 'WebTorrent',
// submitURL: 'https://webtorrent.io/crash-report',
// autoSubmit: true
// })
crashReporter.start({
companyName: config.APP_NAME,
productName: config.APP_NAME,
submitURL: 'https://webtorrent.io/desktop/crash-report'
})
}

View File

@@ -35,7 +35,9 @@ var Cast = null
// a renderer process (essentially a Chrome window). We're in the renderer process,
// and this IPC channel receives from and sends messages to the main process
var ipcRenderer = electron.ipcRenderer
var clipboard = electron.clipboard
var crashReporter = electron.crashReporter
var dialog = remote.require('dialog')
// For easy debugging in Developer Tools
@@ -58,6 +60,9 @@ loadState(init)
* the dock icon and drag+drop.
*/
function init () {
setupCrashReporter()
// Push the first page into the location history
state.location.go({ url: 'home' })
// Lazily load the WebTorrent, Chromecast, and Airplay modules
@@ -1057,3 +1062,11 @@ function playInterfaceSound (name) {
audio.src = sound.url
audio.play()
}
function setupCrashReporter () {
crashReporter.start({
companyName: config.APP_NAME,
productName: config.APP_NAME,
submitURL: 'https://webtorrent.io/desktop/crash-report'
})
}