Title: [246107] trunk/Source/WebCore
Revision
246107
Author
[email protected]
Date
2019-06-05 09:41:05 -0700 (Wed, 05 Jun 2019)

Log Message

[GStreamer] Crash in MediaPlayerPrivateGStreamerBase::ensureGstGLContext
https://bugs.webkit.org/show_bug.cgi?id=198567

Reviewed by Philippe Normand.

MediaPlayerPrivateGStreamerBase::ensureGstGLContext is currently a guaranteed crash because
it expects PlatformDisplay::sharedDisplayForCompositing() to return a PlatformDisplayLibWPE
if compiled with USE(WPE_RENDERER), but PlatformDisplayLibWPE has lower precedence than
PlatformDisplayX11 and PlatformDisplayWayland. When running our layout tests with
run-webkit-tests --gtk, it's guaranteed to be a PlatformDisplayX11.

I think Carlos was clearly expecting PlatformDisplayLibWPE, so I don't know what the ideal
desired behavior is, but the crashes go away if we change the code to allow any type of
PlatformDisplay. This should hopefully fix our bots, which are still exiting early.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (246106 => 246107)


--- trunk/Source/WebCore/ChangeLog	2019-06-05 14:52:26 UTC (rev 246106)
+++ trunk/Source/WebCore/ChangeLog	2019-06-05 16:41:05 UTC (rev 246107)
@@ -1,3 +1,23 @@
+2019-06-05  Michael Catanzaro  <[email protected]>
+
+        [GStreamer] Crash in MediaPlayerPrivateGStreamerBase::ensureGstGLContext
+        https://bugs.webkit.org/show_bug.cgi?id=198567
+
+        Reviewed by Philippe Normand.
+
+        MediaPlayerPrivateGStreamerBase::ensureGstGLContext is currently a guaranteed crash because
+        it expects PlatformDisplay::sharedDisplayForCompositing() to return a PlatformDisplayLibWPE
+        if compiled with USE(WPE_RENDERER), but PlatformDisplayLibWPE has lower precedence than
+        PlatformDisplayX11 and PlatformDisplayWayland. When running our layout tests with
+        run-webkit-tests --gtk, it's guaranteed to be a PlatformDisplayX11.
+
+        I think Carlos was clearly expecting PlatformDisplayLibWPE, so I don't know what the ideal
+        desired behavior is, but the crashes go away if we change the code to allow any type of
+        PlatformDisplay. This should hopefully fix our bots, which are still exiting early.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
+
 2019-06-05  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] Move inline item height computation to a dedicated function

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (246106 => 246107)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp	2019-06-05 14:52:26 UTC (rev 246106)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp	2019-06-05 16:41:05 UTC (rev 246107)
@@ -451,12 +451,13 @@
 #endif
 
 #if USE(WPE_RENDERER)
-        ASSERT(is<PlatformDisplayLibWPE>(sharedDisplay));
-        GST_DEBUG_OBJECT(pipeline(), "Creating WPE shared EGL display");
-        if (shouldAdoptRef)
-            m_glDisplay = adoptGRef(GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayLibWPE>(sharedDisplay).eglDisplay())));
-        else
-            m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayLibWPE>(sharedDisplay).eglDisplay()));
+        if (is<PlatformDisplayLibWPE>(sharedDisplay)) {
+            GST_DEBUG_OBJECT(pipeline(), "Creating WPE shared EGL display");
+            if (shouldAdoptRef)
+                m_glDisplay = adoptGRef(GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayLibWPE>(sharedDisplay).eglDisplay())));
+            else
+                m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayLibWPE>(sharedDisplay).eglDisplay()));
+        }
 #endif
 
         ASSERT(m_glDisplay);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to