electron/spec/fixtures/api/crash-restart.html
Kevin Sawicki af7702d0f2 🎨
2017-02-14 09:37:09 -08:00

46 lines
1,003 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
const {port} = require('url').parse(window.location.href, true).query
const {crashReporter} = require('electron')
crashReporter.start({
productName: 'Zombies',
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1:' + port,
uploadToServer: true,
ignoreSystemCrashHandler: true,
extra: {
extra1: 'extra1',
extra2: 'initial',
extra3: 'extra3'
}
})
setImmediate(() => {
if (process.platform === 'darwin2') {
crashReporter.setExtraParameter('extra2', 'extra2')
crashReporter.setExtraParameter('extra3', null)
} else {
crashReporter.start({
productName: 'Zombies',
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1:' + port,
uploadToServer: true,
ignoreSystemCrashHandler: true,
extra: {
extra1: 'extra1',
extra2: 'extra2'
}
})
}
setImmediate(() => {
process.crash()
})
})
</script>
</body>
</html>