chore: remove app.allowRendererProcessReuse (#26874)

This commit is contained in:
Samuel Attard 2021-04-21 13:59:11 -07:00 committed by GitHub
parent 4ca518468d
commit 79077f6df9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 43 additions and 392 deletions

View file

@ -1 +0,0 @@
<html></html>

View file

@ -1,36 +0,0 @@
const { app, BrowserWindow, ipcMain } = require('electron');
const path = require('path');
process.noDeprecation = true;
process.on('uncaughtException', (e) => {
console.error(e);
process.exit(1);
});
app.allowRendererProcessReuse = JSON.parse(process.argv[2]);
const pids = [];
let win;
ipcMain.on('pid', (event, pid) => {
pids.push(pid);
if (pids.length === 2) {
console.log(JSON.stringify(pids));
if (win) win.close();
app.quit();
} else {
if (win) win.reload();
}
});
app.whenReady().then(() => {
win = new BrowserWindow({
show: false,
webPreferences: {
preload: path.resolve(__dirname, 'preload.js'),
contextIsolation: true
}
});
win.loadFile('index.html');
});

View file

@ -1,4 +0,0 @@
{
"name": "electron-test-site-instance-overrides",
"main": "main.js"
}

View file

@ -1,3 +0,0 @@
const { ipcRenderer } = require('electron');
ipcRenderer.send('pid', process.pid);