RESOLVED FIXED 203937
[WebAuthn] Return NotAllowedError immediately for UI cancellations
https://bugs.webkit.org/show_bug.cgi?id=203937
Summary [WebAuthn] Return NotAllowedError immediately for UI cancellations
Jiewen Tan
Reported 2019-11-06 18:40:53 PST
return NotAllowedError immediately for UI cancellations.
Attachments
Patch (4.81 KB, patch)
2019-11-06 18:47 PST, Jiewen Tan
bfulgham: review+
bfulgham: commit-queue-
Jiewen Tan
Comment 1 2019-11-06 18:41:17 PST
Jiewen Tan
Comment 2 2019-11-06 18:47:59 PST
Brent Fulgham
Comment 3 2019-11-07 17:09:05 PST
Comment on attachment 383003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383003&action=review r=me, but I would make the patch as small as possible to make it easier to integrate quickly. > Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:202 > + clearState(); To keep the patch small, I would just keep using resetState here. > Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:-217 > - resetState(); Then you don't need this change. > Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:-357 > -void AuthenticatorManager::resetState() ... or this change. > Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.h:-95 > - void resetState(); Or this change. > Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:562 > + EXPECT_TRUE(webAuthenticationPanelFailed); Nice!
Jiewen Tan
Comment 4 2019-11-07 17:29:36 PST
Comment on attachment 383003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383003&action=review Thanks Brent for r+ this change. >> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:202 >> + clearState(); > > To keep the patch small, I would just keep using resetState here. I think this patch is already small enough for quick integration. Splitting this change into two doesn't seem necessary.
Brent Fulgham
Comment 5 2019-11-08 08:38:08 PST
Comment on attachment 383003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383003&action=review >>> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:202 >>> + clearState(); >> >> To keep the patch small, I would just keep using resetState here. > > I think this patch is already small enough for quick integration. Splitting this change into two doesn't seem necessary. I'm not suggesting you split the change; I just think it's unnecessary to remove the 'resetState' method. Just keep it as-is.
Jiewen Tan
Comment 6 2019-11-08 11:24:24 PST
Comment on attachment 383003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383003&action=review >>>> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:202 >>>> + clearState(); >>> >>> To keep the patch small, I would just keep using resetState here. >> >> I think this patch is already small enough for quick integration. Splitting this change into two doesn't seem necessary. > > I'm not suggesting you split the change; I just think it's unnecessary to remove the 'resetState' method. Just keep it as-is. The reason to have the 'resetState' method is to avoid the m_pendingCompletionHandler check in 'clearState', and is specifically crafted for this method. Now this method will invoke m_pendingCompletionHandler as well, and therefore there is no need to have the 'resetState' method anymore. That's why I remove it.
Brent Fulgham
Comment 7 2019-11-08 11:26:24 PST
(In reply to Jiewen Tan from comment #6) > Comment on attachment 383003 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=383003&action=review > > >>>> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:202 > >>>> + clearState(); > >>> > >>> To keep the patch small, I would just keep using resetState here. > >> > >> I think this patch is already small enough for quick integration. Splitting this change into two doesn't seem necessary. > > > > I'm not suggesting you split the change; I just think it's unnecessary to remove the 'resetState' method. Just keep it as-is. > > The reason to have the 'resetState' method is to avoid the > m_pendingCompletionHandler check in 'clearState', and is specifically > crafted for this method. Now this method will invoke > m_pendingCompletionHandler as well, and therefore there is no need to have > the 'resetState' method anymore. That's why I remove it. Fine. Let's just get it landed so I can try to get it in.
Jiewen Tan
Comment 8 2019-11-08 11:37:00 PST
(In reply to Brent Fulgham from comment #7) > (In reply to Jiewen Tan from comment #6) > > Comment on attachment 383003 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=383003&action=review > > > > >>>> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:202 > > >>>> + clearState(); > > >>> > > >>> To keep the patch small, I would just keep using resetState here. > > >> > > >> I think this patch is already small enough for quick integration. Splitting this change into two doesn't seem necessary. > > > > > > I'm not suggesting you split the change; I just think it's unnecessary to remove the 'resetState' method. Just keep it as-is. > > > > The reason to have the 'resetState' method is to avoid the > > m_pendingCompletionHandler check in 'clearState', and is specifically > > crafted for this method. Now this method will invoke > > m_pendingCompletionHandler as well, and therefore there is no need to have > > the 'resetState' method anymore. That's why I remove it. > > Fine. Let's just get it landed so I can try to get it in. Thanks, Brent.
Jiewen Tan
Comment 9 2019-11-08 11:44:41 PST
Jiewen Tan
Comment 10 2019-11-18 11:09:12 PST
*** Bug 204186 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.