Don't require browser process module from renderer
This can cause issues when it is accessed from the require cache or module tree since the getters throw errors when called.
This commit is contained in:
parent
51d6a55061
commit
e8a79cb88d
2 changed files with 50 additions and 24 deletions
|
@ -5,6 +5,7 @@ common.defineProperties(exports)
|
|||
|
||||
Object.defineProperties(exports, {
|
||||
// Browser side modules, please sort with alphabet order.
|
||||
// Any new modules added here must also be added to the array in remote.js
|
||||
app: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
|
@ -35,18 +36,18 @@ Object.defineProperties(exports, {
|
|||
return require('../dialog')
|
||||
}
|
||||
},
|
||||
ipcMain: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return require('../ipc-main')
|
||||
}
|
||||
},
|
||||
globalShortcut: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return require('../global-shortcut')
|
||||
}
|
||||
},
|
||||
ipcMain: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return require('../ipc-main')
|
||||
}
|
||||
},
|
||||
Menu: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
|
@ -59,6 +60,12 @@ Object.defineProperties(exports, {
|
|||
return require('../menu-item')
|
||||
}
|
||||
},
|
||||
net: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return require('../net')
|
||||
}
|
||||
},
|
||||
powerMonitor: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
|
@ -107,12 +114,6 @@ Object.defineProperties(exports, {
|
|||
return require('../web-contents')
|
||||
}
|
||||
},
|
||||
net: {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return require('../net')
|
||||
}
|
||||
},
|
||||
|
||||
// The internal modules, invisible unless you know their names.
|
||||
NavigationController: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue