[Webkit-unassigned] [Bug 159552] [GStreamer][GL] crash within triggerRepaint

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 11 06:38:44 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=159552

--- Comment #6 from Xabier Rodríguez Calvar <calvaris at igalia.com> ---
(In reply to comment #4)
> if (isMainThread())
>     m_player->sizeChanged();
> else {
>     auto weakThis = player.createWeakPtr();
>     RunLoop::main().dispatch([weakThis]) { 
>         if (weakThis)
>             weakThis->m_player->sizeChanged();
>     });
> }

I understand the concerns about reducing performance but if there isn't we should create a function to do something like:

{
     auto weakThis = player.createWeakPtr();
     RunLoop::main().runNowIfMainThreadOrdispatch([weakThis]) { 
         if (weakThis)
             weakThis->m_player->sizeChanged();
     });
}

Otherwise I think we are creating these code structures and IMHO it makes code hard to read.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160711/696dade2/attachment.html>


More information about the webkit-unassigned mailing list