electron 10 crash reporter changes
Crash reporter doesn't need to be started in child processes, and in fact the functions are all deprecated. Instead start it from the main process, and the child processes will automatically be covered Change of params to crashReporter.start() function
This commit is contained in:
parent
5f5b13d7fe
commit
57a003d7c5
4 changed files with 7 additions and 14 deletions
|
|
@ -7,8 +7,9 @@ function init () {
|
|||
const electron = require('electron')
|
||||
|
||||
electron.crashReporter.start({
|
||||
companyName: config.APP_NAME,
|
||||
productName: config.APP_NAME,
|
||||
submitURL: config.CRASH_REPORT_URL
|
||||
submitURL: config.CRASH_REPORT_URL,
|
||||
globalExtra: { _companyName: config.APP_NAME },
|
||||
compress: true
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,13 @@ console.time('init')
|
|||
const electron = require('electron')
|
||||
const app = electron.app
|
||||
|
||||
// Start crash reporter early, so it takes effect for child processes
|
||||
const crashReporter = require('../crash-reporter')
|
||||
crashReporter.init()
|
||||
|
||||
const parallel = require('run-parallel')
|
||||
|
||||
const config = require('../config')
|
||||
const crashReporter = require('../crash-reporter')
|
||||
const ipc = require('./ipc')
|
||||
const log = require('./log')
|
||||
const menu = require('./menu')
|
||||
|
|
@ -109,10 +112,6 @@ function init () {
|
|||
|
||||
ipc.init()
|
||||
|
||||
app.once('will-finish-launching', function () {
|
||||
crashReporter.init()
|
||||
})
|
||||
|
||||
app.once('ipcReady', function () {
|
||||
log('Command line args:', argv)
|
||||
processArgv(argv)
|
||||
|
|
|
|||
|
|
@ -14,9 +14,6 @@ Module.prototype.require = function (id) {
|
|||
|
||||
console.time('init')
|
||||
|
||||
const crashReporter = require('../crash-reporter')
|
||||
crashReporter.init()
|
||||
|
||||
// Perf optimization: Start asynchronously read on config file before all the
|
||||
// blocking require() calls below.
|
||||
|
||||
|
|
|
|||
|
|
@ -12,14 +12,10 @@ const networkAddress = require('network-address')
|
|||
const path = require('path')
|
||||
const WebTorrent = require('webtorrent')
|
||||
|
||||
const crashReporter = require('../crash-reporter')
|
||||
const config = require('../config')
|
||||
const { TorrentKeyNotFoundError } = require('./lib/errors')
|
||||
const torrentPoster = require('./lib/torrent-poster')
|
||||
|
||||
// Report when the process crashes
|
||||
crashReporter.init()
|
||||
|
||||
// Send & receive messages from the main window
|
||||
const ipc = electron.ipcRenderer
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue