[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:41:49 PDT 2017


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

--- Comment #28 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Catanzaro from comment #27)
> Comment on attachment 313058 [details]
> 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.

The same two cases than before, I've only split the if in two. Anyway, this is not a completion callback, and the notifier is only expected to be invalidated when callers die, to behave the same way than the weakptr, so we never want to run any callback after the caller has died, since that's indeed the whole point of the weak pointer.

-- 
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/e168dc35/attachment.html>


More information about the webkit-unassigned mailing list