fune/dom/webauthn/AuthrsTransport.cpp
Iulian Moraru 6fa14bea14 Backed out 2 changesets (bug 1816519, bug 1816520) for causing build bustages on WinWebAuthnManager.cpp. CLOSED TREE
Backed out changeset 1bae007bf17b (bug 1816520)
Backed out changeset 96cdbead4d15 (bug 1816519)
2023-08-31 23:07:26 +03:00

29 lines
772 B
C++

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AuthrsTransport.h"
#include "nsIWebAuthnController.h"
#include "nsCOMPtr.h"
namespace {
extern "C" {
// Implemented in Rust
nsresult authrs_transport_constructor(nsIWebAuthnTransport** result);
} // extern "C"
} // namespace
namespace mozilla::dom {
already_AddRefed<nsIWebAuthnTransport> NewAuthrsTransport() {
nsCOMPtr<nsIWebAuthnTransport> transport;
nsresult rv = authrs_transport_constructor(getter_AddRefs(transport));
if (NS_WARN_IF(NS_FAILED(rv))) {
return nullptr;
}
return transport.forget();
}
} // namespace mozilla::dom