crash.html 875 B

12345678910111213141516171819202122232425262728293031323334
  1. <html>
  2. <body>
  3. <script type="text/javascript" charset="utf-8">
  4. const url = require('url').parse(window.location.href, true);
  5. const uploadToServer = !url.query.skipUpload;
  6. const port = url.query.port;
  7. const {crashReporter, ipcRenderer} = require('electron');
  8. crashReporter.start({
  9. productName: 'Zombies',
  10. companyName: 'Umbrella Corporation',
  11. submitURL: 'http://127.0.0.1:' + port,
  12. uploadToServer: uploadToServer,
  13. ignoreSystemCrashHandler: true,
  14. extra: {
  15. 'extra1': 'extra1',
  16. 'extra2': 'extra2',
  17. }
  18. })
  19. if (process.platform === 'win32') {
  20. ipcRenderer.sendSync('crash-service-pid', crashReporter._crashServiceProcess.pid)
  21. }
  22. if (!uploadToServer) {
  23. ipcRenderer.sendSync('list-existing-dumps')
  24. }
  25. setImmediate(() => { process.crash() })
  26. </script>
  27. </body>
  28. </html>