Changeset 252248 in webkit
- Timestamp:
- Nov 8, 2019 11:44:34 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r252234 r252248 1 2019-11-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Return NotAllowedError immediately for UI cancellations 4 https://bugs.webkit.org/show_bug.cgi?id=203937 5 <rdar://problem/56962420> 6 7 Reviewed by Brent Fulgham. 8 9 NotAllowedError representing UI cancellations should be returned to sites 10 immediately such that sites could show appropriate error page immediately. 11 12 Covered by existing tests. 13 14 * UIProcess/WebAuthentication/AuthenticatorManager.cpp: 15 (WebKit::AuthenticatorManager::cancelRequest): 16 (WebKit::AuthenticatorManager::clearState): 17 (WebKit::AuthenticatorManager::resetState): Deleted. 18 * UIProcess/WebAuthentication/AuthenticatorManager.h: 19 1 20 2019-11-08 Carlos Garcia Campos <cgarcia@igalia.com> 2 21 -
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp
r252035 r252248 199 199 if (!m_pendingCompletionHandler || m_pendingRequestData.panel.get() != &panel) 200 200 return; 201 resetState(); 201 invokePendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by the user."_s }); 202 clearState(); 203 m_requestTimeOutTimer.stop(); 202 204 } 203 205 … … 215 217 if (m_pendingCompletionHandler) 216 218 return; 217 resetState(); 219 m_authenticators.clear(); 220 m_services.clear(); 221 m_pendingRequestData = { }; 218 222 } 219 223 … … 355 359 } 356 360 357 void AuthenticatorManager::resetState()358 {359 m_authenticators.clear();360 m_services.clear();361 m_pendingRequestData = { };362 }363 364 361 void AuthenticatorManager::restartDiscovery() 365 362 { -
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.h
r251762 r252248 93 93 void timeOutTimerFired(); 94 94 void runPanel(); 95 void resetState();96 95 void restartDiscovery(); 97 96 TransportSet getTransports() const; -
trunk/Tools/ChangeLog
r252244 r252248 1 2019-11-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Return NotAllowedError immediately for UI cancellations 4 https://bugs.webkit.org/show_bug.cgi?id=203937 5 <rdar://problem/56962420> 6 7 Reviewed by Brent Fulgham. 8 9 * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: 10 (TestWebKitAPI::TEST): 11 1 12 2019-11-08 Aakash Jain <aakash_jain@apple.com> 2 13 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm
r252035 r252248 559 559 Util::run(&webAuthenticationPanelRan); 560 560 [[delegate panel] cancel]; 561 [webView waitForMessage:@"Operation timed out."]; 562 EXPECT_FALSE(webAuthenticationPanelFailed); 563 EXPECT_FALSE(webAuthenticationPanelSucceded); 561 [webView waitForMessage:@"This request has been cancelled by the user."]; 562 EXPECT_TRUE(webAuthenticationPanelFailed); 564 563 } 565 564
Note: See TracChangeset
for help on using the changeset viewer.