[webkit-changes] [WebKit/WebKit] af8792: RealtimeMediaSource whenReady callback should be c...

youennf noreply at github.com
Mon Dec 2 07:45:26 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: af879258b8cd2d089cdf2938121b5e1ef4346286
      https://github.com/WebKit/WebKit/commit/af879258b8cd2d089cdf2938121b5e1ef4346286
  Author: Youenn Fablet <youenn at apple.com>
  Date:   2024-12-02 (Mon, 02 Dec 2024)

  Changed paths:
    M Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm

  Log Message:
  -----------
  RealtimeMediaSource whenReady callback should be called asynchronously
rdar://140689042
https://bugs.webkit.org/show_bug.cgi?id=283817

Reviewed by Eric Carlson.

ScreenCaptureKitCaptureSource destructor is calling the whenReady callback if not already called.
This has the impact of taking a strong ref to the ScreenCaptureKitCaptureSource via a weak pointer.

To prevent this, the whenReady callback is called asynchronously.
We update ScreenCaptureKitCaptureSource::whenReady also to make sure the completion handler is called.

* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:
(WebCore::ScreenCaptureKitCaptureSource::~ScreenCaptureKitCaptureSource):
(WebCore::ScreenCaptureKitCaptureSource::whenReady):

Canonical link: https://commits.webkit.org/287217@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list