Skip to content

Commit

Permalink
Revert "Cherry-pick ba76ae8. rdar://problem/99535627"
Browse files Browse the repository at this point in the history
  • Loading branch information
MyahCobbs committed Feb 8, 2023
1 parent 04c8432 commit dd6307e
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 21 deletions.
8 changes: 0 additions & 8 deletions Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,6 @@ void AuthenticatorCoordinator::discoverFromExternalSource(const Document& docume
return;
}

if (requestOptions.signal) {
requestOptions.signal->addAlgorithm([weakThis = WeakPtr { *this }](JSC::JSValue) {
if (!weakThis)
return;
weakThis->m_client->cancel();
});
}

auto callback = [weakThis = WeakPtr { *this }, clientDataJson = WTFMove(clientDataJson), promise = WTFMove(promise), abortSignal = WTFMove(requestOptions.signal)] (AuthenticatorResponseData&& data, AuthenticatorAttachment attachment, ExceptionData&& exception) mutable {
if (abortSignal && abortSignal->aborted()) {
promise.reject(Exception { AbortError, "Aborted by AbortSignal."_s });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class AuthenticatorCoordinatorClient : public CanMakeWeakPtr<AuthenticatorCoordi
virtual void getAssertion(const Frame&, const SecurityOrigin&, const Vector<uint8_t>&, const PublicKeyCredentialRequestOptions&, MediationRequirement, const ScopeAndCrossOriginParent&, RequestCompletionHandler&&) = 0;
virtual void isConditionalMediationAvailable(const SecurityOrigin&, QueryCompletionHandler&&) = 0;
virtual void isUserVerifyingPlatformAuthenticatorAvailable(const SecurityOrigin&, QueryCompletionHandler&&) = 0;
virtual void cancel() = 0;

virtual void resetUserGestureRequirement() { }
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ void WebAuthenticatorCoordinatorProxy::handleRequest(WebAuthenticationRequestDat
}

#if !HAVE(UNIFIED_ASC_AUTH_UI)
void WebAuthenticatorCoordinatorProxy::cancel()
{
}

void WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable(const SecurityOriginData&, QueryCompletionHandler&& handler)
{
handler(LocalService::isAvailable());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ class WebAuthenticatorCoordinatorProxy : public IPC::MessageReceiver {
void getAssertion(WebCore::FrameIdentifier, FrameInfoData&&, Vector<uint8_t>&& hash, WebCore::PublicKeyCredentialRequestOptions&&, WebCore::CredentialRequestOptions::MediationRequirement, std::optional<WebCore::SecurityOriginData>, bool processingUserGesture, RequestCompletionHandler&&);
void isUserVerifyingPlatformAuthenticatorAvailable(const WebCore::SecurityOriginData&, QueryCompletionHandler&&);
void isConditionalMediationAvailable(const WebCore::SecurityOriginData&, QueryCompletionHandler&&);
void cancel();

void handleRequest(WebAuthenticationRequestData&&, RequestCompletionHandler&&);

WebPageProxy& m_webPageProxy;

#if HAVE(UNIFIED_ASC_AUTH_UI)
void cancel();
RetainPtr<ASCCredentialRequestContext> contextForRequest(WebAuthenticationRequestData&&);
void performRequest(RetainPtr<ASCCredentialRequestContext>, RequestCompletionHandler&&);
RetainPtr<ASCAuthorizationRemotePresenter> m_presenter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ messages -> WebAuthenticatorCoordinatorProxy NotRefCounted {
GetAssertion(WebCore::FrameIdentifier frameID, struct WebKit::FrameInfoData frameInfo, Vector<uint8_t> hash, struct WebCore::PublicKeyCredentialRequestOptions options, enum:uint8_t WebCore::CredentialRequestOptions::MediationRequirement mediation, std::optional<WebCore::SecurityOriginData> parentOrigin, bool processingUserGesture) -> (struct WebCore::AuthenticatorResponseData data, enum:uint8_t WebCore::AuthenticatorAttachment attachment, struct WebCore::ExceptionData exception)
isConditionalMediationAvailable(struct WebCore::SecurityOriginData origin) -> (bool result)
IsUserVerifyingPlatformAuthenticatorAvailable(struct WebCore::SecurityOriginData origin) -> (bool result)
Cancel()
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ void WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable(
m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::IsUserVerifyingPlatformAuthenticatorAvailable(origin.data()), WTFMove(handler));
}

void WebAuthenticatorCoordinator::cancel()
{
m_webPage.send(Messages::WebAuthenticatorCoordinatorProxy::Cancel());
}

bool WebAuthenticatorCoordinator::processingUserGesture(const Frame& frame, const FrameIdentifier& frameID)
{
auto processingUserGesture = UserGestureIndicator::processingUserGestureForMedia();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class WebAuthenticatorCoordinator final : public WebCore::AuthenticatorCoordinat
void isConditionalMediationAvailable(const WebCore::SecurityOrigin&, WebCore::QueryCompletionHandler&&) final;
void isUserVerifyingPlatformAuthenticatorAvailable(const WebCore::SecurityOrigin&, WebCore::QueryCompletionHandler&&) final;
void resetUserGestureRequirement() final { m_requireUserGesture = false; }
void cancel() final;

bool processingUserGesture(const WebCore::Frame&, const WebCore::FrameIdentifier&);

Expand Down

0 comments on commit dd6307e

Please sign in to comment.