electron/spec/fixtures/api/crash.html

34 lines
866 B
HTML
Raw Normal View History

2013-11-14 16:10:43 +00:00
<html>
2013-11-14 16:10:43 +00:00
<body>
<script type="text/javascript" charset="utf-8">
const url = require('url').parse(window.location.href, true);
const uploadToServer = !url.query.skipUpload;
const port = url.query.port;
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',
}
})
2017-04-19 23:32:43 +00:00
if (process.platform === 'win32') {
ipcRenderer.sendSync('crash-service-pid', crashReporter.crashServicePid)
}
2017-04-19 23:32:43 +00:00
if (!uploadToServer) {
ipcRenderer.sendSync('list-existing-dumps')
}
setImmediate(() => { process.crash() })
</script>
2013-11-14 16:10:43 +00:00
</body>
</html>