Use GetUploadsEnabled to return GetShouldUpload
This commit is contained in:
parent
5a1a2616aa
commit
285a36f9de
7 changed files with 31 additions and 7 deletions
|
@ -62,7 +62,6 @@ class CrashReporter {
|
|||
})
|
||||
}
|
||||
|
||||
this._shouldUpload = shouldUpload
|
||||
binding.start(this.getProductName(), companyName, submitURL, this.getCrashesDirectory(), shouldUpload, ignoreSystemCrashHandler, extra)
|
||||
}
|
||||
|
||||
|
@ -104,12 +103,19 @@ class CrashReporter {
|
|||
}
|
||||
|
||||
getShouldUpload() {
|
||||
return this._shouldUpload
|
||||
if (process.type === 'browser') {
|
||||
return binding._getShouldUpload()
|
||||
} else {
|
||||
throw new Error('getShouldUpload can only be called from the main process')
|
||||
}
|
||||
}
|
||||
|
||||
setShouldUpload(shouldUpload) {
|
||||
this._shouldUpload = shouldUpload
|
||||
return binding._setShouldUpload(shouldUpload)
|
||||
if (process.type === 'browser') {
|
||||
return binding._setShouldUpload(shouldUpload)
|
||||
} else {
|
||||
throw new Error('setShouldUpload can only be called from the main process')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue