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

View File

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