Title: [276759] releases/WebKitGTK/webkit-2.32
- Revision
- 276759
- Author
- [email protected]
- Date
- 2021-04-29 01:33:12 -0700 (Thu, 29 Apr 2021)
Log Message
Merge r275516 - REGRESSION(r274358) [GStreamer] http/tests/images/mp4-partial-load.html is flaky crashing inside GStreamer
https://bugs.webkit.org/show_bug.cgi?id=223636
Patch by Philippe Normand <[email protected]> on 2021-04-06
Reviewed by Carlos Alberto Lopez Perez.
Source/WebCore:
Ensure the GStreamer messages are always processed synchronously, even when the handler is
called from another thread. Without blocking in the latter case, the select-streams event
might be sent to decodebin too late. It has to be sent as a synchronous reaction to the
stream-collection message.
* platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
(WebCore::ImageDecoderGStreamer::InnerDecoder::handleMessage):
(WebCore::ImageDecoderGStreamer::InnerDecoder::preparePipeline):
* platform/graphics/gstreamer/ImageDecoderGStreamer.h:
LayoutTests:
* platform/glib/TestExpectations: Update tests expectations.
* platform/gtk/TestExpectations: Ditto.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog (276758 => 276759)
--- releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog 2021-04-29 08:26:04 UTC (rev 276758)
+++ releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog 2021-04-29 08:33:12 UTC (rev 276759)
@@ -1,5 +1,15 @@
2021-04-06 Philippe Normand <[email protected]>
+ REGRESSION(r274358) [GStreamer] http/tests/images/mp4-partial-load.html is flaky crashing inside GStreamer
+ https://bugs.webkit.org/show_bug.cgi?id=223636
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ * platform/glib/TestExpectations: Update tests expectations.
+ * platform/gtk/TestExpectations: Ditto.
+
+2021-04-06 Philippe Normand <[email protected]>
+
[GStreamer][WebRTC] Audio is not played from an audio element when the srcObject object has unstarted video tracks
https://bugs.webkit.org/show_bug.cgi?id=209163
Modified: releases/WebKitGTK/webkit-2.32/LayoutTests/platform/glib/TestExpectations (276758 => 276759)
--- releases/WebKitGTK/webkit-2.32/LayoutTests/platform/glib/TestExpectations 2021-04-29 08:26:04 UTC (rev 276758)
+++ releases/WebKitGTK/webkit-2.32/LayoutTests/platform/glib/TestExpectations 2021-04-29 08:33:12 UTC (rev 276759)
@@ -550,7 +550,12 @@
webkit.org/b/207723 http/tests/contentextensions/hide-on-ping-with-ping-that-redirects.html [ Pass Failure ]
webkit.org/b/217961 http/tests/images/mp4-partial-load.html [ Timeout Pass ]
+<<<<<<< HEAD
+=======
+webkit.org/b/224109 http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html [ Failure Pass ]
+>>>>>>> 6b6396355c8 (REGRESSION(r274358) [GStreamer] http/tests/images/mp4-partial-load.html is flaky crashing inside GStreamer)
+
#////////////////////////////////////////////////////////////////////////////////////////
# End of HTTP-related bugs
#////////////////////////////////////////////////////////////////////////////////////////
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (276758 => 276759)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog 2021-04-29 08:26:04 UTC (rev 276758)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog 2021-04-29 08:33:12 UTC (rev 276759)
@@ -1,3 +1,20 @@
+2021-04-06 Philippe Normand <[email protected]>
+
+ REGRESSION(r274358) [GStreamer] http/tests/images/mp4-partial-load.html is flaky crashing inside GStreamer
+ https://bugs.webkit.org/show_bug.cgi?id=223636
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ Ensure the GStreamer messages are always processed synchronously, even when the handler is
+ called from another thread. Without blocking in the latter case, the select-streams event
+ might be sent to decodebin too late. It has to be sent as a synchronous reaction to the
+ stream-collection message.
+
+ * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
+ (WebCore::ImageDecoderGStreamer::InnerDecoder::handleMessage):
+ (WebCore::ImageDecoderGStreamer::InnerDecoder::preparePipeline):
+ * platform/graphics/gstreamer/ImageDecoderGStreamer.h:
+
2021-04-29 Adrian Perez de Castro <[email protected]>
Unreviewed build fix after r276749
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp (276758 => 276759)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp 2021-04-29 08:26:04 UTC (rev 276758)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp 2021-04-29 08:33:12 UTC (rev 276759)
@@ -33,6 +33,7 @@
#include <wtf/Lock.h>
#include <wtf/MainThread.h>
#include <wtf/Optional.h>
+#include <wtf/Scope.h>
#include <wtf/Threading.h>
namespace WebCore {
@@ -302,6 +303,14 @@
{
ASSERT(&m_runLoop == &RunLoop::current());
+ auto scopeExit = makeScopeExit([protectedThis = makeWeakPtr(this)] {
+ if (!protectedThis)
+ return;
+ LockHolder lock(protectedThis->m_messageLock);
+ protectedThis->m_messageDispatched = true;
+ protectedThis->m_messageCondition.notifyOne();
+ });
+
GUniqueOutPtr<GError> error;
GUniqueOutPtr<gchar> debug;
@@ -321,7 +330,7 @@
case GST_MESSAGE_STREAM_COLLECTION: {
GRefPtr<GstStreamCollection> collection;
gst_message_parse_stream_collection(message, &collection.outPtr());
- if (collection) {
+ if (collection && GST_MESSAGE_SRC(message) == GST_OBJECT_CAST(m_decodebin.get())) {
unsigned size = gst_stream_collection_get_size(collection.get());
GList* streams = nullptr;
for (unsigned i = 0 ; i < size; i++) {
@@ -354,6 +363,12 @@
gst_bus_set_sync_handler(bus.get(), [](GstBus*, GstMessage* message, gpointer userData) {
auto& decoder = *static_cast<ImageDecoderGStreamer::InnerDecoder*>(userData);
+
+ {
+ LockHolder lock(decoder.m_messageLock);
+ decoder.m_messageDispatched = false;
+ decoder.m_messageCondition.notifyOne();
+ }
if (&decoder.m_runLoop == &RunLoop::current())
decoder.handleMessage(message);
else {
@@ -364,6 +379,10 @@
weakThis->handleMessage(protectedMessage.get());
});
}
+ if (!decoder.m_messageDispatched) {
+ LockHolder lock(decoder.m_messageLock);
+ decoder.m_messageCondition.wait(decoder.m_messageLock);
+ }
gst_message_unref(message);
return GST_BUS_DROP;
}, this, nullptr);
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.h (276758 => 276759)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.h 2021-04-29 08:26:04 UTC (rev 276758)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.h 2021-04-29 08:33:12 UTC (rev 276759)
@@ -113,6 +113,10 @@
GRefPtr<GInputStream> m_memoryStream;
GRefPtr<GstElement> m_decodebin;
RunLoop& m_runLoop;
+
+ Condition m_messageCondition;
+ Lock m_messageLock;
+ bool m_messageDispatched { false };
};
void handleSample(GRefPtr<GstSample>&&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes