Fix MediaPlayerEngine leaks
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Jan 2015 09:22:02 +0000 (09:22 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Jan 2015 09:22:02 +0000 (09:22 +0000)
commite3d5208ebb7975a24f294738659468758abd0af0
tree2558a806944fa2ca1bcb1d0eafec25f04dd3ba98
parentf46b5c690f83db39e0179311fbee9fdd15385eae
Fix MediaPlayerEngine leaks
https://bugs.webkit.org/show_bug.cgi?id=140992

Reviewed by Jer Noble.

* platform/graphics/MediaPlayer.cpp:
(WebCore::mutableInstalledMediaEnginesVector): Added.
(WebCore::buildMediaEnginesVector): Added.
(WebCore::installedMediaEngines): Changed this to be a vector of factories
instead of a vector of heap-allocated factories. The old code would leak
all the factories when this was called with the ResetEngines option.
(WebCore::addMediaEngine): Updated for above change.
(WebCore::bestMediaEngineForSupportParameters): Ditto.
(WebCore::nextMediaEngine): Ditto.
(WebCore::MediaPlayer::nextBestMediaEngine): Ditto.
(WebCore::MediaPlayer::loadWithNextMediaEngine): Ditto.
(WebCore::MediaPlayer::supportsType): Ditto.
(WebCore::MediaPlayer::getSupportedTypes): Ditto.
(WebCore::MediaPlayer::getSitesInMediaCache): Ditto.
(WebCore::MediaPlayer::clearMediaCache): Ditto.
(WebCore::MediaPlayer::clearMediaCacheForSite): Ditto.
(WebCore::MediaPlayer::supportsKeySystem): Ditto.
(WebCore::MediaPlayer::resetMediaEngines): Ditto.
* platform/graphics/MediaPlayer.h: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h