fix: do not remove node globals when context isolation is enabled (#18967)

This commit is contained in:
Samuel Attard 2019-06-28 14:37:00 -07:00 committed by Shelley Vohr
parent 1d8e16bc6e
commit 6eed4a98ce

View file

@ -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
@ -188,6 +190,7 @@ if (nodeIntegration) {
delete global.global
})
}
}
const errorUtils = require('@electron/internal/common/error-utils')