Browse Source

chore: Add a condition to crashReporter deprecate log (#28013)

* Add a condition to crashReporter deprecate log

When developer set  submitURL to '' crash reports will be saved  at `...\AppData\Roaming\...\Crashpad\reports`, will not be uploaded to the server.
So  at this time `deprecate.log('Sending uncompressed crash reports....')`  is  unnecessary.

* Update lib/browser/api/crash-reporter.ts

change to check uploadToServer

Co-authored-by: Jeremy Rose <[email protected]>

Co-authored-by: liulun <[email protected]>
Co-authored-by: Jeremy Rose <[email protected]>
trop[bot] 4 years ago
parent
commit
f1c4265072
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/browser/api/crash-reporter.ts

+ 1 - 1
lib/browser/api/crash-reporter.ts

@@ -18,7 +18,7 @@ class CrashReporter {
 
     if (submitURL == null) throw new Error('submitURL is a required option to crashReporter.start');
 
-    if (!compress) {
+    if (!compress && uploadToServer) {
       deprecate.log('Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.');
     }