[webkit-reviews] review granted: [Bug 238821] [Refactor] Introduce a SeekCompletion callback for MediaPlayer seek commands : [Attachment 456723] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 13 08:43:04 PDT 2022


Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 238821: [Refactor] Introduce a SeekCompletion callback for MediaPlayer seek
commands
https://bugs.webkit.org/show_bug.cgi?id=238821

Attachment 456723: Patch

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




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

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

>
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cp
p:298
> +	   ALWAYS_LOG(identifier, "::completion(), result = ", result);
> +
> +	   m_seeking = false;

Shouldn't we do a `weakThis` null-test here?

>
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourc
eAVFObjC.mm:582
> +	   (*m_seekCompletion)(MediaPlayerEnums::SeekResult::Completed);
> +	   m_seekCompletion = nullptr;

Maybe clear `m_seekCompletion` before calling the completion handler in case it
results in a call back into the player?


More information about the webkit-reviews mailing list