refactor: implement Chrome Extension APIs without the remote module (#16686)

* refactor: implement Chrome Extension APIs without the remote module

* remove unused potentiallyRemoteRequire
This commit is contained in:
Milan Burda 2019-02-10 19:38:14 +01:00 committed by Shelley Vohr
parent 1898f91620
commit 7a3d220347
3 changed files with 79 additions and 77 deletions

View file

@ -8,18 +8,3 @@ exports.getRemote = function (name) {
}
return remote[name]
}
exports.remoteRequire = function (name) {
if (!remote) {
throw new Error(`${name} requires remote, which is not enabled`)
}
return remote.require(name)
}
exports.potentiallyRemoteRequire = function (name) {
if (process.sandboxed) {
return exports.remoteRequire(name)
} else {
return require(name)
}
}