Title: [249276] trunk/Source/WebCore
Revision
249276
Author
ctur...@igalia.com
Date
2019-08-29 09:14:07 -0700 (Thu, 29 Aug 2019)

Log Message

[GStreamer] Do not use makeWeakPtr from streaming thread.
https://bugs.webkit.org/show_bug.cgi?id=201220

Reviewed by Xabier Rodriguez-Calvar.

Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html

Recently some asserts were added that you can't create WeakPtr's
from streaming threads when the factory is created on the
main-thread. The fix is to eagerly create the WeakPtr at player
initialization time, rather than lazily when the streaming thread
first asks for it.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (249275 => 249276)


--- trunk/Source/WebCore/ChangeLog	2019-08-29 15:28:23 UTC (rev 249275)
+++ trunk/Source/WebCore/ChangeLog	2019-08-29 16:14:07 UTC (rev 249276)
@@ -1,3 +1,20 @@
+2019-08-29  Charlie Turner  <ctur...@igalia.com>
+
+        [GStreamer] Do not use makeWeakPtr from streaming thread.
+        https://bugs.webkit.org/show_bug.cgi?id=201220
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html
+
+        Recently some asserts were added that you can't create WeakPtr's
+        from streaming threads when the factory is created on the
+        main-thread. The fix is to eagerly create the WeakPtr at player
+        initialization time, rather than lazily when the streaming thread
+        first asks for it.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
+
 2019-08-29  Rob Buis  <rb...@igalia.com>
 
         Address some MathML FIXMEs 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h (249275 => 249276)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h	2019-08-29 15:28:23 UTC (rev 249275)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h	2019-08-29 16:14:07 UTC (rev 249276)
@@ -88,7 +88,8 @@
 
 void registerWebKitGStreamerElements();
 
-class MediaPlayerPrivateGStreamerBase : public MediaPlayerPrivateInterface, public CanMakeWeakPtr<MediaPlayerPrivateGStreamerBase>
+// Use eager initialization for the WeakPtrFactory since we call makeWeakPtr() from another thread.
+class MediaPlayerPrivateGStreamerBase : public MediaPlayerPrivateInterface, public CanMakeWeakPtr<MediaPlayerPrivateGStreamerBase, WeakPtrFactoryInitialization::Eager>
 #if USE(TEXTURE_MAPPER_GL)
 #if USE(NICOSIA)
     , public Nicosia::ContentLayerTextureMapperImpl::Client
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to