⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 277432 in webkit


Ignore:
Timestamp:
May 13, 2021, 6:54:43 AM (5 years ago)
Author:
eocanha@igalia.com
Message:

[GStreamer] media/track/in-band/track-in-band-srt-mkv-kind.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=225697

Source/WebCore:

This is a tentative fix for the flaky crash (I can't reproduce it locally after 10000
repetitions). It makes sure that mediaPlayerPrivate and any parameter passed to
handleTextSample() can either survive or detected to be invalid when the lambda is ran in
the main thread.

Reviewed by Alicia Boya Garcia.

Covered by existing tests.

  • platform/graphics/gstreamer/TextSinkGStreamer.cpp:

(webkitTextSinkHandleSample): Protect mediaPlayerPrivate and streadId and check if the mediaPlayerPrivate WeakRef is still alive.

LayoutTests:

Reviewed by Alicia Boya Garcia.

  • platform/glib/TestExpectations: Unskipped test.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r277430 r277432  
     12021-05-13  Enrique Ocaña González  <eocanha@igalia.com>
     2
     3        [GStreamer] media/track/in-band/track-in-band-srt-mkv-kind.html is a flaky crash
     4        https://bugs.webkit.org/show_bug.cgi?id=225697
     5
     6        Reviewed by Alicia Boya Garcia.
     7
     8        * platform/glib/TestExpectations: Unskipped test.
     9
    1102021-05-13  Martin Robinson  <mrobinson@webkit.org>
    211
  • trunk/LayoutTests/platform/glib/TestExpectations

    r277419 r277432  
    23822382webkit.org/b/225499 imported/w3c/web-platform-tests/css/css-fonts/font-feature-resolution-002.html [ ImageOnlyFailure ]
    23832383
    2384 webkit.org/b/225697 media/track/in-band/track-in-band-srt-mkv-kind.html [ Crash Pass ]
    2385 
    23862384# End: Common failures between GTK and WPE.
    23872385
  • trunk/Source/WebCore/ChangeLog

    r277425 r277432  
     12021-05-13  Enrique Ocaña González  <eocanha@igalia.com>
     2
     3        [GStreamer] media/track/in-band/track-in-band-srt-mkv-kind.html is a flaky crash
     4        https://bugs.webkit.org/show_bug.cgi?id=225697
     5
     6        This is a tentative fix for the flaky crash (I can't reproduce it locally after 10000
     7        repetitions). It makes sure that mediaPlayerPrivate and any parameter passed to
     8        handleTextSample() can either survive or detected to be invalid when the lambda is ran in
     9        the main thread.
     10
     11        Reviewed by Alicia Boya Garcia.
     12
     13        Covered by existing tests.
     14
     15        * platform/graphics/gstreamer/TextSinkGStreamer.cpp:
     16        (webkitTextSinkHandleSample): Protect mediaPlayerPrivate and streadId and check if the mediaPlayerPrivate WeakRef is still alive.
     17
    1182021-05-12  Frederic Wang  <fwang@igalia.com>
    219
  • trunk/Source/WebCore/platform/graphics/gstreamer/TextSinkGStreamer.cpp

    r276586 r277432  
    6262
    6363    if (priv->streamId) {
    64         // As the mediaPlayerPrivate WeakPtr is constructed from the main thread, we have to use it
    65         // from the main thread as well.
    66         callOnMainThread([priv, sample = WTFMove(sample)] {
    67             priv->mediaPlayerPrivate->handleTextSample(sample.get(), priv->streamId);
     64        // Player private methods that interact with WebCore must run from the main thread. Things can be destroyed before that
     65        // code runs, including the text sink and priv, so pass everything in a safe way.
     66        callOnMainThread([mediaPlayerPrivate = WeakPtr<MediaPlayerPrivateGStreamer>(priv->mediaPlayerPrivate),
     67            streamId = priv->streamId, sample = WTFMove(sample)] {
     68            if (!mediaPlayerPrivate)
     69                return;
     70            mediaPlayerPrivate->handleTextSample(sample.get(), streamId);
    6871        });
    6972        return;
Note: See TracChangeset for help on using the changeset viewer.