fix: capture the promise global to avoid userland mutation (#20925)
This commit is contained in:
parent
4de04da27a
commit
267821831c
6 changed files with 39 additions and 2 deletions
|
@ -75,6 +75,7 @@ ipcMain.on('echo', function (event, msg) {
|
|||
})
|
||||
|
||||
global.setTimeoutPromisified = util.promisify(setTimeout)
|
||||
global.returnAPromise = (value) => new Promise((resolve) => setTimeout(() => resolve(value), 100))
|
||||
|
||||
process.removeAllListeners('uncaughtException')
|
||||
process.on('uncaughtException', function (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue