[webkit-changes] [WebKit/WebKit] 13c5af: REGRESSION(268621 at main): Crash in ContentKeyGroupD...

aestes noreply at github.com
Sat Jan 13 12:10:53 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 13c5af2199517d7b83380156216b0bb003d97c61
      https://github.com/WebKit/WebKit/commit/13c5af2199517d7b83380156216b0bb003d97c61
  Author: Andy Estes <aestes at apple.com>
  Date:   2024-01-13 (Sat, 13 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/avfoundation/ContentKeyGroupDataSource.h
    M Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h
    M Source/WebCore/platform/graphics/avfoundation/objc/WebAVContentKeyGroup.mm

  Log Message:
  -----------
  REGRESSION(268621 at main): Crash in ContentKeyGroupDataSource::~ContentKeyGroupDataSource() due to CheckedPtr misuse
https://bugs.webkit.org/show_bug.cgi?id=267489
rdar://120422670

Reviewed by Eric Carlson.

In 268621 at main, WebAVContentKeyGroup was changed to store a CheckedPtr to its data source. However,
because CDMInstanceSessionFairPlayStreamingAVFObjC stores m_group in an options dictionary attached
to AVContentKeyRequests whose lifetimes are controlled by AVFoundation, WebKit cannot control the
lifetime of WebAVContentKeyGroup instances.

Fixed this by partially reverting 268621 at main so that WebAVContentKeyGroup stores its data source as
a WeakPtr again.

* Source/WebCore/platform/graphics/avfoundation/ContentKeyGroupDataSource.h:
* Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/WebAVContentKeyGroup.mm:
(-[WebAVContentKeyGroup initWithContentKeySession:dataSource:]):
(-[WebAVContentKeyGroup expire]):
(-[WebAVContentKeyGroup logIdentifier]):
(-[WebAVContentKeyGroup loggerPtr]):
(-[WebAVContentKeyGroup logChannel]):

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




More information about the webkit-changes mailing list