1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-19 02:44:01 +00:00

Use fully qualified paths in webauthn_call macro

This commit is contained in:
Isaiah Inuwa
2025-12-04 15:28:05 -06:00
parent 9d10da366f
commit f60f13e246
2 changed files with 5 additions and 6 deletions

View File

@@ -9,9 +9,8 @@ use std::{mem::MaybeUninit, ptr::NonNull};
use base64::{engine::general_purpose::STANDARD, Engine as _};
use windows::{
core::{GUID, HRESULT},
Win32::{Foundation::HWND, System::LibraryLoader::GetProcAddress},
Win32::Foundation::HWND,
};
use windows_core::s;
use crate::{
types::UserId,

View File

@@ -10,12 +10,12 @@ use crate::{ErrorKind, WinWebAuthnError};
macro_rules! webauthn_call {
($symbol:literal as fn $fn_name:ident($($arg:ident: $arg_type:ty),+) -> $result_type:ty) => (
pub(super) fn $fn_name($($arg: $arg_type),*) -> Result<$result_type, WinWebAuthnError> {
pub(super) fn $fn_name($($arg: $arg_type),*) -> Result<$result_type, crate::WinWebAuthnError> {
let library = crate::util::load_webauthn_lib()?;
let response = unsafe {
let address = GetProcAddress(library, s!($symbol)).ok_or(
WinWebAuthnError::new(
ErrorKind::DllLoad,
let address = windows::Win32::System::LibraryLoader::GetProcAddress(library, windows::core::s!($symbol)).ok_or(
crate::WinWebAuthnError::new(
crate::ErrorKind::DllLoad,
&format!(
"Failed to load function {}",
$symbol