[webkit-reviews] review granted: [Bug 217963] [media-session] Basic support for MediaSession.setPositionState() and MediaSession.setActionHandler() : [Attachment 411875] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 20 10:01:23 PDT 2020


Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 217963: [media-session] Basic support for MediaSession.setPositionState()
and MediaSession.setActionHandler()
https://bugs.webkit.org/show_bug.cgi?id=217963

Attachment 411875: Patch

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




--- Comment #3 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 411875
  --> https://bugs.webkit.org/attachment.cgi?id=411875
Patch

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

> Source/WebCore/Modules/mediasession/MediaSession.cpp:100
>	   && std::isfinite(state->playbackRate)

Only infinite rate is valid?

> Source/WebCore/Modules/mediasession/MediaSession.cpp:105
> +	   m_positionState = WTFMove(state);
> +	   m_lastReportedPosition = m_positionState->position;
> +	   m_timeAtLastPositionUpdate = MonotonicTime::now();
>	   return { };

I think you are missing some braces here, but I think an early return for
illegal input would be clearer in any case.


More information about the webkit-reviews mailing list