Skip to content

Commit

Permalink
Merge pull request brave#644 from brave/remote-require
Browse files Browse the repository at this point in the history
remove electron remote.require api
  • Loading branch information
bridiver authored Aug 28, 2018
2 parents f256433 + a38183c commit bdab7f9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions lib/browser/rpc-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,6 @@ const callFunction = function (event, func, caller, args) {
}
}

ipcMain.on('ELECTRON_BROWSER_REQUIRE', function (event, module) {
try {
event.returnValue = valueToMeta(event.sender, process.mainModule.require(module))
} catch (error) {
event.returnValue = exceptionToMeta(error)
}
})

ipcMain.on('ELECTRON_BROWSER_GET_BUILTIN', function (event, module) {
try {
event.returnValue = valueToMeta(event.sender, electron[module])
Expand Down
4 changes: 0 additions & 4 deletions lib/renderer/api/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,6 @@ ipcRenderer.on('ELECTRON_RENDERER_RELEASE_CALLBACK', function (event, id) {

var binding = {}

binding.require = function (module) {
return metaToValue(ipcRenderer.sendSync('ELECTRON_BROWSER_REQUIRE', module))
}

// Alias to remote.require('electron').xxx.
binding.getBuiltin = function (module) {
return metaToValue(ipcRenderer.sendSync('ELECTRON_BROWSER_GET_BUILTIN', module))
Expand Down

0 comments on commit bdab7f9

Please sign in to comment.