electron/spec/fixtures/api/crash.html

34 lines
No EOL
859 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
const query = new URLSearchParams(location.search)
const port = query.get('port')
const uploadToServer = !query.has('skipUpload')
const {crashReporter, ipcRenderer} = require('electron');
crashReporter.start({
productName: 'Zombies',
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1:' + port,
uploadToServer: uploadToServer,
ignoreSystemCrashHandler: true,
extra: {
'extra1': 'extra1',
'extra2': 'extra2',
}
})
if (process.platform === 'win32') {
ipcRenderer.sendSync('crash-service-pid', crashReporter.crashServicePid)
}
if (!uploadToServer) {
ipcRenderer.sendSync('list-existing-dumps')
}
setImmediate(() => { process.crash() })
</script>
</body>
</html>