Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 56b164c. rdar://122444388
REGRESSION(272969@main): Null-deref crash in SourceBufferPrivateAVFObjC::trackDidChangeEnabled https://bugs.webkit.org/show_bug.cgi?id=268921 rdar://122444388 Reviewed by Eric Carlson. The WebAVSampleBufferListener m_listener is invalidated and destroyed in SourceBufferPrivateAVFObjC::destroyRenderers(), and is never recreated. It is subsequently used without nil-checking the next time a renderer is recreated. Rather than destroying and re-creating whenever renderers are destroyed and created, make it a Ref<> object whose lifetime is the same (or longer) as the object which owns it. * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): Canonical link: https://commits.webkit.org/274323@main Identifier: 272448.560@safari-7618.1.15.10-branch
- Loading branch information