e3fe80e0e8
* fix: increace main thread stack size on windows x86 * chore: improve quit-on-crashed-event spec * chore: add debug logs * Revert "chore: add debug logs" This reverts commit 0be81ae07c85095ac2c920436b97557c95c1c524. * chore: use a reliable crash endpoint Co-authored-by: Stephen Wang <wangwenqiang.wwq@bytedance.com> Co-authored-by: Deepak Mohan <hop2deep@gmail.com>
19 lines
473 B
JavaScript
19 lines
473 B
JavaScript
const { app, BrowserWindow } = require('electron');
|
|
|
|
app.once('ready', async () => {
|
|
const w = new BrowserWindow({
|
|
show: false,
|
|
webPreferences: {
|
|
contextIsolation: false,
|
|
nodeIntegration: true
|
|
}
|
|
});
|
|
w.webContents.once('render-process-gone', (_, details) => {
|
|
if (details.reason === 'crashed') {
|
|
process.exit(0);
|
|
} else {
|
|
process.exit(details.exitCode);
|
|
}
|
|
});
|
|
await w.webContents.loadURL('chrome://checkcrash');
|
|
});
|