refactor DenoPermissions.check_net & resolve_addr (#3182)

This commit is contained in:
EnokMan 2019-10-23 22:19:27 +08:00 committed by Ry Dahl
parent 4bebbda8db
commit 7c60ab4664
6 changed files with 70 additions and 127 deletions

View file

@ -336,8 +336,8 @@ impl ThreadSafeState {
}
#[inline]
pub fn check_net(&self, host_and_port: &str) -> Result<(), ErrBox> {
self.permissions.check_net(host_and_port)
pub fn check_net(&self, hostname: &str, port: u16) -> Result<(), ErrBox> {
self.permissions.check_net(hostname, port)
}
#[inline]