diff options
| author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-11-04 09:17:21 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-04 09:17:21 -0800 |
| commit | fe9f0ee5934871175758857899fe64e56c397fd5 (patch) | |
| tree | ee770a45366d1b054e7429cea2eff56b04532830 /ext/ffi/callback.rs | |
| parent | fb1d33a7111e45e9b414cfe922a5db5ee4daf3ea (diff) | |
refactor(runtime/permissions): use concrete error types (#26464)
Diffstat (limited to 'ext/ffi/callback.rs')
| -rw-r--r-- | ext/ffi/callback.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/ffi/callback.rs b/ext/ffi/callback.rs index f33e0413a..29583c800 100644 --- a/ext/ffi/callback.rs +++ b/ext/ffi/callback.rs @@ -38,7 +38,7 @@ pub enum CallbackError { #[error(transparent)] Resource(deno_core::error::AnyError), #[error(transparent)] - Permission(deno_core::error::AnyError), + Permission(#[from] deno_permissions::PermissionCheckError), #[error(transparent)] Other(deno_core::error::AnyError), } @@ -572,9 +572,7 @@ where FP: FfiPermissions + 'static, { let permissions = state.borrow_mut::<FP>(); - permissions - .check_partial_no_path() - .map_err(CallbackError::Permission)?; + permissions.check_partial_no_path()?; let thread_id: u32 = LOCAL_THREAD_ID.with(|s| { let value = *s.borrow(); |
