fix: do not remove node globals when context isolation is enabled (#18967)
This commit is contained in:
parent
1d8e16bc6e
commit
6eed4a98ce
1 changed files with 11 additions and 8 deletions
|
@ -179,7 +179,9 @@ if (nodeIntegration) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// Delete Node's symbols after the Environment has been loaded.
|
||||
// Delete Node's symbols after the Environment has been loaded in a
|
||||
// non context-isolated environment
|
||||
if (!contextIsolation) {
|
||||
process.once('loaded', function () {
|
||||
delete global.process
|
||||
delete global.Buffer
|
||||
|
@ -187,6 +189,7 @@ if (nodeIntegration) {
|
|||
delete global.clearImmediate
|
||||
delete global.global
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const errorUtils = require('@electron/internal/common/error-utils')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue