[WinCairo] Crash when closing window while video is loading
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Mar 2015 23:01:51 +0000 (23:01 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Mar 2015 23:01:51 +0000 (23:01 +0000)
commit5e9b6bc00967536c0dc7edfa3b360eab7634ed81
treeb75046cf9ba45034296450a7538763a929c5ff7f
parent7f51ac8f20118b87fb5953b1cf60cf893f3bce1d
[WinCairo] Crash when closing window while video is loading
https://bugs.webkit.org/show_bug.cgi?id=143088

Reviewed by Mark Lam.

When the media player is destroyed, we have to cancel possible calls on the
main thread made by a worker thread. Otherwise the destroyed media player
will be accessed when performing the call.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
(WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSourceCallback):
(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySetCallback):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

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