feat: [crashReporter] enable compression by default (#25288)
This commit is contained in:
parent
4484e95fc8
commit
4dc09ea9dc
5 changed files with 8 additions and 2 deletions
|
@ -59,7 +59,7 @@ The `crashReporter` module has the following methods:
|
|||
* `rateLimit` Boolean (optional) _macOS_ _Windows_ - If true, limit the
|
||||
number of crashes uploaded to 1/hour. Default is `false`.
|
||||
* `compress` Boolean (optional) - If true, crash reports will be compressed
|
||||
and uploaded with `Content-Encoding: gzip`. Default is `false`.
|
||||
and uploaded with `Content-Encoding: gzip`. Default is `true`.
|
||||
* `extra` Record<String, String> (optional) - Extra string key/value
|
||||
annotations that will be sent along with crash reports that are generated
|
||||
in the main process. Only string values are supported. Crashes generated in
|
||||
|
|
|
@ -13,7 +13,7 @@ class CrashReporter {
|
|||
submitURL,
|
||||
uploadToServer = true,
|
||||
rateLimit = false,
|
||||
compress = false
|
||||
compress = true
|
||||
} = options || {};
|
||||
|
||||
if (submitURL == null) throw new Error('submitURL is a required option to crashReporter.start');
|
||||
|
|
|
@ -232,6 +232,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_
|
|||
await remotely((port: number) => {
|
||||
require('electron').crashReporter.start({
|
||||
submitURL: `http://127.0.0.1:${port}`,
|
||||
compress: false,
|
||||
ignoreSystemCrashHandler: true
|
||||
});
|
||||
}, [port]);
|
||||
|
@ -271,6 +272,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_
|
|||
remotely((port: number) => {
|
||||
require('electron').crashReporter.start({
|
||||
submitURL: `http://127.0.0.1:${port}`,
|
||||
compress: false,
|
||||
ignoreSystemCrashHandler: true,
|
||||
extra: { longParam: 'a'.repeat(100000) }
|
||||
});
|
||||
|
@ -287,6 +289,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_
|
|||
remotely((port: number, kKeyLengthMax: number) => {
|
||||
require('electron').crashReporter.start({
|
||||
submitURL: `http://127.0.0.1:${port}`,
|
||||
compress: false,
|
||||
ignoreSystemCrashHandler: true,
|
||||
extra: {
|
||||
['a'.repeat(kKeyLengthMax + 10)]: 'value',
|
||||
|
@ -399,6 +402,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_
|
|||
await remotely((port: number) => {
|
||||
require('electron').crashReporter.start({
|
||||
submitURL: `http://127.0.0.1:${port}`,
|
||||
compress: false,
|
||||
ignoreSystemCrashHandler: true
|
||||
});
|
||||
}, [port]);
|
||||
|
|
|
@ -12,6 +12,7 @@ const addGlobalParam = app.commandLine.getSwitchValue('add-global-param')?.split
|
|||
crashReporter.start({
|
||||
productName: 'Zombies',
|
||||
companyName: 'Umbrella Corporation',
|
||||
compress: false,
|
||||
uploadToServer,
|
||||
submitURL: url,
|
||||
ignoreSystemCrashHandler: true,
|
||||
|
|
|
@ -2,6 +2,7 @@ if (process.platform === 'linux') {
|
|||
process.crashReporter.start({
|
||||
submitURL: process.argv[2],
|
||||
productName: 'Zombies',
|
||||
compress: false,
|
||||
globalExtra: {
|
||||
_version: process.argv[3]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue