electron/spec/fixtures/api/crash.html
2017-03-31 13:48:07 -03:00

25 lines
693 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
var url = require('url').parse(window.location.href, true);
var uploadToServer = !url.query.skipUpload;
var port = url.query.port;
var {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 (!uploadToServer) {
ipcRenderer.sendSync('set-crash-directory', crashReporter.getCrashesDirectory())
}
setImmediate(function() { process.crash(); });
</script>
</body>
</html>