Title: [202238] trunk/Source/WebCore
Revision
202238
Author
[email protected]
Date
2016-06-20 13:38:41 -0700 (Mon, 20 Jun 2016)

Log Message

Crash in PlatformMediaSession::clientWillPausePlayback
https://bugs.webkit.org/show_bug.cgi?id=158953
<rdar://problem/26121125>

Reviewed by Jer Noble.

No new tests, I have not been able to reproduce this in a test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stop): Ref the element before calling stopWithoutDestroyingMediaPlayer
  because updatePlaybackControlsManager can release the last reference and cause the
  destructor to be called.
(WebCore::HTMLMediaElement::suspend): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (202237 => 202238)


--- trunk/Source/WebCore/ChangeLog	2016-06-20 20:35:07 UTC (rev 202237)
+++ trunk/Source/WebCore/ChangeLog	2016-06-20 20:38:41 UTC (rev 202238)
@@ -1,3 +1,19 @@
+2016-06-20  Eric Carlson  <[email protected]>
+
+        Crash in PlatformMediaSession::clientWillPausePlayback
+        https://bugs.webkit.org/show_bug.cgi?id=158953
+        <rdar://problem/26121125>
+
+        Reviewed by Jer Noble.
+
+        No new tests, I have not been able to reproduce this in a test.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::stop): Ref the element before calling stopWithoutDestroyingMediaPlayer
+          because updatePlaybackControlsManager can release the last reference and cause the
+          destructor to be called.
+        (WebCore::HTMLMediaElement::suspend): Ditto.
+
 2016-06-20  Alex Christensen  <[email protected]>
 
         Clean up ResourceResponseBase after r201943

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (202237 => 202238)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-06-20 20:35:07 UTC (rev 202237)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-06-20 20:38:41 UTC (rev 202238)
@@ -5092,6 +5092,7 @@
 {
     LOG(Media, "HTMLMediaElement::stop(%p)", this);
 
+    Ref<HTMLMediaElement> protectedThis(*this);
     stopWithoutDestroyingMediaPlayer();
 
     m_asyncEventQueue.close();
@@ -5109,6 +5110,7 @@
 void HTMLMediaElement::suspend(ReasonForSuspension why)
 {
     LOG(Media, "HTMLMediaElement::suspend(%p)", this);
+    Ref<HTMLMediaElement> protectedThis(*this);
 
     switch (why)
     {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to