Restart crash service in each spec

This commit is contained in:
Kevin Sawicki 2017-04-19 16:32:43 -07:00 committed by Kevin Sawicki
parent a7a92e1cd3
commit de62f1ea6c
5 changed files with 55 additions and 5 deletions

View file

@ -24,7 +24,10 @@ var argv = require('yargs')
.argv
var window = null
process.port = 0 // will be used by crash-reporter spec.
// will be used by crash-reporter spec.
process.port = 0
process.crashServicePid = 0
v8.setFlagsFromString('--expose_gc')
app.commandLine.appendSwitch('js-flags', '--expose_gc')
@ -329,6 +332,11 @@ ipcMain.on('navigate-with-pending-entry', (event, id) => {
})
})
ipcMain.on('crash-service-pid', (event, pid) => {
process.crashServicePid = pid
event.returnValue = null
})
// Suspend listeners until the next event and then restore them
const suspendListeners = (emitter, eventName, callback) => {
const listeners = emitter.listeners(eventName)