Merge pull request #11321 from electron/add-setExtraParameter-deprecation
Add back setExtraParameter() deprecation warning
This commit is contained in:
commit
63c91e7dd3
2 changed files with 7 additions and 11 deletions
|
@ -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} = process.type === 'browser' ? electron : electron.remote
|
const {app, deprecate} = process.type === 'browser' ? electron : electron.remote
|
||||||
const binding = process.atomBinding('crash_reporter')
|
const binding = process.atomBinding('crash_reporter')
|
||||||
|
|
||||||
class CrashReporter {
|
class CrashReporter {
|
||||||
|
@ -106,14 +106,10 @@ class CrashReporter {
|
||||||
|
|
||||||
// TODO(2.0) Remove
|
// TODO(2.0) Remove
|
||||||
setExtraParameter (key, value) {
|
setExtraParameter (key, value) {
|
||||||
// TODO(alexeykuzmin): Warning disabled since it caused
|
if (!process.noDeprecations) {
|
||||||
// a couple of Crash Reported tests to time out on Mac. Add it back.
|
deprecate.warn('crashReporter.setExtraParameter',
|
||||||
// https://github.com/electron/electron/issues/11012
|
'crashReporter.addExtraParameter or crashReporter.removeExtraParameter')
|
||||||
|
}
|
||||||
// if (!process.noDeprecations) {
|
|
||||||
// deprecate.warn('crashReporter.setExtraParameter',
|
|
||||||
// 'crashReporter.addExtraParameter or crashReporter.removeExtraParameter')
|
|
||||||
// }
|
|
||||||
binding.setExtraParameter(key, value)
|
binding.setExtraParameter(key, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
spec/fixtures/api/crash-restart.html
vendored
4
spec/fixtures/api/crash-restart.html
vendored
|
@ -24,8 +24,8 @@ if (process.platform === 'win32') {
|
||||||
|
|
||||||
setImmediate(() => {
|
setImmediate(() => {
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
crashReporter.setExtraParameter('extra2', 'extra2')
|
crashReporter.addExtraParameter('extra2', 'extra2')
|
||||||
crashReporter.setExtraParameter('extra3', null)
|
crashReporter.removeExtraParameter('extra3')
|
||||||
} else {
|
} else {
|
||||||
crashReporter.start({
|
crashReporter.start({
|
||||||
productName: 'Zombies',
|
productName: 'Zombies',
|
||||||
|
|
Loading…
Reference in a new issue