<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GStreamer] crash within Threaded compositor"
href="https://bugs.webkit.org/show_bug.cgi?id=159552#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GStreamer] crash within Threaded compositor"
href="https://bugs.webkit.org/show_bug.cgi?id=159552">bug 159552</a>
from <span class="vcard"><a class="email" href="mailto:cgarcia@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=159552#c3">comment #3</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=283134&action=diff" name="attach_283134" title="patch">attachment 283134</a> <a href="attachment.cgi?id=283134&action=edit" title="patch">[details]</a></span>
> patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=283134&action=review">https://bugs.webkit.org/attachment.cgi?id=283134&action=review</a>
>
> > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:553
> > - m_player->sizeChanged();
> > + RunLoop::main().dispatch([this] { m_player->sizeChanged(); });
>
> Are you sure this is because of the threaded compositor and not because of
> GStreamerGL. Because I think in case of not using GSTGL, triggerRepaint is
> called in the main thread. In case of being in the main thread we would be
> scheduling this unnecessarily. Also, if the instance is destroyed before the
> source is dispatches in the main thread, this will crash, so you would need
> to protect this. It would be better if we could use the main thread notifier
> for this, but it's int he derived class not here in the base class.</span >
We already have a weak factory for this, so could you do something like this:
if (isMainThread())
m_player->sizeChanged();
else {
auto weakThis = player.createWeakPtr();
RunLoop::main().dispatch([weakThis]) {
if (weakThis)
weakThis->m_player->sizeChanged();
});
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>