summaryrefslogtreecommitdiff
path: root/ext/flash/lib.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-09-27 22:36:33 +0200
committerGitHub <noreply@github.com>2022-09-27 22:36:33 +0200
commit212b7dd6da487c070229b6348ec7907b4fecbcf9 (patch)
tree3eb743f90e8b293182a830722eb4ff26bec72039 /ext/flash/lib.rs
parenta344368603063bcb281e743f3810ca1e4e46e85d (diff)
feat: Add requesting API name to permission prompt (#15936)
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Diffstat (limited to 'ext/flash/lib.rs')
-rw-r--r--ext/flash/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/flash/lib.rs b/ext/flash/lib.rs
index 957c011bf..93c95f84b 100644
--- a/ext/flash/lib.rs
+++ b/ext/flash/lib.rs
@@ -1135,7 +1135,7 @@ where
check_unstable(state, "Deno.serve");
state
.borrow_mut::<P>()
- .check_net(&(&opts.hostname, Some(opts.port)))?;
+ .check_net(&(&opts.hostname, Some(opts.port)), "Deno.serve()")?;
let addr = resolve_addr_sync(&opts.hostname, opts.port)?
.next()
@@ -1377,6 +1377,7 @@ pub trait FlashPermissions {
fn check_net<T: AsRef<str>>(
&mut self,
_host: &(T, Option<u16>),
+ _api_name: &str,
) -> Result<(), AnyError>;
}