[webkit-reviews] review granted: [Bug 210944] Reduce use of WebPageProxy::VoidCallback : [Attachment 397401] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 24 11:17:19 PDT 2020


Darin Adler <darin at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 210944: Reduce use of WebPageProxy::VoidCallback
https://bugs.webkit.org/show_bug.cgi?id=210944

Attachment 397401: Patch

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




--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 397401
  --> https://bugs.webkit.org/attachment.cgi?id=397401
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:2176
> +    sendWithAsyncReply(Messages::WebPage::SetInitialFocus(forward,
isKeyboardEventValid, keyboardEvent), [callbackFunction =
WTFMove(callbackFunction), backgroundActivity =
m_process->throttler().backgroundActivity("WebPageProxy::setInitialFocus"_s)]
() mutable {

Why does this need to be "mutable"? Same question about the various other
similar cases below.

> Source/WebKit/UIProcess/WebPageProxy.h:782
> +    void focusNextFocusedElement(bool isForward, CompletionHandler<void()>&&
= []() { });

I believe our coding style is to omit the () here. There are 10 or more other
cases of this in this patch. I suggest removing them all.


More information about the webkit-reviews mailing list