06f51b7283
* fix: prevent crash when error occurs during event emitter CallMethod * wip: emit error event within trycatch * fix: handle uncaught exceptions within node on web_contents init * fix: create gin_helper::CallMethodCatchException * test: add web-contents create crash to test cases * test: clean up test data for web-contents crash Co-authored-by: Jeremy Rose <jeremya@chromium.org> * fix: convert CatchException to WebContents static helper method * fix: restore try_catch to callsite Co-authored-by: Jeremy Rose <jeremya@chromium.org>
14 lines
273 B
JavaScript
14 lines
273 B
JavaScript
const { app, BrowserWindow } = require('electron');
|
|
|
|
app.whenReady().then(() => {
|
|
const mainWindow = new BrowserWindow({
|
|
show: false
|
|
});
|
|
mainWindow.loadFile('about:blank');
|
|
|
|
app.on('web-contents-created', () => {
|
|
throw new Error();
|
|
});
|
|
|
|
app.quit();
|
|
});
|