[WinCairo] Crash when media player is destroyed.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Feb 2015 15:21:59 +0000 (15:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Feb 2015 15:21:59 +0000 (15:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141248

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-02-23
Reviewed by Darin Adler.

A COM smart pointer is both released, and set to null.
This means that the COM Release method is called twice, causing a crash.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::endSession):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180501 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp

index 3755811..050da3d 100644 (file)
@@ -1,3 +1,16 @@
+2015-02-23  peavo@outlook.com  <peavo@outlook.com>
+
+        [WinCairo] Crash when media player is destroyed.
+        https://bugs.webkit.org/show_bug.cgi?id=141248
+
+        Reviewed by Darin Adler.
+
+        A COM smart pointer is both released, and set to null.
+        This means that the COM Release method is called twice, causing a crash.
+
+        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
+        (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
+
 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
 
         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
index 312de55..9c11975 100644 (file)
@@ -241,7 +241,6 @@ bool MediaPlayerPrivateMediaFoundation::endSession()
 {
     if (m_mediaSession) {
         m_mediaSession->Shutdown();
-        m_mediaSession->Release();
         m_mediaSession = nullptr;
     }