Hardening: Use WeakPtrs in PlaybackSessionInterface{Mac,AVKit}
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 22:36:08 +0000 (22:36 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 22:36:08 +0000 (22:36 +0000)
commitb0def89d6895896223d4dd263d853101568ca17c
treef04f876100e92bc0f7034169bd3c4fe5069271ea
parent699d57a573b3151014ebfd95b9f25f70fe2dcbac
Hardening: Use WeakPtrs in PlaybackSessionInterface{Mac,AVKit}
https://bugs.webkit.org/show_bug.cgi?id=195935
<rdar://problem/49007015>

Reviewed by Eric Carlson.

The PlaybackSessionInterface{Mac,AVKit} implementations store their playback session model
and playback controls manager members as bare pointers, something we've been working
to eliminate.

This patch corrects this oversight.

No new tests since no changes in behavior.

* platform/cocoa/PlaybackSessionModel.h:
* platform/ios/PlaybackSessionInterfaceAVKit.h:
* platform/ios/PlaybackSessionInterfaceAVKit.mm:
(WebCore::PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit):
(WebCore::playbackSessionModel const): Moved to implementation since WEBCORE_EXPORT is not
supposed to be used with inline methods.
* platform/mac/PlaybackSessionInterfaceMac.h:
* platform/mac/PlaybackSessionInterfaceMac.mm:
(WebCore::PlaybackSessionInterfaceMac::PlaybackSessionInterfaceMac):
(WebCore::PlaybackSessionInterfaceMac::playbackSessionModel const):
(WebCore::PlaybackSessionInterfaceMac::beginScrubbing):
(WebCore::PlaybackSessionInterfaceMac::endScrubbing):
(WebCore::PlaybackSessionInterfaceMac::playBackControlsManager):
* platform/mac/VideoFullscreenInterfaceMac.mm:
(WebCore::VideoFullscreenInterfaceMac::~VideoFullscreenInterfaceMac):
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]):
(-[WebPlaybackControlsManager setCurrentAudioTouchBarMediaSelectionOption:]):
(-[WebPlaybackControlsManager setCurrentLegibleTouchBarMediaSelectionOption:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/PlaybackSessionModel.h
Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h
Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm
Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.h
Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.mm
Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm
Source/WebCore/platform/mac/WebPlaybackControlsManager.mm