[Webkit-unassigned] [Bug 152043] [GStreamer] MainThreadNotifier ASSERTION FAILED: m_boundThread == currentThread() in _WebKitWebSrcPrivate::~_WebKitWebSrcPrivate

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 16 07:32:49 PDT 2017


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

--- Comment #27 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 313058
  --> https://bugs.webkit.org/attachment.cgi?id=313058
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=313058&action=review

> Source/WebCore/platform/graphics/gstreamer/MainThreadNotifier.h:55
> +        RunLoop::main().dispatch([this, protectedThis = makeRef(*this), notificationType, callback = std::function<void()>(callbackFunctor)] {
> +            if (!m_isValid.load())
> +                return;
> +            if (removePendingNotification(notificationType))
>                  callback();
>          });

So now there are two cases when the callback might never be called. It's standard practice in such cases for the callback to be called with a cancellation indicator (e.g. G_IO_ERROR_CANCELLED), but we just drop it. This makes MainThreadNotifier unsafe to use in any case where execution of the callback is required. It can only be used for optional tasks. This is a preexisting problem, but it this patch exacerbates it slightly, and it seems like the sort of thing that could cause many difficult-to-debug issues.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170616/297e8241/attachment.html>


More information about the webkit-unassigned mailing list