[MSE][Mac] Crash when reloading a page during playback
https://bugs.webkit.org/show_bug.cgi?id=126903
Reviewed by Eric Carlson.
Periodic time observers added to AVSampleBufferRenderSynchronizer will execute their
callback block even after being removed with -removeTimeObserver:, which is tracked by
<rdar://problem/
15798050>. Work around this problem by passing a WeakPtr into the block
and bail early if the owning media player has been destroyed.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162685
268f45cc-cd09-0410-ab3c-
d52691b4dbfc