From a6cf7a10954c2615f6c6721a92ca21f4508efdc4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 28 Apr 2016 09:48:13 -0700 Subject: [PATCH] Remove deprecated crashReporter.start options --- lib/common/api/crash-reporter.js | 15 +++------------ spec/api-crash-reporter-spec.js | 6 +++--- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/lib/common/api/crash-reporter.js b/lib/common/api/crash-reporter.js index f10887550113..e62c7cdf95f9 100644 --- a/lib/common/api/crash-reporter.js +++ b/lib/common/api/crash-reporter.js @@ -10,7 +10,7 @@ var CrashReporter = (function () { function CrashReporter () {} CrashReporter.prototype.start = function (options) { - var app, args, autoSubmit, companyName, deprecate, env, extra, ignoreSystemCrashHandler, start, submitURL + var app, args, autoSubmit, companyName, env, extra, ignoreSystemCrashHandler, start, submitURL if (options == null) { options = {} } @@ -21,14 +21,6 @@ var CrashReporter = (function () { ignoreSystemCrashHandler = options.ignoreSystemCrashHandler extra = options.extra - // Deprecated. - deprecate = electron.deprecate - if (options.submitUrl) { - if (submitURL == null) { - submitURL = options.submitUrl - } - deprecate.warn('submitUrl', 'submitURL') - } app = (process.type === 'browser' ? electron : electron.remote).app if (this.productName == null) { this.productName = app.getName() @@ -52,11 +44,10 @@ var CrashReporter = (function () { extra._version = app.getVersion() } if (companyName == null) { - deprecate.log('companyName is now a required option to crashReporter.start') - return + throw new Error('companyName is a required option to crashReporter.start') } if (submitURL == null) { - deprecate.log('submitURL is now a required option to crashReporter.start') + throw new Error('submitURL is a required option to crashReporter.start') return } start = () => { diff --git a/spec/api-crash-reporter-spec.js b/spec/api-crash-reporter-spec.js index e5a3223eed8f..4bf02af2ef5d 100644 --- a/spec/api-crash-reporter-spec.js +++ b/spec/api-crash-reporter-spec.js @@ -75,18 +75,18 @@ describe('crash-reporter module', function () { }) }) - describe('.start(options)', function () { + describe.only('.start(options)', function () { it('requires that the companyName and submitURL options be specified', function () { assert.throws(function () { crashReporter.start({ companyName: 'Missing submitURL' }) - }) + }, /submitURL is a required option to crashReporter\.start/) assert.throws(function () { crashReporter.start({ submitURL: 'Missing companyName' }) - }) + }, /companyName is a required option to crashReporter\.start/) }) }) })