[webkit-reviews] review granted: [Bug 237839] CoreIPC Hardening: Add user gesture check when saving images : [Attachment 454858] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 16 10:46:16 PDT 2022


Chris Dumez <cdumez at apple.com> has granted Brent Fulgham
<bfulgham at webkit.org>'s request for review:
Bug 237839: CoreIPC Hardening: Add user gesture check when saving images
https://bugs.webkit.org/show_bug.cgi?id=237839

Attachment 454858: Patch

https://bugs.webkit.org/attachment.cgi?id=454858&action=review




--- Comment #17 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 454858
  --> https://bugs.webkit.org/attachment.cgi?id=454858
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=454858&action=review

r=me with changes.

> Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:608
> +    sendWithAsyncReply(Messages::WebPage::PerformActionOnElement(action,
authorizationToken), [weakThis = WeakPtr { *this }, authorizationToken] ()
mutable {

authorizationToken = WTFMove(authorizationToken)

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:3243
>  {

I think you should just add the following at the beginning of the function:
CompletionHandlerCallingScope
callCompletionHandler(WTFMove(completionHandler));

Then you wouldn't need to call the completionHandler on every early return
(which is a foot-gun).


More information about the webkit-reviews mailing list