Changeset 294849 in webkit
- Timestamp:
- May 25, 2022, 4:50:11 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-613-branch/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm
r294298 r294849 379 379 m_proxy = adoptNS([allocASCAgentProxyInstance() init]); 380 380 #if PLATFORM(IOS) 381 [m_proxy performAuthorizationRequestsForContext:requestContext.get() withCompletionHandler:makeBlockPtr([ handler = WTFMove(handler)](id<ASCCredentialProtocol> credential, NSError *error) mutable {382 callOnMainRunLoop([ handler = WTFMove(handler), proxy = WTFMove(proxy), credential = retainPtr(credential), error = retainPtr(error)] () mutable {381 [m_proxy performAuthorizationRequestsForContext:requestContext.get() withCompletionHandler:makeBlockPtr([weakThis = WeakPtr { *this }, handler = WTFMove(handler)](id<ASCCredentialProtocol> credential, NSError *error) mutable { 382 callOnMainRunLoop([weakThis, handler = WTFMove(handler), proxy = WTFMove(proxy), credential = retainPtr(credential), error = retainPtr(error)] () mutable { 383 383 #elif PLATFORM(MAC) 384 384 RetainPtr<NSWindow> window = m_webPageProxy.platformWindow(); … … 388 388 LOG_ERROR("Could not connect to authorization daemon: %@\n", error.get()); 389 389 handler({ }, (AuthenticatorAttachment)0, ExceptionData { NotAllowedError, "Operation failed." }); 390 if (weakThis) 391 weakThis->m_proxy.clear(); 390 392 return; 391 393 } 392 394 393 395 weakThis->m_presenter = adoptNS([allocASCAuthorizationRemotePresenterInstance() init]); 394 [weakThis->m_presenter presentWithWindow:window.get() daemonEndpoint:daemonEndpoint.get() completionHandler:makeBlockPtr([ handler = WTFMove(handler)](id<ASCCredentialProtocol> credentialNotRetain, NSError *errorNotRetain) mutable {396 [weakThis->m_presenter presentWithWindow:window.get() daemonEndpoint:daemonEndpoint.get() completionHandler:makeBlockPtr([weakThis, handler = WTFMove(handler)](id<ASCCredentialProtocol> credentialNotRetain, NSError *errorNotRetain) mutable { 395 397 auto credential = retainPtr(credentialNotRetain); 396 398 auto error = retainPtr(errorNotRetain); 397 399 #endif 398 400 continueAfterRequest(credential, error, WTFMove(handler)); 401 weakThis->m_proxy.clear(); 399 402 #if PLATFORM(MAC) 400 403 }).get()]; … … 416 419 void WebAuthenticatorCoordinatorProxy::cancel() 417 420 { 418 if (m_proxy) 421 if (m_proxy) { 419 422 [m_proxy cancelCurrentRequest]; 423 m_proxy.clear(); 424 } 420 425 } 421 426
Note:
See TracChangeset
for help on using the changeset viewer.