deprecate autoSubmit in favor of uploadToServer (#11992)

This commit is contained in:
shelley vohr 2018-02-20 23:31:48 -05:00 committed by Charles Kerr
parent 193febd18c
commit 772a69e24a

View file

@ -4,7 +4,7 @@ const {spawn} = require('child_process')
const os = require('os')
const path = require('path')
const electron = require('electron')
const {app} = process.type === 'browser' ? electron : electron.remote
const {app, deprecate} = process.type === 'browser' ? electron : electron.remote
const binding = process.atomBinding('crash_reporter')
class CrashReporter {
@ -20,7 +20,15 @@ class CrashReporter {
uploadToServer
} = options
if (uploadToServer == null) uploadToServer = true
if (uploadToServer == null) {
if (options.autoSubmit) {
deprecate.warn('autoSubmit', 'uploadToServer')
uploadToServer = options.autoSubmit
} else {
uploadToServer = true
}
}
if (ignoreSystemCrashHandler == null) ignoreSystemCrashHandler = false
if (extra == null) extra = {}