Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #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 committed Aug 28, 2018
1 parent 4af2977 commit 0261f4d
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 0261f4d

Please sign in to comment.