refactor: allocate api::App on cpp heap (#48118)

This commit is contained in:
Robo 2025-08-20 20:35:08 +09:00 committed by GitHub
commit dd54e84a58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 133 additions and 26 deletions

View file

@ -1,11 +1,14 @@
import { Menu } from 'electron/main';
import { EventEmitter } from 'events';
import * as fs from 'fs';
const bindings = process._linkedBinding('electron_browser_app');
const commandLine = process._linkedBinding('electron_common_command_line');
const { app } = bindings;
Object.setPrototypeOf(app, EventEmitter.prototype);
// Only one app object permitted.
export default app;