refactor: crashReporterInit (#16729)

This commit is contained in:
Milan Burda 2019-02-05 21:56:44 +01:00 committed by Shelley Vohr
parent c486ab207a
commit 6d674eebb1
6 changed files with 59 additions and 67 deletions

View file

@ -1,13 +1,11 @@
'use strict'
const CrashReporter = require('@electron/internal/common/crash-reporter')
const { ipcMainInternal } = require('@electron/internal/browser/ipc-main-internal')
const { crashReporterInit } = require('@electron/internal/browser/crash-reporter-init')
class CrashReporterMain extends CrashReporter {
sendSync (channel, ...args) {
const event = {}
ipcMainInternal.emit(channel, event, ...args)
return event.returnValue
init (options) {
return crashReporterInit(options)
}
}