Merge pull request #7689 from hinamiyagk/crashreporter-start-option

Make companyName and submitURL option required on crashReporter.start
This commit is contained in:
Masahiro Wakame
2016-01-25 11:41:15 +09:00
2 changed files with 8 additions and 12 deletions

View File

@@ -26,9 +26,6 @@ import path = require('path');
// Quick start
// https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md
// Report crashes to our server.
require('crash-reporter').start();
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the javascript object is GCed.
var mainWindow: Electron.BrowserWindow = null;
@@ -501,7 +498,10 @@ crashReporter.start({
productName: 'YourName',
companyName: 'YourCompany',
submitURL: 'https://your-domain.com/url-to-submit',
autoSubmit: true
autoSubmit: true,
extra: {
someKey: "value"
}
});
// nativeImage

View File

@@ -1369,15 +1369,11 @@ declare module Electron {
* Default: Electron
*/
productName?: string;
/**
* Default: GitHub, Inc.
*/
companyName?: string;
companyName: string;
/**
* URL that crash reports would be sent to as POST.
* Default: http://54.249.141.255:1127/post
*/
submitURL?: string;
submitURL: string;
/**
* Send the crash report without user interaction.
* Default: true.
@@ -1392,7 +1388,7 @@ declare module Electron {
* Only string properties are send correctly.
* Nested objects are not supported.
*/
extra?: {};
extra?: {[prop: string]: string};
}
interface CrashReporterPayload extends Object {
@@ -1436,7 +1432,7 @@ declare module Electron {
}
interface CrashReporter {
start(options?: CrashReporterStartOptions): void;
start(options: CrashReporterStartOptions): void;
/**
* @returns The date and ID of the last crash report. When there was no crash report