|
@@ -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')
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|