Merge pull request #11013 from electron/temporary-remove-a-deprecation-warning-from-crashreporter-setextraparameter

Disable deprecation warning of `crashReported.setExtraParameter()`
This commit is contained in:
Samuel Attard 2017-11-05 03:41:37 +13:00 committed by GitHub
commit fa795ff4cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ const {spawn} = require('child_process')
const os = require('os') const os = require('os')
const path = require('path') const path = require('path')
const electron = require('electron') const electron = require('electron')
const {app, deprecate} = process.type === 'browser' ? electron : electron.remote const {app} = process.type === 'browser' ? electron : electron.remote
const binding = process.atomBinding('crash_reporter') const binding = process.atomBinding('crash_reporter')
class CrashReporter { class CrashReporter {
@ -106,10 +106,14 @@ class CrashReporter {
// TODO(2.0) Remove // TODO(2.0) Remove
setExtraParameter (key, value) { setExtraParameter (key, value) {
if (!process.noDeprecations) { // TODO(alexeykuzmin): Warning disabled since it caused
deprecate.warn('crashReporter.setExtraParameter', // a couple of Crash Reported tests to time out on Mac. Add it back.
'crashReporter.addExtraParameter or crashReporter.removeExtraParameter') // https://github.com/electron/electron/issues/11012
}
// if (!process.noDeprecations) {
// deprecate.warn('crashReporter.setExtraParameter',
// 'crashReporter.addExtraParameter or crashReporter.removeExtraParameter')
// }
binding.setExtraParameter(key, value) binding.setExtraParameter(key, value)
} }