fix: uv loop polling when render process reuse enabled (#25869)
This commit is contained in:
parent
d57cd09f14
commit
e8166db9d7
2 changed files with 27 additions and 3 deletions
|
@ -4286,6 +4286,30 @@ describe('BrowserWindow module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('reloading with allowRendererProcessReuse enabled', () => {
|
||||
it('does not cause Node.js module API hangs after reload', (done) => {
|
||||
const w = new BrowserWindow({
|
||||
show: false,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
});
|
||||
|
||||
let count = 0;
|
||||
ipcMain.on('async-node-api-done', () => {
|
||||
if (count === 3) {
|
||||
ipcMain.removeAllListeners('async-node-api-done');
|
||||
done();
|
||||
} else {
|
||||
count++;
|
||||
w.reload();
|
||||
}
|
||||
});
|
||||
|
||||
w.loadFile(path.join(fixtures, 'pages', 'send-after-node.html'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('window.webContents.focus()', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('focuses window', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue