[webkit-reviews] review granted: [Bug 218874] Removed DeferrableTaskTimer : [Attachment 414054] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 13 10:59:29 PST 2020


Chris Dumez <cdumez at apple.com> has granted Geoffrey Garen <ggaren at apple.com>'s
request for review:
Bug 218874: Removed DeferrableTaskTimer
https://bugs.webkit.org/show_bug.cgi?id=218874

Attachment 414054: Patch

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




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

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

> Source/WebCore/platform/Timer.h:112
> +    static void startOneShot(Seconds interval, WTF::Function<void()>&&
function)

Maybe it's just me but I preferred the previous order: Lambda first and then
the delay. BTW, seems weird to call this interval instead of delay given that
it is one shot.

The reason for my preference is that it would be consistent with
window.setTimeout(() => { }, 100);

Finally, I wish we could find a better name for this function than
startOneShot() given that it is a static. Maybe something like Timer::doAfter()
or runAfter() (similarly to dispatch_after()).

> Source/WebKit/ChangeLog:12
> +	   * UIProcess/WebPageProxy.h: Use WTF::RunLoop::Timer instead of

Good catch.

> Source/WebKit/UIProcess/WebPageProxy.h:2758
> +    WTF::RunLoop::Timer<WebPageProxy>
m_updateReportedMediaCaptureStateTimer;

Why WTF:: ?


More information about the webkit-reviews mailing list