Skip to content

Commit

Permalink
Merge r249276 - [GStreamer] Do not use makeWeakPtr from streaming thr…
Browse files Browse the repository at this point in the history
…ead.

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:
  • Loading branch information
charlie-ht authored and carlosgcampos committed Sep 2, 2019
1 parent a1c2a1a commit a8c0544
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
2019-08-29 Charlie Turner <cturner@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-30 Adrian Perez de Castro <aperez@igalia.com>

Unreviewed build fix for ENABLE_UNIFIED_BUILDS=OFF.
Expand Down
Expand Up @@ -88,7 +88,8 @@ class TextureMapperPlatformLayerProxy;

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
Expand Down

0 comments on commit a8c0544

Please sign in to comment.