[webkit-reviews] review granted: [Bug 226515] [Cocoa] Make the hostTime parameter to playSession a Monotonic time : [Attachment 430317] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 2 07:11:19 PDT 2021


youenn fablet <youennf at gmail.com> has granted Jer Noble <jer.noble at apple.com>'s
request for review:
Bug 226515: [Cocoa] Make the hostTime parameter to playSession a Monotonic time
https://bugs.webkit.org/show_bug.cgi?id=226515

Attachment 430317: Patch

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




--- Comment #2 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 430317
  --> https://bugs.webkit.org/attachment.cgi?id=430317
Patch

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

> Source/WebCore/Modules/mediasession/MediaSessionCoordinator.cpp:355
> +    if (!std::isfinite(delta) || delta <= 0.5_s) {

Why delta <= 0.5_s, it seems we could use dispatchAfter?
Maybe a name for 0.5_s would help understanding.

> Source/WebCore/Modules/mediasession/MediaSessionCoordinatorPrivate.h:53
> +    }

Is it needed to keep it? Can we just move all call sites to use MonotonicTime?
Not sure we need WTFMove(atTime), especially since we are passing by value
anyway.

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:606
> +    m_coordinatorClient->playSession({ }, std::optional<MonotonicTime>(),
makeBlockPtr(completionHandler));

I guess the change would not be needed if we would keep only one variant of
playSession.


More information about the webkit-reviews mailing list