fix: crash when calling non-reentrant function in loadURL
(#40143)
This commit is contained in:
parent
563c370d51
commit
86df4db6f1
2 changed files with 28 additions and 2 deletions
|
@ -431,6 +431,19 @@ describe('webContents module', () => {
|
|||
}
|
||||
});
|
||||
|
||||
it('fails if loadURL is called inside a non-reentrant critical section', (done) => {
|
||||
w.webContents.once('did-fail-load', (_event, _errorCode, _errorDescription, validatedURL) => {
|
||||
expect(validatedURL).to.contain('blank.html');
|
||||
done();
|
||||
});
|
||||
|
||||
w.webContents.once('did-start-loading', () => {
|
||||
w.loadURL(`file://${fixturesPath}/pages/blank.html`);
|
||||
});
|
||||
|
||||
w.loadURL('data:text/html,<h1>HELLO</h1>');
|
||||
});
|
||||
|
||||
it('sets appropriate error information on rejection', async () => {
|
||||
let err: any;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue