Changeset 263031 in webkit


Ignore:
Timestamp:
Jun 15, 2020, 3:33:58 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[GStreamer] ImageDecoder hits Debug ASSERTs
https://bugs.webkit.org/show_bug.cgi?id=213178

Patch by Philippe Normand <pnormand@igalia.com> on 2020-06-15
Reviewed by Xabier Rodriguez-Calvar.

Pass a reference of the decoder to its inner implementation instead of a WeakPtr, which
can't be used across multiple threads.

Covered by fast/images/animated-image-mp4{,-crash}.html tests.

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):

  • platform/graphics/gstreamer/ImageDecoderGStreamer.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r263026 r263031  
     12020-06-15  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] ImageDecoder hits Debug ASSERTs
     4        https://bugs.webkit.org/show_bug.cgi?id=213178
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        Pass a reference of the decoder to its inner implementation instead of a WeakPtr, which
     9        can't be used across multiple threads.
     10
     11        Covered by fast/images/animated-image-mp4{,-crash}.html tests.
     12
     13        * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
     14        (WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):
     15        * platform/graphics/gstreamer/ImageDecoderGStreamer.h:
     16
    1172020-06-15  Youenn Fablet  <youenn@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp

    r262695 r263031  
    239239        { nullptr }
    240240    };
    241     gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, m_decoder.get(), nullptr);
     241    gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, &m_decoder, nullptr);
    242242
    243243    GRefPtr<GstCaps> caps = adoptGRef(gst_caps_from_string("video/x-raw, format=(string)RGBA"));
  • trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.h

    r262695 r263031  
    3636class ImageDecoderGStreamerSample;
    3737
    38 class ImageDecoderGStreamer final : public ImageDecoder, public CanMakeWeakPtr<ImageDecoderGStreamer> {
     38class ImageDecoderGStreamer final : public ImageDecoder {
    3939    WTF_MAKE_FAST_ALLOCATED;
    4040    WTF_MAKE_NONCOPYABLE(ImageDecoderGStreamer);
     
    8686
    8787        InnerDecoder(ImageDecoderGStreamer& decoder, const char* data, gssize size)
    88             : m_decoder(makeWeakPtr(decoder))
     88            : m_decoder(decoder)
    8989            , m_runLoop(RunLoop::current())
    9090        {
     
    101101        void connectDecoderPad(GstPad*);
    102102
    103         WeakPtr<ImageDecoderGStreamer> m_decoder;
     103        ImageDecoderGStreamer& m_decoder;
    104104        GRefPtr<GstElement> m_pipeline;
    105105        GRefPtr<GInputStream> m_memoryStream;
Note: See TracChangeset for help on using the changeset viewer.